jlalt

911

Feb 25th, 2016
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.05 KB | None | 0 0
  1. forward MessageToP(color,const string[]);
  2. public MessageToP(color,const string[])
  3. {
  4.     for(new i = 0; i < MAX_PLAYERS; i++)
  5.     {
  6.         SendClientMessage(i, color, string);
  7.         else if(IsPlayerConnected(i) == 1) if (PlayerInfo[i][Level] >= 1) SendClientMessage(i, color, string);
  8.     }
  9.     return 1;
  10. }
  11.  
  12. CMD:911(playerid, params[]) {
  13.    if(PlayerInfo[playerid][LoggedIn] == 1){
  14.       new reported,reason[90];
  15.       if(sscanf(params,"is",reported,reason)) return SendClientMessage(playerid,red,"Usage: /911 [playerid] [reason]");
  16.       new suspect[MAX_PLAYER_NAME], rsuspect[MAX_PLAYER_NAME], str[128];
  17.       GetPlayerName(reported, suspect, sizeof(suspect));
  18.       GetPlayerName(playerid, rsuspect, sizeof(rsuspect));
  19.       format(str, sizeof(str), "Police Call: %s(Id:%d) Reported %s(Id:%d) Reason: %s", rsuspect,playerid, suspect, reported, reason);
  20.       MessageToP(COLOR_RED,str);
  21.       return SendClientMessage(playerid,yellow, "|- Thanks For Calling Police Your Report will be  -|");
  22.    } else return SendClientMessage(playerid,red,"ERROR: Invalid reason to report that player!");
  23. }
Advertisement
Add Comment
Please, Sign In to add comment