This site has been archived and made available for preservation purposes. No edits can be made.

SetServerRule

(Difference between revisions)
Return to current revision
  1.  
    [image]Rules.png|thumb|right|Server rules[/image]
    Defines a new server rule.
    [h="2"] Declaration [/h]
    [highlight=cpp]
  2. -
    VAULTSCRIPT vaultmp::Void (*SetServerRule)(vaultmp::String, vaultmp::String);
  3. +
    VAULTSCRIPT VAULTSPACE Void (*VAULTAPI(SetServerRule))(VAULTSPACE cRawString, VAULTSPACE cRawString) _CPP(noexcept);
  4.  
    native SetServerRule(rule{}, value{});
  5. +
    [/highlight]
    [highlight=c]
    native SetServerRule(const rule{}, const value{});
  6.  
    [/highlight]
    [h="2"] Parameters [/h]
  7. -
    [b][wiki="String"]vaultmp::String[/wiki][/b] - the new rule (key)
    [b][wiki="String"]vaultmp::String[/wiki][/b] - the value of the rule
  8. +
    [b][wiki="cRawString"]cRawString[/wiki][/b] - the new rule (key)
    [b][wiki="cRawString"]cRawString[/wiki][/b] - the value of the rule
  9.  
    [h="2"] Return value [/h]
    None.
  10. -
    [h="2"] Usage example (C++) [/h]
    [highlight=cpp]
    vaultmp::String key = "website";
    vaultmp::String value = "vaultmp.com";
    SetServerRule(key, value);
    [/highlight]
  11.  
    [category]VaultMP interface[/category]
    [category]Scripting functions[/category]
    [category]Misc functions[/category]