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)(std::string, std::string);
  3. +
    VAULTSCRIPT vaultmp::Void (*SetServerRule)(vaultmp::String, vaultmp::String);
  4.  
    native SetServerRule(rule{}, value{});
    [/highlight]
    [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]
    [highlight=cpp]
  5. -
    std::string key = "website";
    std::string value = "vaultmp.com";
  6. +
    vaultmp::String key = "website";
    vaultmp::String value = "vaultmp.com";
  7.  
    SetServerRule(key, value);
    [/highlight]
    [category]VaultMP interface[/category]
    [category]Scripting functions[/category]
    [category]Misc functions[/category]