26.06.2014, 10:39
I got:
then i make a stock like this one (uhh its just an example)
now under OnPlayerSpawn , I want to make all of them dance, so i got 2 solutions, either i make a loop or i just use switch statements
1-
or 2-
which is faster / less memory using ( btw in my real script i got over 36 case)
(+ please don't tell me you could use foreach, in my real script its not about players, i jus didnt find a good example)
pawn Код:
#define JOHN 0
#define DOG 1
#define DRAKE 2
#define MILEY 3
pawn Код:
stock MakePlayerDance(playerid)
{
//
}
1-
pawn Код:
for(new i = 0; i < 4; ++i) MakePlayerDance(i);
pawn Код:
switch(playerid)
{
case JOHN:
}
(+ please don't tell me you could use foreach, in my real script its not about players, i jus didnt find a good example)