06.08.2011, 16:24
i dont know the ban command in DAYS but here's the kick command:
you need to change
this line according to your variables..
if this gives errors you can tell here..
pawn Код:
command(kick, playerid, params[])
{
new reason[128], pname[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME], str[128], ID;
GetPlayerName(playerid, aname, sizeof(aname));
if(PlayerInfo[playerid][pAdminLevel] >= 1) {
if(sscanf(params, "us[128]", ID, reason)) {
SendClientMessage(playerid, red, "Usage: /kick [playerid] [reason]");
return 1;
}
if(!IsPlayerConnected(ID)) {
SendClientMessage(playerid, red, "INVALID ID");
return 1;
}
GetPlayerName(ID, pname, sizeof(pname));
format(str, sizeof(str), "Admin {4ADAED}%s(%d){FF0000} has kicked {5F4AED}%s(%d){FF0000} Reason: %s", aname, playerid, pname, ID, reason);
SendClientMessageToAll(red, str);
Kick(ID);
return 1;
}
else if(PlayerInfo[playerid][pAdminLevel] < 1) {
SendClientMessage(playerid, red, "You are not an Admin!");
}
return 1;
}
pawn Код:
if(PlayerInfo[playerid][pAdminLevel] >= 1) {
if this gives errors you can tell here..