fexists doesn't work?
#1

pawn Код:
if(strfind(Player[i][Ref], "Nothing", false))
                    {
                        new Referral = Player[i][Ref];
                        format(string, sizeof(string), "Accounts/%s.ini", Player[i][Ref]);
                        if(fexist(string))
                        {
                            if (IsPlayerConnected(Referral))
                            {
                                Player[Referral][Refs]++;
                                Player[Referral][Money] += 10000;
                                Player[Referral][Pot] += 20;
                                Player[Referral][Cocaine] += 15;
                                Player[Referral][Materials] += 2000;
                                SendClientMessage(i, DEPARTMENT_CHAT, "Your referral is online and was rewarded, as you reached your fifth playing hour!.");
                                SendClientMessage(i, DEPARTMENT_CHAT, "Enjoy the server.");

                                SendClientMessage(Referral, DEPARTMENT_CHAT, "One of the players you brought to the server reached his fifth played hour!", GetName(i));
                                SendClientMessage(Referral, DEPARTMENT_CHAT, "You were given a reward! Thanks for your effort to improve the community!");
                                format(string, sizeof(string), "%s gained 5 playing hours - he was brought by %s.", Referral, i);
                                RefLog(string);
                            }
                            else
                            {
                                format(string, sizeof(string), "Accounts/%s.ini", Player[i][Ref]);
                                dini_IntSet(string, "PendingRef", 1);
                                SendClientMessage(Referral, DEPARTMENT_CHAT, "Your referral is not online but he'll be rewarded when he's online, for your fifth playing hour!", Player[i][Ref]);
                                SendClientMessage(Referral, DEPARTMENT_CHAT, "Enjoy the server.");
                                format(string, sizeof(string), "%s gained 5 playing hours - he was brought by %s but was not online!", Referral, i);
                                RefLog(string);
                            }
                        }
                        else
                        {
                        SendClientMessage(i, WHITE, "Your referral changed his name! Unable to reward him.");
                        }
                    }
Even if the account exists and is not online, it says that it's unable to reward him... how to solve this?
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: 2 Guest(s)