Not reading the code? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Not reading the code? (
/showthread.php?tid=271060)
Not reading the code? -
cloudysky - 22.07.2011
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo[playerid][Dead] = 1;
SaveWeapons(playerid);
GameTextForPlayer(playerid,"~w~Wasted",3000,2);
SendDeathMessage(killerid, playerid, reason);
PlayerInfo[killerid][Kills]++;
PlayerInfo[playerid][Deaths]++;
GivePlayerMoney(killerid, 50);
SaveUser(killerid);
SaveUser(playerid);
return 1;
}
It cuts off reading half way through that code. Can anyone help me fix it?
Re: Not reading the code? -
MadeMan - 22.07.2011
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo[playerid][Dead] = 1;
SaveWeapons(playerid);
GameTextForPlayer(playerid,"~w~Wasted",3000,2);
SendDeathMessage(killerid, playerid, reason);
PlayerInfo[playerid][Deaths]++;
SaveUser(playerid);
if(IsPlayerConnected(killerid))
{
PlayerInfo[killerid][Kills]++;
GivePlayerMoney(killerid, 50);
SaveUser(killerid);
}
return 1;
}