SA-MP Forums Archive
Delete PVar - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Delete PVar (/showthread.php?tid=160045)



Delete PVar - Nonameman - 15.07.2010

Hey Guys!

If I use DeletePVar(), it's the same if I set the variable to 0?

Nonameman


Re: Delete PVar - ScottCFR - 15.07.2010

I'm pretty sure that it removes it completely. But I don't use PVars that much, so...


Re: Delete PVar - RyDeR` - 15.07.2010

It is getting deleted so actually value will also be 0 if you create it again.


Re: Delete PVar - iggy1 - 15.07.2010

Pvars will return 0 if they don't exist anyway (i think). So if you did
pawn Код:
if(GetPvarInt,"varname")==0)
If "varname" doesn't exist that statment would be true.
https://sampwiki.blast.hk/wiki/Per-player_variable_system

EDIT: just realised that has nothing to do with his question lolz


Re: Delete PVar - Hiddos - 15.07.2010

I guess deleting it would save more memory, because setting it it 0 should basically still keep that variable.


Re: Delete PVar - Nonameman - 15.07.2010

Thank You All!