SA-MP Forums Archive
Server Restarts On Death? [Rep+] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Server Restarts On Death? [Rep+] (/showthread.php?tid=331464)



Server Restarts On Death? [Rep+] - stormchaser206 - 04.04.2012

My server restarts for some reason when someone dies. The code compiles fine, but ingame, when someone dies, the server restarts.
http://pastebin.com/BK16v3jP

Please reply fast.


Re: Server Restarts On Death? [Rep+] - TzAkS. - 04.04.2012

In server.log is writing something when is crashing?

Try changin OnPlayerDeath with this.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));

    SendDeathMessage(playerid, killerid, reason);
    SendClientMessage(playerid, 0xFF0000FF, "You have died!");
    new string[32];
    format(string, sizeof(string), "%s has Died!",name);
    SendClientMessageToAll(0xFF0000FF, string);
    return 1;
}



Re: Server Restarts On Death? [Rep+] - jaheem - 04.04.2012

you forget to put string onplayerdeath
this cause the crash
SendClientMessageToAll(0xFF0000FF, "%s has Died!",name);


Re: Server Restarts On Death? [Rep+] - stormchaser206 - 04.04.2012

Admin please lock + think TzAkS.

Rep+