15.09.2012, 13:11
..( Here's the same, but in English -- ' )
Код:
public OnPlayerDeath(playerid, killerid, reason) { if(killerid == INVALID_PLAYER_ID) { SendDeathMessage(INVALID_PLAYER_ID,playerid,reason); SetPlayerScore(killerid, GetPlayerMoney(killerid)); SetPlayerWantedLevel(killerid,0); } else { if(gTeam[killerid] == Swat) { if(gTeam[killerid] != gTeam[playerid]) { if(GetPlayerWantedLevel(playerid) > 3) { SendDeathMessage(killerid,playerid,reason); SendClientMessage(killerid,Yellow,"Good, you catched a criminal."); SetPlayerWantedLevel(killerid,0); GivePlayerMoney(killerid, GetPlayerWantedLevel(playerid)*100); SetPlayerWantedLevel(playerid,0); SetPlayerScore(killerid,GetPlayerMoney(killerid)); SetPlayerScore(playerid,GetPlayerMoney(playerid)); } else { SendDeathMessage(killerid,playerid,reason); SendClientMessage(killerid,Red,"He's too weak for you."); SetPlayerWantedLevel(killerid,0); GivePlayerMoney(killerid, -100); SetPlayerWantedLevel(playerid,0); SetPlayerScore(killerid,GetPlayerMoney(killerid)); SetPlayerScore(playerid,GetPlayerMoney(playerid)); } } else { SendClientMessage(killerid,Red,"Don't kill your friends."); SetPlayerWantedLevel(killerid,0); GivePlayerMoney(killerid,-400); SetPlayerScore(killerid,GetPlayerMoney(killerid)); SetPlayerScore(playerid,GetPlayerMoney(playerid)); } } { if(gTeam[killerid] == Cops) { if(gTeam[killerid] != gTeam[playerid]) { if(GetPlayerWantedLevel(playerid) <= 0) { SendDeathMessage(killerid,playerid,reason); SendClientMessage(killerid,Red,"Hes too weak."); GivePlayerMoney(killerid, -100); SetPlayerWantedLevel(playerid,0); SetPlayerScore(killerid,GetPlayerMoney(killerid)); SetPlayerScore(playerid,GetPlayerMoney(playerid)); } else { SendDeathMessage(killerid,playerid,reason); SendClientMessage(killerid,Yellow,"Nice you catched a criminal"); GivePlayerMoney(killerid, GetPlayerWantedLevel(playerid)*100); SetPlayerWantedLevel(playerid,0); SetPlayerScore(killerid,GetPlayerMoney(killerid)); SetPlayerScore(playerid,GetPlayerMoney(playerid)); } } else { SendClientMessage(killerid,Red,"Dont kill your friend"); GivePlayerMoney(killerid,-400); SetPlayerScore(killerid,GetPlayerMoney(killerid)); SetPlayerScore(playerid,GetPlayerMoney(playerid)); } } } } if(gTeam[killerid] != Cops) { SendDeathMessage(killerid,playerid,reason); GivePlayerMoney(killerid, 100); SetPlayerScore(killerid,GetPlayerMoney(killerid)); SetPlayerWantedLevel(playerid,0); SetPlayerWantedLevel(killerid,GetPlayerWantedLevel(killerid) + 2); if(GetPlayerWantedLevel(killerid) >= 1) SetPlayerColor(killerid,Yellow); if(GetPlayerWantedLevel(killerid) >= 4) SetPlayerColor(killerid,Orange); SetPlayerScore(playerid,GetPlayerMoney(playerid)); } GameTextForPlayer(playerid, "Wasted", 3500, 2); return 1; }