crash[detect] - 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: crash[detect] (
/showthread.php?tid=509589)
crash[detect] -
Snoopythekill - 27.04.2014
edited.. fixed.
AW: Re: crash[detect] -
Snoopythekill - 27.04.2014
Quote:
Originally Posted by Y_Less
You are probably not checking if "killerid" is a valid player, as it won't be when someone kills themselves.
|
yes, it's exactly what happened, I solved it doing what you told me, thank you very much Y_Less
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
if(killerid != INVALID_PLAYER_ID)
{
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
PlayerInfo[killerid][Experiencia]++;
}
PlayerInfo[playerid][Deaths]++;
PlayerInfo[playerid][Deaths]++;
...
return 1;
}