something is wrong in my cmd
#1

Код:
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?
Reply
#2

Код:
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;
}
Reply
#3

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
Reply
#4

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.

Reply
#5

Why don't you use ZCMD?
Reply
#6

because im Increasing cmds for luxadmin :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)