27.02.2013, 19:42
Como faзo pra colocar um comando para esse evento ?
pawn Код:
public PrepareKarting()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
{
CP[i] = 9;
SetPlayerCheckpoint(i,2308.3540,-2354.0039,12.6842,8.0);
SCM(i, COLOR_YELLOW, "A corrida de kart irб comeзar em 20 segundos, va atй a largada.");
}
}
}
SetTimer("StartKarting", 20000, 0);
return 1;
}
public StartKarting()
{
KartingRornd = 1;
StartingKartRornd = 0;
EndingKartRornd = 0;
FirstKartWinner = 999;
SecondKartWinner = 999;
ThirdKartWinner = 999;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
{
CP[i] = 10;
SCM(i, COLOR_YELLOW, "Sinal verde, GO, GO, GO!");
PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
SetPlayerCheckpoint(i,2308.3540,-2354.0039,12.6842,8.0);
}
}
}
SetTimer("KartingEnded", 240000, 0);
return 1;
}
public KartingEnded()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
{
CP[i] = 0;
DisablePlayerCheckpoint(i);
}
}
}
AnnorncedKartRornd = 0;
KartingRornd = 0;
return 1;
}