SA-MP Forums Archive
something is wrong in my cmd - 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: something is wrong in my cmd (/showthread.php?tid=546715)



something is wrong in my cmd - Kells - 17.11.2014

Код:
dcmd_banip(playerid,params[])
{
    new ip[32], dformat[64];
    if(AccInfo[playerid][Level] >= 5) return SendClientMessage(playerid,0xff0000ff,"You Are Not Admin!");
    if(sscanf(params,"s[32]",ip)) return SendClientMessage(playerid,LIGHTBLUE2,"USAGE: /unbanip [ip]");
    if(sscanf(params,"s[32]",ip)) return SendClientMessage(playerid,orange,"Function: Will UnBan the Ip Of specified player");
    format(dformat,sizeof dformat,"banip %s",ip);
    SendRconCommand(dformat);
    return 1;
}
And When i use it The Script dosen't even load .. Any suggestions?


Re: something is wrong in my cmd - Accent - 17.11.2014

Код:
dcmd_banip(playerid,params[])
{
    new ip[32], dformat[64];
    if(AccInfo[playerid][Level] >= 5) return SendClientMessage(playerid,0xff0000ff,"You Are Not Admin!");
    if(sscanf(params,"s[32]",ip)) return SendClientMessage(playerid,LIGHTBLUE2,"USAGE: /unbanip [ip]");
    SendClientMessage(playerid, -1,"{FF0000}FUNCTION:Will unban the ip of specified player");
    format(dformat,sizeof dformat,"banip %s",ip);
    SendRconCommand(dformat);
    return 1;
}


Re: something is wrong in my cmd - jamjamnewbie - 17.11.2014

pawn Код:
dcmd_banip(playerid,params[])
{
    new ip[32], dformat[64];
    if(AccInfo[playerid][Level] >= 5) return SendClientMessage(playerid,0xff0000ff,"You Are Not Admin!");
    if(sscanf(params,"s[32]",ip)) return SendClientMessage(playerid,LIGHTBLUE2,"USAGE: /unbanip [ip]");
    if(isnull(params)) return SendClientMessage(playerid,orange,"Function: Will UnBan the Ip Of specified player");
    format(dformat,sizeof(dformat),"banip %s",ip);
    SendRconCommand(dformat);
    return 1;
}
add the code below to the defines
pawn Код:
#if !defined isnull
    #define isnull(%1) \
                ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
I dont know if it will work


Re: something is wrong in my cmd - Kells - 18.11.2014

did not work
@the second one. Gives me this error
Quote:

error 001: expected token: "#endif", but found "-end of file-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Error.




Re: something is wrong in my cmd - Runn3R - 18.11.2014

Why don't you use ZCMD?


Re: something is wrong in my cmd - Kells - 21.11.2014

because im Increasing cmds for luxadmin :/