SA-MP Forums Archive
GetPVarInt vs variable - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GetPVarInt vs variable (/showthread.php?tid=650318)



GetPVarInt vs variable - PepsiCola23 - 25.02.2018

I`ve read that pvars are much slower than variables.

so,my question is. ,whats the better way to detect if a player is carying a box(i use via setplayerspecialaction). Make a variable like IsCarrying[MAX_PLAYERS] and set to 0/1 or should i use pvars?


Re: GetPVarInt vs variable - ISmokezU - 25.02.2018

Yes make the var like IsCarrying[MAX_PLAYERS]; and set it to IsCarry[playerid] = 0/1;


Re: GetPVarInt vs variable - PepsiCola23 - 25.02.2018

you meant IsCarrying[playerid] right?

thanks anyways !


Re: GetPVarInt vs variable - PepsiCola23 - 25.02.2018

Quote:
Originally Posted by ******
Посмотреть сообщение
If by "should i use vars" you mean "should I use PVars", then the answer is no.

`IsCarrying` is a variable, and is what you should be using. So if that's what you meant by "should i use vars", then the answer is yes.

Either way, don't use PVars.
yes,i meant pvars.

ok,i won`t use pvars,i`ll stick to variables.

thanks a lot everyone !