warning Not Translated
This page has not been translated into the language that your browser requested yet. The English content is being shown as a fallback.
If you want to contribute a translation for this page then please click here.
DeletePVar
Description
Deletes a previously set player variable.
Name | Description |
---|---|
playerid | The ID of the player whose player variable to delete. |
const pvar[] | The name of the player variable to delete. |
Returns
true - The function executed successfully.
false - 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 0.0 for floats and NULL for strings.
Related Functions
- SetPVarInt: Set an integer for a player variable.
- GetPVarInt: Get the previously set integer from a player variable.
- SetPVarString: Set a string for a player variable.
- GetPVarString: Get the previously set string from a player variable.
- SetPVarFloat: Set a float for a player variable.
- GetPVarFloat: Get the previously set float from a player variable.