What does GetPvarint/string return by default?
#1

What does GetPVarINT or GetPVarString return if none has been set in the first place?
Reply
#2

0.

https://sampwiki.blast.hk/wiki/Per-player_variable_system

Quote:

* PVars can be shared/accessed across gamemode scripts and filterscripts, making it easier to modularise your code.
* PVars are automatically deleted when a player leaves the server, meaning you don't have to manually reset variables for the next player who joins.
* No real need for complex enums/player info structures.
* Saves memory by not allocating pawn array elements for playerids which will probably never be used.
* You can easily enumerate and print/store the PVar list. This makes both debugging and player info storage easier.
* Even if a PVar hasn't been created, it still will return a default value of 0.
* PVars can hold very large strings using dynamically allocated memory.

Reply
#3

Thank-you sir.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)