Problem Help Please [+REP For Helper]
#2

pawn Код:
#define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1])))) //we will use this to check if famname is empty

#define MAX_FAMS 5
        new fid = -1; //lets assume "fid" "-1" because we cannot use 0 as it is already a slot for ur family
        for(new i = 0; i != MAX_FAMS; i++) //loop
        {
            if(isnull(FamStat[i][FamName]))  //this is how we are gonna find out if there is a family with empty name
            {
                fid = i; //changing "fid" variable to fetched id
                break; //breaking the loop
            }
        }
        if(fid == -1) return SendClientMessage(playerid, 0xffffffff, "No More Empty Slot , Try Again Later"); //if fid is still -1 it means that there were no slot found otherwise it would have fetched an id between 1-5
try this.
Reply


Messages In This Thread
Problem Help Please [+REP For Helper] - by PoniStar - 18.11.2018, 15:09
Re: Problem Help Please [+REP For Helper] - by ReD_HunTeR - 18.11.2018, 17:06
Re: Problem Help Please [+REP For Helper] - by PoniStar - 18.11.2018, 18:24

Forum Jump:


Users browsing this thread: 2 Guest(s)