Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COMMAND:kick(playerid, params[])
- {
- if(Players[playerid][AdminLevel] >= 1)
- {
- new player, reason[126], string[126];
- if(sscanf(params, "us[126]", player, reason)) return SendClientMessage(playerid, COLOR_CREAM, "Command:{FFFFFF} /kick [Player ID/Part of Name] [Reason]");
- if(gIsPlayerLoggedIn[player])
- {
- format(string, sizeof(string), "AdmWarning:{FFFFFF} %s has just kicked %s from the server, reason: %s", playersname(playerid), playersname(player), reason);
- SendClientMessageToAll(COLOR_RED, string);
- Kick(player);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_CREAM, "Error:{FFFFFF} That player is not logged in!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_CREAM, "Error:{FFFFFF} You are not authorized to use this command!");
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment