fexists doesn't work?
#6

Ref is:
pawn Код:
command(referral, playerid, params[])
{
    new Name[128], string[128], string2[128], reffer[128];
   
    if(sscanf(params, "s", Name))
    {
        if(Player[playerid][PlayingHours] >= 0)
        {
            SendClientMessage(playerid, WHITE, "SYNTAX: /referral [name]");
            SendClientMessage(playerid, GREY, "Type the FULL NAME of your referral, and not an ID");
            SendClientMessage(playerid, GREY, "NOTE: This command is CaSe SeNsItIvE.");
        }
    }
    else
    {
        if(Player[playerid][PlayingHours] >= 0)
        {
            if(strlen(Name) >= 3 && strlen(Name) < MAX_PLAYER_NAME+1)
            {
                format(string2, sizeof(string2), "Accounts/%s.ini", Name);
                if(fexist(string2))
                {
                    if(Player[playerid][PlayingHours] >= 3)
                    {
                        SendClientMessage(playerid, WHITE, "You already have more than two playing hours, you cannot do this anymore!");
                    }
                    else
                    {
                        //reffer = Name;
                        format(string, sizeof(string), "You added %s succesfully as your referral!", Name);
                        SendClientMessage(playerid, WHITE, string);
                        format(string, sizeof(string), "If you had a referral already, that one got replaced!");
                        SendClientMessage(playerid, WHITE, string);
                        format(Player[playerid][Ref], sizeof(string), Name);
                        Player[playerid][Authenticated] = 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, WHITE, "Account not found. Remember this command is CaSe SeNsEtIvE ");
                }
            }
        }
    }
    return 1;
}
but I believe the problem is that it says the file doesn't excist while it does...
Reply


Messages In This Thread
fexists doesn't work? - by Supercop - 31.05.2012, 06:20
Re: fexists doesn't work? - by JaKe Elite - 31.05.2012, 06:23
Re: fexists doesn't work? - by Supercop - 31.05.2012, 06:33
Re: fexists doesn't work? - by Supercop - 31.05.2012, 07:39
Re: fexists doesn't work? - by [ABK]Antonio - 31.05.2012, 07:45
Re: fexists doesn't work? - by Supercop - 31.05.2012, 09:57
Re: fexists doesn't work? - by JaKe Elite - 31.05.2012, 10:07
Re: fexists doesn't work? - by stabker - 31.05.2012, 10:12
Re: fexists doesn't work? - by Supercop - 31.05.2012, 10:23
Re: fexists doesn't work? - by stabker - 31.05.2012, 10:46

Forum Jump:


Users browsing this thread: 1 Guest(s)