jlalt

911

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