Menu problems
#6

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 1)
    {
        if(
response == 0) return SendClientMessage(playerid,COLOR_GREEN,"You bought SMG for $30000!") && GivePlayerMoney(playerid,-30000);
        switch(
listitem)
        {
            case 
0:
            {
                if(
GetPlayerMoney(playerid) > 30000)
                 {
                    
SendClientMessage(playerid,COLOR_RED,"You don't have $30000!");
                  }
                if(
GetPlayerMoney(playerid) < 30000)
                {
                       
SendClientMessage(playerid,COLOR_GREEN,"You bought SMG for $30000!");
                       
GivePlayerWeapon(playerid,29,500);
                       
GivePlayerMoney(playerid,-30000);
                   }
               }
               case 
1:
               {
                  if(
GetPlayerMoney(playerid) > 30000)
                  {
                    
SendClientMessage(playerid,COLOR_RED,"You don't have $30000!");
                }
                   if(
GetPlayerMoney(playerid) < 30000)
                {
                       
SendClientMessage(playerid,COLOR_GREEN,"You bought UZI for $30000!");
                       
GivePlayerWeapon(playerid,28,500);
                       
GivePlayerMoney(playerid,-30000);
                   }
            }
               case 
2:
               {
                   if(
GetPlayerMoney(playerid) > 100000) return SendClientMessage(playerid,COLOR_RED,"You don't have $100000!");
                   {
                    if(
GetPlayerMoney(playerid) < 100000)
                     {
                         
SendClientMessage(playerid,COLOR_GREEN,"You bought AK47 for $100000!");
                         
GivePlayerWeapon(playerid,30,500);
                         
GivePlayerMoney(playerid,-100000);
                     }
                }
            }
            case 
3:
            {
                if(
GetPlayerMoney(playerid) > 150000)
                 {
                           
SendClientMessage(playerid,COLOR_RED,"You don't have $150000!");
                }
                if(
GetPlayerMoney(playerid) < 150000)
                {
                           
SendClientMessage(playerid,COLOR_GREEN,"You bought M4 for $150000!");
                           
GivePlayerWeapon(playerid,31,500);
                           
GivePlayerMoney(playerid,-150000);
                }
            }
        }
    }
    if(
dialogid == 2)
    {
        if(
strlen(inputtext) == 0) return SendClientMessage(playerid,COLOR_RED,"No text wrote!");
        new 
string[128];
        
format(stringsizeof(string), "NEW BUG REPORT: %s"inputtext);
        print(string);
    }
    return 
1;

Reply


Messages In This Thread
Menu problems - by GTAprogamer111 - 30.08.2012, 11:12
Re: Menu problems - by Gangster-rocks - 30.08.2012, 11:23
Re : Menu problems - by GTAprogamer111 - 30.08.2012, 11:36
Re: Menu problems - by Devilxz97 - 30.08.2012, 11:43
Re : Menu problems - by GTAprogamer111 - 30.08.2012, 11:46
Re: Menu problems - by Gangster-rocks - 30.08.2012, 11:46

Forum Jump:


Users browsing this thread: 2 Guest(s)