Enums question - 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: Enums question (
/showthread.php?tid=436766)
Enums question -
PaulDinam - 12.05.2013
How can I use something else instead of MAX_PLANTS to be unlimited?
Код:
enum PLANTS_INFO
{
pID,
pPlanter[MAX_PLAYER_NAME],
pGrowTime,
Float:pX,
Float:pY,
Float:pZ,
pMade,
pObject,
Text3D:pLabel,
pPlanted
}
new CropsInfo[MAX_PLANTS][PLANTS_INFO];
Re: Enums question -
RajatPawar - 12.05.2013
pawn Код:
#define INFINITY (Float:0x7F800000)
#define MAX_PLANTS INFINITY
I guess that wouldn't work. Or would it?
Or if this doesn't, just define max plants as something you'll never reach, 9000000000000, something like that, which will be wasting memory.
Re: Enums question -
PaulDinam - 12.05.2013
If I increase the MAX_PLANTS to 50000, it will take more memory?
Re: Enums question -
ReVo_ - 12.05.2013
Yeah.
Really you need something like 50000? Lol.
Re: Enums question -
PaulDinam - 12.05.2013
I'll be making a ticket system which I want it to be unlimited for everyone...And I can't know how much slots I would need..
Re: Enums question -
Cameltoe - 12.05.2013
I'm not 100% sure but what about
:
pawn Код:
new CropsInfo[][PLANTS_INFO];
Re: Enums question -
Vince - 12.05.2013
SQL. SQLite will suffice, I suppose.