Quote:
Originally Posted by RodrigoMSR
Isso ocorre pelo uso da funзгo SpawnPlayer apуs o jogador ser morto, usando a funзгo abaixo vocк nгo terб mais esses problemas:
PHP код:
forward Spawn(playerid);
public Spawn(playerid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
{
TogglePlayerSpectating(playerid, false);
SetSpawnInfo(playerid, NO_TEAM, GetPlayerSkin(playerid), 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
}
else
{
if(GetPlayerState(playerid) != PLAYER_STATE_WASTED)
{
Eject(playerid);
SpawnPlayer(playerid);
}
}
return 1;
}
forward Eject(playerid);
public Eject(playerid)
{
if(!IsPlayerInAnyVehicle(playerid)) return 0;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z+3);
return 1;
}
Substitua SpawnPlayer por Spawn nos seus cуdigos.
|
Tem o SetPlayerSpawn , muda tambem por spawn?