Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new JustReported[MAX_PLAYERS];
- public showall(playerid)
- {
- TextDrawShowForPlayer(playerid, tdtitle);
- for (new i; i < 7; i++) TextDrawShowForPlayer(playerid, options[i]);
- TextDrawShowForPlayer(playerid, cancel);
- TextDrawHideForPlayer(playerid, killspree1);
- TextDrawHideForPlayer(playerid, killspree2);
- TextDrawHideForPlayer(playerid, killspree3);
- TextDrawHideForPlayer(playerid, killspree4);
- TextDrawHideForPlayer(playerid, killspree5);
- TextDrawHideForPlayer(playerid, killspreef1);
- TextDrawHideForPlayer(playerid, killspreef2);
- TextDrawHideForPlayer(playerid, killspreef3);
- TextDrawHideForPlayer(playerid, killspreef4);
- TextDrawHideForPlayer(playerid, killspreef5);
- }
- forward ReportReset(playerid);
- public ReportReset(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(JustReported[playerid] == 1)
- {
- JustReported[playerid] = 0;
- }
- }
- }
- public hideall(playerid)
- {
- hidesuba(playerid);
- hidesubb(playerid);
- hidesubc(playerid);
- hidesubd(playerid);
- TextDrawHideForPlayer(playerid,tdtitle);
- for (new i; i < 7; i++) TextDrawHideForPlayer(playerid,options[i]);
- TextDrawHideForPlayer(playerid,cancel);
- if(killspree[playerid] == 0)
- {
- TextDrawShowForPlayer(playerid, killspreef1);
- TextDrawShowForPlayer(playerid, killspreef2);
- TextDrawShowForPlayer(playerid, killspreef3);
- TextDrawShowForPlayer(playerid, killspreef4);
- TextDrawShowForPlayer(playerid, killspreef5);
- }
- else if(killspree[playerid] == 1)
- {
- TextDrawShowForPlayer(playerid, killspree1);
- TextDrawShowForPlayer(playerid, killspreef2);
- TextDrawShowForPlayer(playerid, killspreef3);
- TextDrawShowForPlayer(playerid, killspreef4);
- TextDrawShowForPlayer(playerid, killspreef5);
- }
- else if(killspree[playerid] == 2)
- {
- TextDrawShowForPlayer(playerid, killspree1);
- TextDrawShowForPlayer(playerid, killspree2);
- TextDrawShowForPlayer(playerid, killspreef3);
- TextDrawShowForPlayer(playerid, killspreef4);
- TextDrawShowForPlayer(playerid, killspreef5);
- }
- else if(killspree[playerid] == 3)
- {
- TextDrawShowForPlayer(playerid, killspree1);
- TextDrawShowForPlayer(playerid, killspree2);
- TextDrawShowForPlayer(playerid, killspree3);
- TextDrawShowForPlayer(playerid, killspreef4);
- TextDrawShowForPlayer(playerid, killspreef5);
- }
- else if(killspree[playerid] == 4)
- {
- TextDrawShowForPlayer(playerid, killspree1);
- TextDrawShowForPlayer(playerid, killspree2);
- TextDrawShowForPlayer(playerid, killspree3);
- TextDrawShowForPlayer(playerid, killspree4);
- TextDrawShowForPlayer(playerid, killspreef5);
- }
- else if(killspree[playerid] >= 5)
- {
- TextDrawShowForPlayer(playerid, killspree1);
- TextDrawShowForPlayer(playerid, killspree2);
- TextDrawShowForPlayer(playerid, killspree3);
- TextDrawShowForPlayer(playerid, killspree4);
- TextDrawShowForPlayer(playerid, killspree5);
- }
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if (killerid != INVALID_PLAYER_ID && !IsPlayerInDuel(playerid) && posstate_{killerid} != 7 && posstate_{killerid} != 8 && posstate_{killerid} != 9)
- {
- killspree[killerid]++;
- if(killspree[killerid] == 1)
- {
- TextDrawShowForPlayer(killerid, killspree1);
- TextDrawHideForPlayer(killerid, killspreef1);
- }
- if(killspree[killerid] == 2)
- {
- TextDrawHideForPlayer(killerid, killspreef2);
- TextDrawShowForPlayer(killerid, killspree2);
- }
- if(killspree[killerid] == 3)
- {
- TextDrawHideForPlayer(killerid, killspreef3);
- TextDrawShowForPlayer(killerid, killspree3);
- }
- if(killspree[killerid] == 4)
- {
- TextDrawHideForPlayer(killerid, killspreef4);
- TextDrawShowForPlayer(killerid, killspree4);
- }
- if(killspree[killerid] == 5)
- {
- TextDrawHideForPlayer(killerid, killspreef5);
- TextDrawShowForPlayer(killerid, killspree5);
- }
- if (killspree[killerid] >= 5)
- {
- format(msg, sizeof(msg), "%s now has a killing spree of %d!", Name[killerid], killspree[killerid]);
- SendClientMessageToAll(0x46A2DBFF, msg);
- }
- if (killspree[playerid] >= 5 && killerid != INVALID_PLAYER_ID)
- {
- format(msg, sizeof(msg), "%s has ended %s's killing spree of %d kills.", Name[killerid], Name[playerid], killspree[playerid]);
- SendClientMessageToAll(0x46A2DBFF, msg);
- format(msg, sizeof(msg), "You have earned $%d for killing ending %s's killing spree.", killspree[playerid] * 10000, Name[playerid]);
- SendClientMessage(killerid, 0x46A2DBFF, msg);
- GivePlayerMoney(killerid, killspree[playerid] * 10000);
- TextDrawShowForPlayer(playerid, killspree1);
- TextDrawShowForPlayer(playerid, killspree2);
- TextDrawShowForPlayer(playerid, killspree3);
- TextDrawShowForPlayer(playerid, killspree4);
- TextDrawShowForPlayer(playerid, killspree5);
- TextDrawHideForPlayer(playerid, killspreef1);
- TextDrawHideForPlayer(playerid, killspreef2);
- TextDrawHideForPlayer(playerid, killspreef3);
- TextDrawHideForPlayer(playerid, killspreef4);
- TextDrawHideForPlayer(playerid, killspreef5);
- }
- killspree[playerid] = 0;
- }
- return 1;
- }
- CMD:report(playerid, params[])
- {
- if (isnull(params)) return SendClientMessage(playerid, ERRORCOLOR, "To talk to an admin start your message with @ or use /report [message]");
- // if (Duty[playerid][aDuty] == 1) return SendClientMessage(playerid, ERRORCOLOR, "You cannot send any report while on duty");
- if(beenacceptedfrom[playerid] != -1) return SendClientMessage(playerid, ERRORCOLOR, "You have already an active report");
- if (JustReported[playerid] == 1) return SendClientMessage(playerid, ERRORCOLOR, "Please wait 15 seconds before sending a next report.");
- new msg[144];
- Reported[playerid] = 1;
- format(msg, sizeof(msg), "{FF0000}Report from %s(ID:%d): %s", Name[playerid], playerid);
- if (strlen(msg) + strlen(params) > 144) return 1;
- strcat(msg, params);
- SendMessageToAdmins(1, msg);
- JustReported[playerid] = 1;
- SetTimerEx("ReportReset", 15000, false, "i", playerid);
- format(msg, sizeof(msg), "1,4Report From %s(ID:%d): %s", Name[playerid], playerid, params);
- IRC_SendMessageToAdmins(2, msg);
- SendClientMessage(playerid, -1, "{00CC00}Your message has been sent to our administrators.");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement