03.09.2011, 19:45
Thats a bit of a mess, try this:
Quote:
CMD:kick(playerid, params[]) { if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command."); new reason[128], giveplayerid; if(AdminLevel[playerid] < 1) return SendClientMessage(playerid, COLOUR_GREY, "You are not authorized to use this command."); if(sscanf(params, "us[128]", giveplayerid, reason)) return SendClientMessage(playerid, COLOUR_GREY, "Usage: /kick [player id] [reason]"); if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOUR_GREY, "That player is not connected."); format(reason, sizeof(reason), "Admin %s Kicked %s [Reason : %s ]", GetNameEx(playerid), GetNameEx(giveplayerid), reason); SendClientMessageToAll(COLOUR_LIGHTRED, reason); Kick(giveplayerid); return 1; } |