Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:kick(playerid,params[])
- {
- new string[128];
- new id;
- new target;
- new reason[56];
- if(sscanf(params, "u", id, string, target)) return SendClientMessage(playerid, -1, "Usage: /kick [playerid] [reason]");
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to be an RCON administrator to use this command.");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY, "That player is not connected.");
- format(string, sizeof(string), "%s has kicked %s reason: %s.", PlayerName(playerid), PlayerName(target), reason);
- SendClientMessageToAll(COLOR_ORANGE, string);
- format(string, sizeof(string), "You have kicked %s.", PlayerName(id));
- SendClientMessage(playerid, COLOR_ORANGE, string);
- format(string, sizeof(string), "%s has kicked you.", PlayerName(playerid));
- SendClientMessage(id, COLOR_ORANGE, string);
- Kick(id);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement