setting if to command
#1

PHP код:
        case 5:
        {
            if((
CP[playerid] > 0) && (MilitarJob[playerid] == 5)) return SendClientMessage(playerid, -1"Mission Failed, your CP is 1 !");
            {
                
DisablePlayerCheckpoint(playerid);
                
SendClientMessage(playerid, -1"You accomplished your mission!!");
                
GivePlayerMoney(playerid,2500);
                
MilitarJob[playerid] = 0;
                
CP[playerid] = 0;
            }
        } 
How can I make
PHP код:
if pInfo[playerid][ZombiesKilled] > 1  GivePlayerMoney(playerid,5000);
if 
pInfo[playerid][ZombiesKilled] < 0 GivePlayerMoney(playerid,2500); 
Reply
#2

make what?
Reply
#3

Quote:
Originally Posted by m4karow
Посмотреть сообщение
make what?
PHP код:
if pInfo[playerid][ZombiesKilled] > 1  GivePlayerMoney(playerid,5000); 
if 
pInfo[playerid][ZombiesKilled] < 0 GivePlayerMoney(playerid,2500); 

if player has ZombiesKilled more than 1 to give him 5000$
if players has zero zombieskilled give him 2500$
Reply
#4

PHP код:
if(pInfo[playerid][ZombiesKilled] > 1)
{
    
GivePlayerMoney(playerid,5000);
}
if(
pInfo[playerid][ZombiesKilled] == 0)
{
    
GivePlayerMoney(playerid,2500);

Reply
#5

Quote:
Originally Posted by kovac
Посмотреть сообщение
PHP код:
if(pInfo[playerid][ZombiesKilled] > 1)
{
    
GivePlayerMoney(playerid,5000);
}
if(
pInfo[playerid][ZombiesKilled] == 0)
{
    
GivePlayerMoney(playerid,2500);


PHP код:
        case 5:
        {
            if(
MilitarJob[playerid] != 5) return SendClientMessage(playerid, -1"Mission Failed. Go back to base.");
            {
            if(
pInfo[playerid][ZombiesKilled] == 0)
{
GivePlayerMoney(playerid,2500);
            }
}
if(
pInfo[playerid][ZombiesKilled] > 1)
{
GivePlayerMoney(playerid,5000);
}
        } 
??
Reply
#6

Quote:
Originally Posted by Zeus666
Посмотреть сообщение
PHP код:
        case 5:
        {
            if(
MilitarJob[playerid] != 5) return SendClientMessage(playerid, -1"Mission Failed. Go back to base.");
            {
            if(
pInfo[playerid][ZombiesKilled] == 0)
{
GivePlayerMoney(playerid,2500);
            }
}
if(
pInfo[playerid][ZombiesKilled] > 1)
{
GivePlayerMoney(playerid,5000);
}
        } 
??
PHP код:
case 5:
{
    if(
MilitarJob[playerid] != 5) return SendClientMessage(playerid, -1"Mission Failed. Go back to base.");
    {
         if(
pInfo[playerid][ZombiesKilled] > 1)
        {
            
GivePlayerMoney(playerid,5000);
           }
        else if(
pInfo[playerid][ZombiesKilled] == 0)
        {
            
GivePlayerMoney(playerid,2500);
        }
    }

Reply
#7

Can you try that ? Let me know if didn't worked.

PHP код:
        case 5
        { 
            if((
CP[playerid] > 0) && (MilitarJob[playerid] == 5)) return SendClientMessage(playerid, -1"Mission Failed, your CP is 1 !"); 
            { 
                if(
pInfo[playerid][ZombiesKilled] > 1)
                    
GivePlayerMoney(playerid5000);
                else if(
pInfo[playerid][ZombiesKilled] == 0)
                    
GivePlayerMoney(playerid2500);
                
DisablePlayerCheckpoint(playerid); 
                
SendClientMessage(playerid, -1"You accomplished your mission!!"); 
                
//GivePlayerMoney(playerid,2500); 
                
MilitarJob[playerid] = 0
                
CP[playerid] = 0
            } 
        } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)