Is that possible to use each byte as a variable in enum? (+REP) - 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: Is that possible to use each byte as a variable in enum? (+REP) (
/showthread.php?tid=647325)
Is that possible to use each byte as a variable in enum? (+REP) -
Lirbo - 03.01.2018
when I do the next thing it's giving me errors, there is any possible way to do something similar?
PHP код:
enum info
{
slot[35]
}
new playerinfo[MAX_PLAYERS][info];
public OnPlayerConnect(playerid)
{
playerinfo[playerid][slot[0]] = 12;
playerinfo[playerid][slot[1]] = 69;
}
well I can make "slot1, slot2, slot3" but that sucks and I won't be able to do the next thing:
PHP код:
for(new i; i < 35; i++)
{
playerinfo[playerid][slot[i]] = 17;
}
Re: Is that possible to use each byte as a variable in enum? (+REP) -
Injury - 03.01.2018
Код HTML:
for(new i; i < 35; i++)
{
playerinfo[playerid][slot][i] = 17;
}
Re: Is that possible to use each byte as a variable in enum? (+REP) -
Lirbo - 03.01.2018
Quote:
Originally Posted by Injury
Код HTML:
for(new i; i < 35; i++)
{
playerinfo[playerid][slot][i] = 17;
}
|
you earned it!