04.10.2012, 16:20
It sends a message to all 'MAX_PLAYERS' times.
Put it out of the loop.
Put it out of the loop.
pawn Код:
forward EndDerby(playerid);
public EndDerby(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPVarInt(playerid,"derby") == 1)
{
DestroyVehicle(GetPlayerVehicleID(playerid));
SpawnPlayer(playerid);
EnableDerby = 0;
SetPVarInt(playerid,"derby", 0);
}
else
{
EnableDerby = 0;
SetPVarInt(playerid,"derby", 0);
SetPVarInt(playerid, "HasSpawnedCar",0);
timerr[playerid][DTIMER] = SetTimer("StartDerby", 120000, false);
KillTimer(timerr[playerid][EDERBY]);
KillTimer(timerr[playerid][STIMER]);
}
}
SendClientMessageToAll(COLOR_GREEN,"[SERVER] Derby has been ended!"cyellow" Everyone in derby has been spawned!");
SendClientMessageToAll(COLOR_GREEN,"[SERVER] New derby will be there in "cred"2 minutes!"cgreen" Kindly stay connected!");
return 1;
}