03.04.2013, 22:09
I have this on my server but for some strange reason makes the server crash when some one joins/leaves the server. I already try testing to see if is being caused by any FS but no. I memorized to see if I had done something to the server but no, that is the only thing a have recently changed. I really need help, I can't see the problem.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid,playerid,reason); //Sending the death msg
if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
{
SetPlayerScore(killerid, GetPlayerScore(killerid) + 2); //Giving +2 score to the killer
GivePlayerMoney(killerid, 100); //Giving 100$ to the killer
GivePlayerMoney(playerid, -100); //taking 100$ from the player that died
SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
}
return 1;
}