03.01.2015, 04:07
(
Последний раз редактировалось sgtph3n1x; 03.01.2015 в 10:47.
)
So here is my issue I am trying to add a "Crime Report" that is sent to the the Police when a player kills another player Via (OnPlayerDeath), well so far it works, it does give killerid a wanted level if they killed another player. But.. if a player dies (from a non valid reason, suicide, fall, exposion, fire etc..) It will get sent to the police channel though they haven't killed anyone, But they DO NOT GET A WANTED LEVEL, and the police channel is sent a bogus message..
Note: I am a officer, it is not sending to all the players.
Screenshot was for reference.
This is the code I am working with..
I have attached a screenshot of it in game aswell.
Note: I am a officer, it is not sending to all the players.
Screenshot was for reference.
This is the code I am working with..
Код:
public OnPlayerDeath(playerid, killerid, reason) { new oldlevel; new newlevel; oldlevel = GetPlayerWantedLevel(killerid); newlevel = oldlevel + 1; //if(!(killerid) && reason != 53) SendDeathMessage(killerid, playerid, reason); // Doesn't work.. SetPlayerWantedLevel(killerid, newlevel); //SetPlayerWantedLevel(playerid, 0); // Removes wanted players killer, wanted level SendClientMessage(killerid, COP_COLOR ,"You have committed a crime, FIRST DEGREE MURDER."); new string[256], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "NEW CRIME REPORT: First Degree Murder, SUSPECT: {AFAFAF}%s{375FFF}", name); //PlayCrimeReportForPlayer(string, 0, 3); //Not implemented yet return TeamChat(string); }