Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. CMD:kick(playerid,params[])
  2. {
  3. new string[128];
  4. new id;
  5. new target;
  6. new reason[56];
  7. if(sscanf(params, "u", id, string, target)) return SendClientMessage(playerid, -1, "Usage: /kick [playerid] [reason]");
  8. {
  9. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to be an RCON administrator to use this command.");
  10. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY, "That player is not connected.");
  11. format(string, sizeof(string), "%s has kicked %s reason: %s.", PlayerName(playerid), PlayerName(target), reason);
  12. SendClientMessageToAll(COLOR_ORANGE, string);
  13. format(string, sizeof(string), "You have kicked %s.", PlayerName(id));
  14. SendClientMessage(playerid, COLOR_ORANGE, string);
  15. format(string, sizeof(string), "%s has kicked you.", PlayerName(playerid));
  16. SendClientMessage(id, COLOR_ORANGE, string);
  17. Kick(id);
  18. }
  19. return 1;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement