SA-MP Forums Archive
SetPVarInt/SetPVarString VS Enum/New variables - 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: SetPVarInt/SetPVarString VS Enum/New variables (/showthread.php?tid=628797)



SetPVarInt/SetPVarString VS Enum/New variables - StrikerZ - 15.02.2017

Which one is the faster and takes low memory?
SetPVarInt/SetPVarString or Enums/New variables


Re: SetPVarInt/SetPVarString VS Enum/New variables - vital2k - 15.02.2017

From a response I saw recently, normal variables take less memory and are faster. Difference is pvars just automatically reset on player disconnect meaning you don't manually have to do it.

Don't take my word for it though, just started scripting so unsure.


Re: SetPVarInt/SetPVarString VS Enum/New variables - Gammix - 15.02.2017

Pvars can be accessed in any script. (you can use them in filterscripts and gamemodes where their values are globally same)

Variables are limited to the script only.

Pvars take more memory but speed is allright. You should concentrate on what you are using them for.


Re: SetPVarInt/SetPVarString VS Enum/New variables - StrikerZ - 15.02.2017

Hm.. aight thanks for the information.