unban ?
#1

hello everyone, so im doing an unban command... this is my code..

pawn Код:
CMD:unban(playerid, params[])
{
    new pName[MAX_PLAYER_NAME];
    new str[128];
    if(sscanf(params, "s[MAX_PLAYER_NAME]", pName)) return SendClientMessage(playerid, DEEPPINK, "USAGE: /unban <name>");
    if (PlayerInfo[playerid][pAdmin] >=3)
    {
        if(!fexist(UserPath(pName))) return SendClientMessage(playerid, DEEPPINK, "ERROR: Player doesn't exist.");
        new INI:File = INI_Open(UserPath(playerid));
        INI_WriteInt(File,"Banned", 0);
        INI_Close(File);
        format(str, sizeof(str), "You have unbanned %s.", pName);
        SendClientMessage(playerid, RED, str);
    }
    else SendClientMessage(playerid, DEEPPINK, "ERROR: You must be level 3 to use that command!");
    return 1;
}
the error line is:
Код:
 if(!fexist(UserPath(pName))) return SendClientMessage(playerid, DEEPPINK, "ERROR: Player doesn't exist.");
and the error i get is:

Код:
 C:\Users\user7\Desktop\Server\gamemodes\new.pwn(1142) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Could someone help me please?

Regards, Migue

P.S: Im using y_ini register / login system ..
Reply
#2

Bump? ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)