PDA

View Full Version : SetPVarInt/SetPVarString VS Enum/New variables


StrikerZ
15/02/2017, 07:10 AM
Which one is the faster and takes low memory?
SetPVarInt/SetPVarString or Enums/New variables

vital2k
15/02/2017, 07:13 AM
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.

Gammix
15/02/2017, 07:24 AM
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.

StrikerZ
15/02/2017, 07:27 AM
Hm.. aight thanks for the information.