SA-MP Forums Archive
Command ban not working - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command ban not working (/showthread.php?tid=426873)



Command ban not working - LuffyD - 30.03.2013

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;
}



Re: Command ban not working - MrTinder - 30.03.2013

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;
}



Re: Command ban not working - emokidx - 30.03.2013

https://sampwiki.blast.hk/wiki/Ban


AW: Command ban not working - LuffyD - 30.03.2013

It works.
Thanks @MrTinder