23.05.2011, 15:59
pawn Код:
new EsperandoAmbulancia[MAX_PLAYERS];
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
EsperandoAmbulancia[playerid] = 1;
if(EsperandoAmbulancia[playerid] == 1)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z);
TogglePlayerControllable(playerid, 0x0);
return 1;
}
return 1;
}
E depois faz um if no OnPlayerSpawn
pawn Код:
public OnPlayerSpawn(playerid)
{
EsperandoAmbulancia[playerid] = 0;
if(EsperandoAmbulancia[playerid] == 0)
{
SetPlayerPos(playerid, x, y, z); // Coloque as cordenadas que o jogador serб transferido apуs ser socorrido
TogglePlayerControllable(playerid, 0x1);
return 1;
}
return 1;
}