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]
  2. -
    <code cpp>
    VAULTSCRIPT void (*SetServerRule)(std::string, std::string);
  3. +
    [highlight=cpp]
    VAULTSCRIPT vaultmp::Void (*SetServerRule)(std::string, std::string);
  4.  
    native SetServerRule(rule{}, value{});
  5. -
    </code>
  6. +
    [/highlight]
  7.  
    [h="2"] Parameters [/h]
    [b]rule[/b] - the new rule (key)
    [b]value[/b] - the value of the rule
    [h="2"] Return value [/h]
    None.
    [h="2"] Usage example (C++) [/h]
  8. -
    <code cpp>
  9. +
    [highlight=cpp]
  10.  
    std::string key = "website";
    std::string value = "vaultmp.com";
    SetServerRule(key, value);
  11. -
    </code>
  12. +
    [/highlight]
  13.  
    [category]VaultMP interface[/category]
    [category]Scripting functions[/category]
    [category]Misc functions[/category]