14.03.2019, 20:15
There is no need to place the "playersteleported" check inside the loop.
And he asked for a limit of 10, not more than 11.
And he asked for a limit of 10, not more than 11.
pawn Код:
new PlayersInEvent = 0;
CMD:tpevent(playerid, params[])
{
if(PlayersInEvent >= 10) return SCM(playerid, -1, "Event is full.");
foreach(new i : Player)
{
if(EventOrganizer[i] == 1) GetPlayerPos(i, Float, Float:y, Float:z);
}
SetPlayerPos(playerid, Float, Float:y, Float:z);
PlayersInEvent++
return 1;
}