Command ban not working
#1

Hey guys
i have a problem with my /ban command
when i ban someone he donґt get banned and he can play

pawn Код:
COMMAND:ban(playerid,params[])
{
    new id, grund[144];
    if(sscanf(params,"ds",id,grund)) return NoSuccess(playerid,"Usage: /ban <id> <reason>");
    if(Admin[playerid] < 2) return NoSuccess(playerid,"You cannot use this Command!");
    if(!IsPlayerConnected(id)) return NoSuccess(playerid,"Player is not connected!");

    format(str,144,"» Admin %s have banned %s. [Reason: %s]",pname[playerid],pname[id],grund);
    SendClientMessageToAll(rot,str);
    return 1;
}
Reply
#2

try this
pawn Код:
COMMAND:ban(playerid,params[])
{
    new id, grund[144];
    if(sscanf(params,"ds",id,grund)) return NoSuccess(playerid,"Usage: /ban <id> <reason>");
    if(Admin[playerid] < 2) return NoSuccess(playerid,"You cannot use this Command!");
    if(!IsPlayerConnected(id)) return NoSuccess(playerid,"Player is not connected!");

    format(str,144,"» Admin %s have banned %s. [Reason: %s]",pname[playerid],pname[id],grund);
    SendClientMessageToAll(rot,str);
    Ban(id);
    return 1;
}
Reply
#3

https://sampwiki.blast.hk/wiki/Ban
Reply
#4

It works.
Thanks @MrTinder
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)