pvar vs playerinfo[][]
#2

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.

2 and beyond are good reasons.

Edit: I misread your question but still, those are why you SHOULD use PVars.
Reply


Messages In This Thread
pvar vs playerinfo[][] - by C0mBat1ve - 20.04.2018, 03:31
Re: pvar vs playerinfo[][] - by Kane - 20.04.2018, 04:00
Re: pvar vs playerinfo[][] - by C0mBat1ve - 20.04.2018, 10:26
Re: pvar vs playerinfo[][] - by NaS - 20.04.2018, 12:40
Re: pvar vs playerinfo[][] - by iKarim - 20.04.2018, 12:44
Re: pvar vs playerinfo[][] - by C0mBat1ve - 21.04.2018, 02:43

Forum Jump:


Users browsing this thread: 1 Guest(s)