A SendClientMessageToAll spam, any idea?
#4

It sends a message to all 'MAX_PLAYERS' times.

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;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)