07.01.2019, 01:02
Eu vi que vocк colocou no OnPlayerSpawn porйm й mais certo colocar no OnPlayerDeath mesmo que nem vc coloco no Tнtulo do post :v
Se eu nгo me engano OnPlayerDeath nгo funciona com SetPlayerPos, apenas com SetSpawnInfo jб tive esse problema tbm. Pesquisei em alguns post do forum e alguns colocavam no OnPlayerSpawn e outros no OnPlayerDeath.
O Meu hoje da certo usando SetSpawnInfo na public OnPlayerDeath nгo sу quando o player se mata tbm quando e morto por alguйm.
Se eu nгo me engano OnPlayerDeath nгo funciona com SetPlayerPos, apenas com SetSpawnInfo jб tive esse problema tbm. Pesquisei em alguns post do forum e alguns colocavam no OnPlayerSpawn e outros no OnPlayerDeath.
O Meu hoje da certo usando SetSpawnInfo na public OnPlayerDeath nгo sу quando o player se mata tbm quando e morto por alguйm.
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(Player[playerid][PlayerHospital] == 1)
{
ClearAnimations(playerid);
SetSpawnInfo(playerid, 0, Player[playerid][Skin], 1173.1145, -1323.7125, 15.3962, 270.0000, 0, 0, 0, 0, 0, 0);
PlayerInfo[playerid][PlayerHospital] = -1;
SetCameraBehindPlayer(playerid);
MensagemAposMorrer(playerid);
}
else if(Player[playerid][PlayerHospital] == 2)
{
ClearAnimations(playerid);
// ...
}
return 1;
}