OnPlayerDeath - Problem
#1

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:

Код:
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;
}
And DoHospital callback:

Код:
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
Reply


Messages In This Thread
OnPlayerDeath - Problem - by Arcanize - 19.06.2011, 14:08
Re: OnPlayerDeath - Problem - by Stigg - 19.06.2011, 14:39
Re: OnPlayerDeath - Problem - by Mr4rtur - 19.06.2011, 15:10
Re: OnPlayerDeath - Problem - by Arcanize - 19.06.2011, 16:16
Re: OnPlayerDeath - Problem - by Arcanize - 19.06.2011, 17:38
Re: OnPlayerDeath - Problem - by Scenario - 19.06.2011, 18:02
Re: OnPlayerDeath - Problem - by Arcanize - 19.06.2011, 18:14
Re: OnPlayerDeath - Problem - by Scenario - 19.06.2011, 18:17
Re: OnPlayerDeath - Problem - by Arcanize - 19.06.2011, 18:29
Re: OnPlayerDeath - Problem - by Arcanize - 20.06.2011, 01:41

Forum Jump:


Users browsing this thread: 1 Guest(s)