19.06.2011, 14:08
Hey!
I got problem with my OnPlayerDeath public or callback.
If i die, the server puts me in random spawns and change my skin to CJ's.
- Sometimes if I die, then the server says: "Stay within the world Boundries". And the monitor starts blinging (white-white-white).
______________
Here's my callback:
And DoHospital callback:
Thanks,
Arcanize
I got problem with my OnPlayerDeath public or callback.
If i die, the server puts me in random spawns and change my skin to CJ's.
- Sometimes if I die, then the server says: "Stay within the world Boundries". And the monitor starts blinging (white-white-white).
______________
Here's my callback:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
DoHospital(playerid);
pStats[playerid][pHospitalized] = 1;
// Teeb skinni korda
SetPlayerSkin(playerid, GetPlayerSkin(playerid));
pStats[playerid][pSkin] = GetPlayerSkin(playerid);
// -------------------------------------------------
pStats[playerid][pCopDuty] = 0;
DisablePlayerCheckpoint(playerid);
// -------------------------------------------------
OnPlayerDataSave(playerid);
return 1;
}
Код:
public DoHospital(playerid)
{
SendClientMessage(playerid, COLOR_YELLOW2, "Sa oled kriitiliselt vigastatud ja sind viidi haiglasse!");
SetPlayerPos(playerid, 1236.6205,306.6172,26.3991);
SetPlayerCameraPos(playerid, 1199.2200,296.6742,33.2644);
SetPlayerCameraLookAt(playerid, 1223.1254,304.0070,19.5754);
SetPlayerFacingAngle(playerid, 90.0769);
TogglePlayerControllable(playerid, false);
SetTimerEx("ReleaseFromHospital", 50000, 0, "d", playerid);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
Thanks,
Arcanize


