DarkRP.DarkRPVarChanged

From Official DarkRP Wiki
Jump to: navigation, search
This page refers to DarkRP 2.4.3. This information may be incorrect as of later versions.
Check here for a up-to-date list of hooks.

Syntax

DescriptionCalled when a player's DarkRPVar changes
Syntax
GAMEMODE:DarkRPVarChanged(Player ply, string var, any OldValue, any NewValue)
Returnsnil

Arguments

  • ply (Player)
  • The player who got paid

  • var (string)
  • name of the variable that changed ("money", "salary", "rpname" or w/e)

  • OldValue (any)
  • The previous value of the variable

  • NewValue (any)
  • The new value of this DarkRPVar

    Examples

    Descriptionprints DarkRPVar changes, useful for debugging
    Code
    hook.Add( "DarkRPVarChanged", "example", function(ply, var, oldvar, newvalue)
    	print(ply, var, oldvar, newvalue)
    end)
    Outputa print message