public OnPlayerSpawn(playerid)
{
if(playerid == 0)
{
SendClientMessage(playerid, -1, "Mapa: {FF8000}Teenage Illusion, by TheMagnus (Equipe C.W.M){FFFFFF}. Vocк estarб ocupando a primeira posiзгo da corrida.");
CarroDoPlayer[playerid] = carro0;
SetPlayerPos(playerid, 918.1279,-4503.1074,12.5295);
SetTimer("Player0", 3000, false);
TogglePlayerControllable(playerid, false);
}
if(playerid == 1)
{
SendClientMessage(playerid, -1, "Mapa: {FF8000}Teenage Illusion, by TheMagnus (Equipe C.W.M){FFFFFF}. Vocк estarб ocupando a segunda posiзгo da corrida.");
CarroDoPlayer[playerid] = carro1;
SetPlayerPos(playerid, 918.1279,-4503.1074,12.5295);
SetTimer("Player1", 3000, false);
TogglePlayerControllable(playerid, false);
}
return 1;
}
forward Player0(playerid);
public Player0(playerid)
{
carro0 = AddStaticVehicleEx(411,911.08850098,-4468.42871094,12.32951832,180.00000000,-1,-1,15); //Infernus
PutPlayerInVehicle(playerid, carro0, 0);
CarroDoPlayer[playerid] = carro0;
if(CorridaComecou == false)
{
TogglePlayerControllable(playerid, false);
}
else if(CorridaComecou == true)
{
TogglePlayerControllable(playerid, true);
}
return 1;
}
forward Player1(playerid);
public Player1(playerid)
{
carro1 = AddStaticVehicleEx(411,915.64196777,-4468.69628906,12.32951832,180.00000000,-1,-1,15); //Infernus
PutPlayerInVehicle(playerid, carro1, 0);
CarroDoPlayer[playerid] = carro1;
if(CorridaComecou == false)
{
TogglePlayerControllable(playerid, false);
}
else if(CorridaComecou == true)
{
TogglePlayerControllable(playerid, true);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(playerid == 0)
{
SendClientMessage(playerid, -1, "Mapa: {FF8000}Teenage Illusion, by TheMagnus (Equipe C.W.M){FFFFFF}. Vocк estarб ocupando a primeira posiзгo da corrida.");
CarroDoPlayer[playerid] = carro0;
SetPlayerPos(playerid, 918.1279,-4503.1074,12.5295);
SetTimerEx("Player0", 3000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
}
if(playerid == 1)
{
SendClientMessage(playerid, -1, "Mapa: {FF8000}Teenage Illusion, by TheMagnus (Equipe C.W.M){FFFFFF}. Vocк estarб ocupando a segunda posiзгo da corrida.");
CarroDoPlayer[playerid] = carro1;
SetPlayerPos(playerid, 918.1279,-4503.1074,12.5295);
SetTimerEx("Player1", 3000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
}
return 1;
}
forward Player0(playerid);
public Player0(playerid)
{
carro0 = AddStaticVehicleEx(411,911.08850098,-4468.42871094,12.32951832,180.00000000,-1,-1,15); //Infernus
PutPlayerInVehicle(playerid, carro0, 0);
CarroDoPlayer[playerid] = carro0;
if(CorridaComecou == false)
{
TogglePlayerControllable(playerid, false);
}
else if(CorridaComecou == true)
{
TogglePlayerControllable(playerid, true);
}
return 1;
}
forward Player1(playerid);
public Player1(playerid)
{
carro1 = AddStaticVehicleEx(411,915.64196777,-4468.69628906,12.32951832,180.00000000,-1,-1,15); //Infernus
PutPlayerInVehicle(playerid, carro1, 0);
CarroDoPlayer[playerid] = carro1;
if(CorridaComecou == false)
{
TogglePlayerControllable(playerid, false);
}
else if(CorridaComecou == true)
{
TogglePlayerControllable(playerid, true);
}
return 1;
}
Cara, sempre que quiser que um SetTimer execute dentro de uma funзгo e nгo para o servidor todo, utilize SetTimerEx.
@Edit Agora que fui ver que a Carol postou. FUU UHEUUHEUHEUH |
forward Preparar(allplayers);
public Preparar(allplayers)
{
GameTextForPlayer(allplayers, "~r~Atencao!!! ~n~ ~w~ A corrida comeзa em ~p~10~w~ segundos~n~~n~Corrida Atual: ~p~Teenage Illusion", 4000, 3);
SetTimer("GameUm", 7000, false);
return 1;
}
forward Preparar(allplayers);
public Preparar(allplayers)
{
GameTextForAll("~r~Atencao!!! ~n~ ~w~ A corrida comeзa em ~p~10~w~ segundos~n~~n~Corrida Atual: ~p~Teenage Illusion", 4000, 3);
SetTimer("GameUm", 7000, false);
return 1;
}