14.06.2015, 17:56
any one can help when i ban some one ban message appears in chat but he do not get kick
CMD:ban(playerid, params[])
{
new TargetID,Reason[500];
if(!pInfo[playerid][LoggedInAsAdmin]) return SCM(playerid,COLOR_ERROR,""ERROR_MESSAGE"");
if(pInfo[playerid][Adminlevel] < 7) return SCM(playerid, COLOR_ERROR, ""ERROR_MESSAGE"");
if(sscanf(params, "us[500]", TargetID, Reason)) return SCM(playerid, COLOR_ERROR, "USAGE: /ban [id] [Reason]");
if(TargetID == INVALID_PLAYER_ID || !IsPlayerConnected(TargetID )) return SCM(playerid, COLOR_ERROR, ">>Player Is Not Connected.");
if(pInfo[TargetID][Adminlevel]) return SCM(playerid,COLOR_ERROR,"You Can't Use this Command On An Admin");
else
{
pInfo[TargetID][Banned] =true;
new str[128],str1[128];
format(str,sizeof(str),">> %s (%d) Has Been Banned By An Admin. Reason: %s", pInfo[TargetID][playername], TargetID, Reason);
SCMA(COLOR_ADMIN, str);
format(str1,sizeof(str1),">> BAN: %s (%d) (ADMIN BAN) Admin Ban", pInfo[TargetID][playername], TargetID);
SCMA(COLOR_ADMIN, str1);
ServerInfo[sHackers_banned]++;
SetTimerEx("ban", 1000, false, "i", TargetID);
print(str1);
}
return 1;
}
CMD:ban(playerid, params[])
{
new TargetID,Reason[500];
if(!pInfo[playerid][LoggedInAsAdmin]) return SCM(playerid,COLOR_ERROR,""ERROR_MESSAGE"");
if(pInfo[playerid][Adminlevel] < 7) return SCM(playerid, COLOR_ERROR, ""ERROR_MESSAGE"");
if(sscanf(params, "us[500]", TargetID, Reason)) return SCM(playerid, COLOR_ERROR, "USAGE: /ban [id] [Reason]");
if(TargetID == INVALID_PLAYER_ID || !IsPlayerConnected(TargetID )) return SCM(playerid, COLOR_ERROR, ">>Player Is Not Connected.");
if(pInfo[TargetID][Adminlevel]) return SCM(playerid,COLOR_ERROR,"You Can't Use this Command On An Admin");
else
{
pInfo[TargetID][Banned] =true;
new str[128],str1[128];
format(str,sizeof(str),">> %s (%d) Has Been Banned By An Admin. Reason: %s", pInfo[TargetID][playername], TargetID, Reason);
SCMA(COLOR_ADMIN, str);
format(str1,sizeof(str1),">> BAN: %s (%d) (ADMIN BAN) Admin Ban", pInfo[TargetID][playername], TargetID);
SCMA(COLOR_ADMIN, str1);
ServerInfo[sHackers_banned]++;
SetTimerEx("ban", 1000, false, "i", TargetID);
print(str1);
}
return 1;
}