13.10.2012, 08:16
PHP Code:
INI_ParseFile
PHP Code:
PlayerInfo[playerid][pAdmin] = INI_Int(file, "Admin");
Give this command a shot!
PHP Code:
CMD:kick(playerid, params[])
{
new aname [MAX_PLAYER_NAME], reason[128], string[128], tname [MAX_PLAYER_NAME], targetid;
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, Red, "You must be a level 2 Admin to use this command!");
if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, Yellow, "Correct Usage: /kick [PlayerID] [Reason]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, Yellow, "Player is not connected to the server");
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
GetPlayerName(targetid, tname, MAX_PLAYER_NAME);
format(string, sizeof(string), "Admin %s has kicked %s. Reason: %s", aname, tname, reason);
SendClientMessageToAll(Yellow, string);
Kick(targetid);
return 1;
}