20.04.2018, 04:00
Quote:
1) PVars can be shared/accessed across gamemode scripts and filterscripts, making it easier to modularise your code. 2) 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. 3) No real need for complex enums/player info structures. 4) Saves memory by not allocating pawn array elements for playerids which will probably never be used. 5) You can easily enumerate and print/store the PVar list. This makes both debugging and player info storage easier. 6) Even if a PVar hasn't been created, it still will return a default value of 0. 7) PVars can hold very large strings using dynamically allocated memory. |
Edit: I misread your question but still, those are why you SHOULD use PVars.