SA-MP Forums Archive
How to make house enum to GVars/Player vars? - 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: How to make house enum to GVars/Player vars? (/showthread.php?tid=370663)



How to make house enum to GVars/Player vars? - Ranama - 20.08.2012

Hello, I know how to use player variables, at the moment I'm not using them tho, But i want to start using them, I've found this include witch make you able to use "player variables" as normal variables, but now my question is, how to make a like house array, or somthing like in the old time i should do it like this,

(here is the GVar plugin link)
pawn Код:
enum houseinfoenum{
x,
y,
z,
//and all the other code here (hope you understand)
}

new houseinfo[MAX_HOUSES][houseinfoenum];
So, how can i do something like that with the GVar plugin or with that kind of fast variables?
(i know how to do it with playerinfo becuse you have one varialbe for every player then but is there any way of defining how many you want of each type, like this array i just explained)
Hope you understands :/ don't really know how to explain it.

Thanks for all answers


Re: How to make house enum to GVars/Player vars? - Ranama - 22.08.2012

Bumb, woho I waited for 48h

This forum requires that you wait 120 seconds between posts. Please try again in 43 seconds.


Re: How to make house enum to GVars/Player vars? - Roko_foko - 22.08.2012

Is there a reason why you want to use Player Vars or just for fun?


Re: How to make house enum to GVars/Player vars? - Ranama - 22.08.2012

Quote:
Originally Posted by Roko_foko
Посмотреть сообщение
Is there a reason why you want to use Player Vars or just for fun?
Just because they are faster then normal array/variables.


Re: How to make house enum to GVars/Player vars? - ReVo_ - 22.08.2012

Quote:
Originally Posted by Ranama
Посмотреть сообщение
Just because they are faster then normal array/variables.
No, natives functions are more slow than variables.


Re: How to make house enum to GVars/Player vars? - Vince - 22.08.2012

Yes, they are indeed slower. Accessing a variable is always faster than calling a function. The only use for PVar/Gvar/properties is to share information across scripts.


Re: How to make house enum to GVars/Player vars? - denNorske - 28.08.2012

Sorry for bumping this, but is this possible? Want to use enums(strings) across multiple Filterscripts. And right now i have to copy and paste scripts into one ExTremely big one.