[JOB] Problem
#1

I make a job system, and i want if the player have premium account to revice much money than normal players

But i want to revice money like normal player and premium player sorry for bad english

here it's the OnPLayerEnterCheckpoint

PHP код:
else if(DrugsCP[playerid] == 1)
    {
        if(
PlayerInfo[playerid][pPremiumAccount] == && DrugsDeliver[playerid] == )
        {
            
DisablePlayerCheckpoint(playerid);
            new 
dstring[128];
            new 
randomdrugs 99999 random(9999);
            
format(dstring,sizeof(dstring),"Reviced pAccount: $%s",FormatNumber(randomdrugs));
            
GivePlayerCash(playerid,randomdrugs);
            
SendClientMessage(playerid,COLOR_GRAD1,dstring);
            
SetTimerEx("DrugsTimer",3000,0,"i",playerid);
        }
        else if(
DrugsDeliver[playerid] == 1)
        {
            
DisablePlayerCheckpoint(playerid);
            new 
dstring[128];
            new 
randomdrugs 4000 random(2000);
            
format(dstring,sizeof(dstring),"Reviced: $%s",FormatNumber(randomdrugs));
            
GivePlayerCash(playerid,randomdrugs);
            
SendClientMessage(playerid,COLOR_GRAD1,dstring);
            
SetTimerEx("DrugsTimer",30000,0,"i",playerid);
        }
    
    } 
Thanks
Reply
#2

Hello there! Here is the code: (I am not sure )

PHP код:
else if(DrugsCP[playerid] == 1
    { 
        if(
PlayerInfo[playerid][pPremiumAccount] == && DrugsDeliver[playerid] == 
        { 
            
DisablePlayerCheckpoint(playerid); 
            new 
dstring[128]; 
            
format(dstring,sizeof(dstring),"Reviced pAccount: $99999"); 
            
GivePlayerCash(playerid,+99999); 
            
SendClientMessage(playerid,COLOR_GRAD1,dstring); 
            
SetTimerEx("DrugsTimer",3000,0,"i",playerid); 
        } 
        else if(
DrugsDeliver[playerid] == 1
        { 
            
DisablePlayerCheckpoint(playerid); 
            new 
dstring[128]; 
            
format(dstring,sizeof(dstring),"Reviced: $9999"); 
            
GivePlayerCash(playerid,+9999); 
            
SendClientMessage(playerid,COLOR_GRAD1,dstring); 
            
SetTimerEx("DrugsTimer",30000,0,"i",playerid); 
        } 
     
    } 
[Untested]
Reply
#3

it's not that, thank you ) anybody ?
Reply
#4

HELP !
Reply
#5

Hey there!
This below should work.
Код:
else if(DrugsCP[playerid] == 1) {
if(DrugsDeliver[playerid] == 1) {
if(PlayerInfo[playerid][pPremiumAccount] == 1) {
DisablePlayerCheckpoint(playerid);
new dstring[128];
new randomdrugs = 99999 + random(9999);
format(dstring,sizeof(dstring),"Reviced pAccount: $%s",FormatNumber(randomdrugs));
GivePlayerCash(playerid,randomdrugs);
SendClientMessage(playerid,COLOR_GRAD1,dstring);
SetTimerEx("DrugsTimer",3000,0,"i",playerid);
} else {
DisablePlayerCheckpoint(playerid);
new dstring[128];
new randomdrugs = 4000 + random(2000);
format(dstring,sizeof(dstring),"Reviced: $%s",FormatNumber(randomdrugs));
GivePlayerCash(playerid,randomdrugs);
SendClientMessage(playerid,COLOR_GRAD1,dstring);
SetTimerEx("DrugsTimer",30000,0,"i",playerid);
}
}
}
Cheers,
Michael
P.S: I am using phone right now. You should edit this and add some indents before paste it in your game mode or you will get error.
Reply
#6

I make like this but i revice only for premium account, and ai want boght
Reply
#7

Look at this check;
Код:
if(PlayerInfo[playerid][pPremiumAccount] == 1 && DrugsDeliver[playerid] == 1 )
And look at this one

Код:
if(DrugsDeliver[playerid] == 1)
check also for the PlayerInfo[playerid][pPremiumAccount] if its false !PlayerInfo[playerid][pPremiumAccount] or PlayerInfo[playerid][pPremiumAccount] == 0
Reply
#8

I try like this but not work , i don't know how (-B
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)