07.09.2015, 16:02
When my script recalls OnPlayerDeath it crashes/restarts the server, i looked in the logs and it showed nothing just it restarting.
here is my code,
here is my code,
Код:
public OnPlayerDeath(playerid, killerid, reason) { new Text3D:BrutWounded = Create3DTextLabel("(( THIS PLAYER IS BRUTALLY WOUNDED ))", 0xFF6347AA, 30.0, 20.0, 50.0, 20.0, 0); Attach3DTextLabelToPlayer(BrutWounded, playerid, 0.0, 0.0, 0.7); ClearAnimations(playerid); ApplyAnimation(playerid,"WUZI","CS_Dead_Guy",4.1,0,1,1,1,1); ApplyAnimation(playerid,"WUZI","CS_Dead_Guy",4.1,0,1,1,1,1); SetIntVar(playerid, "JustDied", 1); SavePlayerPos(playerid); SetNormalColor(playerid); TogglePlayerControllable(playerid, false); ResetVariables(playerid); FullResetPlayerWeapons(playerid); FullResetPlayerClothes(playerid); CheckPlayerCurrentCall(playerid); RemovePlayerMask(playerid); PutPlayer(playerid,PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]); SetInterior(playerid, PlayerInfo[playerid][pInt]); SetWorld(playerid, PlayerInfo[playerid][pWorld]); SetPlayerCameraLookAt(playerid, killerid); SetPlayerHealth(playerid, 15.0); GameTextForPlayer(playerid, "~b~Brutally Wounded", 5000, 3); GiveCash(playerid, -500); SCM(playerid, COLOR_PINK, "EMT: Your Medical Bills are $500"); SCM(playerid, COLOR_LIGHTRED, "You are Brutally Wounded. If a medic or anyone else doesn't save you, you will die."); SCM(playerid, COLOR_LIGHTRED, "To accept death type /acceptdeath"); SetHunger(playerid, 100.0); return 1; }