Guest User

Untitled

a guest
Jun 18th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.86 KB | None | 0 0
  1. COMMAND:kick(playerid, params[])
  2. {
  3.     if(Players[playerid][AdminLevel] >= 1)
  4.     {
  5.         new player, reason[126], string[126];
  6.         if(sscanf(params, "us[126]", player, reason)) return SendClientMessage(playerid, COLOR_CREAM, "Command:{FFFFFF} /kick [Player ID/Part of Name] [Reason]");
  7.  
  8.         if(gIsPlayerLoggedIn[player])
  9.         {
  10.             format(string, sizeof(string), "AdmWarning:{FFFFFF} %s has just kicked %s from the server, reason: %s", playersname(playerid), playersname(player), reason);
  11.             SendClientMessageToAll(COLOR_RED, string);
  12.             Kick(player);
  13.             return 1;
  14.         }
  15.         else
  16.         {
  17.             SendClientMessage(playerid, COLOR_CREAM, "Error:{FFFFFF} That player is not logged in!");
  18.             return 1;
  19.         }
  20.     }
  21.     else
  22.     {
  23.         SendClientMessage(playerid, COLOR_CREAM, "Error:{FFFFFF} You are not authorized to use this command!");
  24.     }
  25.     return 1;
  26. }
Add Comment
Please, Sign In to add comment