DeletePVar

Description

Deletes a previously set player variable.

NameDescription
playeridThe ID of the player whose player variable to delete.
varnameThe name of the player variable to delete.

Returns

1: The function executed successfully.

0: The function failed to execute. Either the player specified isn't connected or there is no variable set with the given name.

Examples

SetPVarInt(playerid, "SomeVarName", 69);
// Later on, when the variable is no longer needed...
DeletePVar(playerid, "SomeVarName");

Notes

tip

Once a variable is deleted, attempts to retrieve the value will return 0 (for integers and floats and NULL for strings).

Related Functions