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

SetServerRule

(Difference between revisions)
Return to current revision
Current Revision 08-23-2012, 11:47 PM
  1. -
    [[FIle:Rules.png|thumb|right|Server rules]]

  2. +
    [image]Rules.png|thumb|right|Server rules[/image]
  3.  
    Defines a new server rule.
  4. -

    == Declaration ==
    <code cpp>
    VAULTSCRIPT void (*SetServerRule)(std::string, std::string);
    native SetServerRule(rule{}, value{});
    </code>
    == Parameters ==

    '''rule''' - the new rule (key)
    '''value''' - the value of the rule

    == Return value ==

  5. +
    [h="2"] Declaration [/h]
    [highlight=cpp]
    VAULTSCRIPT VAULTSPACE Void (*VAULTAPI(SetServerRule))(VAULTSPACE cRawString, VAULTSPACE cRawString) _CPP(noexcept);
    [/highlight]
    [highlight=c]
    native SetServerRule(const rule{}, const value{});
    [/highlight]
    [h="2"] Parameters [/h]
    [b][wiki="cRawString"]cRawString[/wiki][/b] - the new rule (key)
    [b][wiki="cRawString"]cRawString[/wiki][/b] - the value of the rule
    [h="2"] Return value [/h]
  6.  
    None.
  7. -

    == Usage example (C++) ==

    <code cpp>
    std::string key = "website";
    std::string value = "vaultmp.com";
    SetServerRule(key, value);
    </code>
  8. +
    [category]VaultMP interface[/category]
    [category]Scripting functions[/category]
    [category]Misc functions[/category]