Help /facpay wount work!
#2

I see no major problem, so no clue but some minor problems
PHP код:
CMD:facpay(playeridparams[])
{
    
// ...
    // you can combine the amount checks
    
if(amount 300000 || amount <= 0) return // ...
    // missing rank check
    
if(!(<= rank <= 10)) return // ...
    // use arrays inside enums "fPay[10]"
    
new idx PlayerInfo[playerid][pFac];
    
FacInfo[idx][fPay][rank] = amount;
    
format(stringsizeof(string), "You have set rank %d's pay to %d"rank 1amount);
    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
    return 
1;

PHP код:
stock FACPAY(playerid)
{
    new 
pay[10];
    new 
faction PlayerInfo[playerid][pFac];
    if(
faction) { // rank as array like above
        
strcat(payFacInfo[faction][fPay][ PlayerInfo[playerid][pFacRank] ]);
    } else {
        
pay "None";
    }
    return 
pay;

Same with SaveFactions, change your variables to arrays
Reply


Messages In This Thread
Help /facpay wount work! - by priit123 - 20.02.2019, 22:29
Re: Help /facpay wount work! - by Nero_3D - 21.02.2019, 02:29
Re: Help /facpay wount work! - by priit123 - 21.02.2019, 15:36
Re: Help /facpay wount work! - by Nero_3D - 21.02.2019, 18:33
Re: Help /facpay wount work! - by priit123 - 21.02.2019, 19:09
Re: Help /facpay wount work! - by Nero_3D - 22.02.2019, 01:08

Forum Jump:


Users browsing this thread: 1 Guest(s)