I cant make work this command
#4

make sure u do this:
#include < YSI\y_ini >

CASE SENSITIVE !

and for the rest, here u go fixed one! tried compiling works fine!
pawn Код:
CMD:unban(playerid,params[])
{
    new aname[MAX_PLAYER_NAME];
    if(sscanf(params,"s[MAX_PLAYER_NAME]",aname)) return SendClientMessage(playerid, -1, "Usage: /unban [player name]");
    if(strlen(aname) > 24) return SendClientMessage(playerid, -1, "The Player Name Must Be Less Than 60 Characters Long.");
    new string[98];
    format(string,sizeof(string),"/Users/%s.ini",aname);
    new IsBanned;
    new INI:File = INI_Open(UserPath(playerid));
    {
        INI_Int("Banned");
    }
    if(IsBanned == 0) return SendClientMessage(playerid, -1, "This player account is not banned.");
    if(!fexist(string)) return SendClientMessage(playerid, -1, "Player account not found, please note the files are CASE SENSITIVE.");
    INI_WriteInt(File,"Banned",0);
    INI_Close(File);
    format(string,sizeof(string),"Player account %s has been unbanned.",aname);
    SendClientMessage(playerid, -1, string);
    format(string,sizeof(string),"Admin %s has unbanned the player account: %s.",aname[playerid],aname);
    return 1;
}
Reply


Messages In This Thread
I cant make work this command - by Face9000 - 13.10.2012, 18:49
Re: I cant make work this command - by TzAkS. - 13.10.2012, 18:51
Re: I cant make work this command - by Face9000 - 13.10.2012, 18:51
Re: I cant make work this command - by XtremeR - 13.10.2012, 18:55
Re: I cant make work this command - by Face9000 - 13.10.2012, 18:57
Re: I cant make work this command - by XtremeR - 13.10.2012, 18:58
Re: I cant make work this command - by Face9000 - 13.10.2012, 18:59
Re: I cant make work this command - by ReneG - 13.10.2012, 20:41
Re: I cant make work this command - by Face9000 - 13.10.2012, 21:47
Re: I cant make work this command - by Face9000 - 21.10.2012, 17:48

Forum Jump:


Users browsing this thread: 3 Guest(s)