31.05.2014, 17:34
You have to put that script snippet above the code in which everything is done... Like this:
The strlen stuff must be above. So the correct one is:
pawn Код:
CMD:banme(playerid,params[])
{
new reason[15]
if(sscanf(params,"s[15]",reason)) return SendClientMessage(playerid,-1,"Learn to use the command /banme you idiot.");
Ban(playerid);
if(strlen(reason) > 15) return SendClientMessage(playerid,-1,"Don't spam.");//this must be above "Ban(playerid);"
}
pawn Код:
CMD:banme(playerid,params[])
{
new reason[15]
if(sscanf(params,"s[15]",reason)) return SendClientMessage(playerid,-1,"Learn to use the command /banme you idiot.");
if(strlen(reason) > 15) return SendClientMessage(playerid,-1,"Don't spam.");//Right here it must be.
Ban(playerid);
}