28.07.2013, 19:15
I'm having a problem, can't seem to find the solution to it, I only ask for help here when I have searched for hours and can't find anything, so hopefully you guys can help me out, but my kick/ban/set admin level command resets the server
It works all fine on my test server, which isn't hosted, which is on my own ip. But those same commands on the host keeps resetting the server as they are used etc..
here's my kick command so you guys can see if there's any issues with it or something
It works all fine on my test server, which isn't hosted, which is on my own ip. But those same commands on the host keeps resetting the server as they are used etc..
here's my kick command so you guys can see if there's any issues with it or something
pawn Код:
CMD:kick(playerid,params[])
{
new string[200];
if(pInfo[playerid][Adminlevel] < 2) return SendClientMessage(playerid, COLOR_ERROR, "Error: Insufficient Permission");
if(sscanf(params, "us[200]", ID, string))
{
SendClientMessage(playerid, COLOR_ADCMD, "Usage: /kick (id) (reason)");
SendClientMessage(playerid, COLOR_ADCMD2, "Function: Will kick the specified player");
return 1;
}
if(pInfo[ID][Adminlevel] > pInfo[playerid][Adminlevel])
{
SendClientMessage(playerid, COLOR_ERROR, "Error: You cannot kick higher level staff members");
return 1;
}
if(pInfo[playerid][Adminlevel] >= 2)
{
if(IsPlayerConnected(ID) && ID != INVALID_PLAYER_ID)
{
format(string, sizeof(string), "**%s(%d) has been kicked by an Administrator | Reason: %s", GetName(ID), ID, string);
SendClientMessageToAll(COLOR_LIGHTRED, string);
format(string, sizeof(string), "**%s has been kicked by Administrator %s | Reason: %s", GetName(ID), GetName(playerid), string);
SaveIn("KickLog",string);
pInfo[ID][Kicked] ++;
SetTimerEx("KickEx", 500, false, "d", ID);
return 1;
}
}
return 1;
}


