30.06.2013, 01:20
(
Последний раз редактировалось exclide1; 30.06.2013 в 02:55.
)
Hello. I'm scripting an event-system and I want it so, when player joins the event, it will save his team to the variable and then, when event ends/he leaves it will set it back. Is this the correct way to do it?
I want to make sure I got it right.
pawn Код:
new teamcrap[MAX_PLAYERS];
CMD:join(playerid,params[])
{
teamcrap[playerid] = GetPlayerTeam(playerid);
joined[playerid] = 1;
return 1;
}
CMD:endevent(playerid,params[])
{
foreach (new i : Player)
{
if(joined[i] == 1)
{
joined[i] = 0;
SetPlayerTeam(i, teamcrap[i]);
}
}
return 1;
}