Posts: 303
Threads: 71
Joined: Mar 2011
Quote:
Originally Posted by Dr
pawn Код:
new KillerTime[MAX_PLAYERS]; new KillerLevel[MAX_PLAYERS]; forward KillerTimer(playerid); public OnPlayerDeath(playerid, killerid, reason) { KillerLevel[killerid] += 4; SetPlayerWantedLevel(killerid, KillerLevel[killerid]); KillerTime[killerid] = SetTimerEx("KillerTimer", 300000, true, "u", killerid); SendClientMessage(COLOR_WHITE, killerid, "You are now wanted for murder, you will lose a star every 5 minutes"); return 1; }
public KillerTimer(playerid) { if(KillerLevel[playerid] > 0) { KillerLevel[playerid]--; SetPlayerWantedLevel(playerid, KillerLevel[playerid]); } else { KillerLevel[playerid] = 0; SendClientMessage(COLOR_WHITE, playerid, "You are now free, and not wanted anymore"); SetPlayerWantedLevel(playerid, 0); KillTimer(KillerTime[playerid]); } return 1; }
|
May I just say you are the best coder I've ever met!
Thanks so much! +rep!