Dialog Help
#6

PHP код:
case 0:
                {
                       if(
GetPlayerMoney(playerid) >= 2500)
                    {    
                    
GivePlayerWeapon(playerid41);
                    
GivePlayerMoney(playerid, -2500);
                    }else{
                    
SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
                    }
                }
            case 
1:
                {
                       if(
GetPlayerMoney(playerid) >= 2500)
                    {    
                    
GivePlayerWeapon(playerid51);
                    
GivePlayerMoney(playerid, -2500);
                }
            case 
2:
                {
                       if(
GetPlayerMoney(playerid) >= 2500)
                    {    
                    
GivePlayerWeapon(playerid225000);
                    
GivePlayerMoney(playerid, -2500);
                    }else{
                    
SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
                    }
                  }
            case 
3:
                {
                       if(
GetPlayerMoney(playerid) >= 2500)
                    {    
                    
GivePlayerWeapon(playerid235000);
                    
GivePlayerMoney(playerid, -2500);
                    }else{
                    
SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
                    }
                  }
            case 
4:
                {
                       if(
GetPlayerMoney(playerid) >= 2500)
                    {    
                    
GivePlayerWeapon(playerid245000);
                    
GivePlayerMoney(playerid, -2500);
                    }else{
                    
SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
                    }
                  }
            case 
5:
                {  
                       if(
GetPlayerMoney(playerid) >= 2500)
                    {    
                    
GivePlayerWeapon(playerid255000);
                    
GivePlayerMoney(playerid, -2500);
                    }else{
                    
SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
                    }
                } 
simply change
PHP код:
if(GetPlayerMoney(playerid) < 2500
to
PHP код:
if(GetPlayerMoney(playerid) >= 2500
The reason for that is not working is:
The code checks if you have less money than 2500 and if you have given your weapon, and if you have more you give the message that you do not have much money
Reply


Messages In This Thread
Dialog Help - by zohartrejx - 20.05.2014, 11:54
Re: Dialog Help - by Spartaaaaa - 20.05.2014, 12:59
Re: Dialog Help - by zohartrejx - 21.05.2014, 13:05
Re: Dialog Help - by Stanford - 21.05.2014, 13:14
Re: Dialog Help - by Rittik - 21.05.2014, 13:24
Re: Dialog Help - by rumen98 - 21.05.2014, 13:25

Forum Jump:


Users browsing this thread: 2 Guest(s)