I need help with business!
#2

Instead of:
PHP код:
switch(listitem)
                {
                    case 
0:
                     {
                    
format(w,sizeof(w),""SZ"Current state in business: "B"%i$ ",InfoFirme[idv][PareVlasnika]);
                    
SendClientMessage(playerid,-1,w);
                    }
                    case 
1:
                     {
                    
DestroyPickup(InfoFirme[idv][PickupFirme]);
                    
InfoFirme[idv][PickupFirme] = CreatePickup(131423InfoFirme[idv][IzlazXFirme], InfoFirme[idv][IzlazYFirme], InfoFirme[idv][IzlazZFirme]);
                    
format(InfoFirme[idv][VlasnikFirme], 24"Nitko");
                    
InfoFirme[idv][FirmaNaProdaju] = 1;
                    
GivePlayerMoney(playeridInfoFirme[idv][CenaFirme]/2);
                    
format(w,sizeof(w),"Prodali ste firmu za %i$!",InfoFirme[idv][CenaFirme]/2);
                    
PlayerInfo[playerid][pFirma] = -1;
                    
SendClientMessage(playerid,-1,w);
                    
UpdateFirme(idv);
                    
format(Labelsizeof(Label), ""SZ"Firma: "B"%s\n"SZ"Vlasnik: "B"%s\n"SZ"Cijena: "B"%i$\n"SZ"Level: "B"%i",InfoFirme[idv][ImeFirme],InfoFirme[idv][VlasnikFirme],InfoFirme[idv][CenaFirme],InfoFirme[idv][LevelFirme]);
                    
Update3DTextLabelText(InfoFirme[idv][LabelFirme],-1,Label);
                    }
                    case 
2:
                     {
                    
ShowPlayerDialog(playerid,Dialog_Firme+1,DIALOG_STYLE_INPUT,"Withdraw","How much money you want to withdraw from your account?","Withdraw","Quit");
                    }
                }
        }
        return 
true;
    } 
Use:

PHP код:
    if(response)
    {
        switch(
listitem)
        {
            case 
0:
            {
                
format(w,sizeof(w),""SZ"Current state in business: "B"%i$ ",InfoFirme[idv][PareVlasnika]);
                
SendClientMessage(playerid,-1,w);
            }
            case 
1:
            {
                
DestroyPickup(InfoFirme[idv][PickupFirme]);
                
InfoFirme[idv][PickupFirme] = CreatePickup(131423InfoFirme[idv][IzlazXFirme], InfoFirme[idv][IzlazYFirme], InfoFirme[idv][IzlazZFirme]);
                
format(InfoFirme[idv][VlasnikFirme], 24"Nitko");
                
InfoFirme[idv][FirmaNaProdaju] = 1;
                
GivePlayerMoney(playeridInfoFirme[idv][CenaFirme]/2);
                
format(w,sizeof(w),"Prodali ste firmu za %i$!",InfoFirme[idv][CenaFirme]/2);
                
PlayerInfo[playerid][pFirma] = -1;
                
SendClientMessage(playerid,-1,w);
                
UpdateFirme(idv);
                
format(Labelsizeof(Label), ""SZ"Firma: "B"%s\n"SZ"Vlasnik: "B"%s\n"SZ"Cijena: "B"%i$\n"SZ"Level: "B"%i",InfoFirme[idv][ImeFirme],InfoFirme[idv][VlasnikFirme],InfoFirme[idv][CenaFirme],InfoFirme[idv][LevelFirme]);
                
Update3DTextLabelText(InfoFirme[idv][LabelFirme],-1,Label);
            }
            case 
2:
            {
                
ShowPlayerDialog(playerid,Dialog_Firme+1,DIALOG_STYLE_INPUT,"Withdraw","How much money you want to withdraw from your account?","Withdraw","Quit");
             }
        }
    }
    else
     {
        
SendClientMessage(playerid, -1"You quit!");
     } 
So it will be:

PHP код:
    new w[128],Float:XA,Float:YA,Float:ZA;
    new 
idv PlayerInfo[playerid][pFirma];
     
XA InfoFirme[idv][ExitX]; YA InfoFirme[idv][ExitY]; ZA InfoFirme[idv][ExitZ];
    if(
dialogid == Dialog_Firme)
    {
        if(
IsPlayerInRangeOfPoint(playerid5.0XAYAZA))
         {
            if(
response)
            {
                switch(
listitem)
                {
                    case 
0:
                    {
                        
format(w,sizeof(w),""SZ"Current state in business: "B"%i$ ",InfoFirme[idv][PareVlasnika]);
                        
SendClientMessage(playerid,-1,w);
                    }
                    case 
1:
                    {
                        
DestroyPickup(InfoFirme[idv][PickupFirme]);
                        
InfoFirme[idv][PickupFirme] = CreatePickup(131423InfoFirme[idv][IzlazXFirme], InfoFirme[idv][IzlazYFirme], InfoFirme[idv][IzlazZFirme]);
                        
format(InfoFirme[idv][VlasnikFirme], 24"Nitko");
                        
InfoFirme[idv][FirmaNaProdaju] = 1;
                        
GivePlayerMoney(playeridInfoFirme[idv][CenaFirme]/2);
                        
format(w,sizeof(w),"Prodali ste firmu za %i$!",InfoFirme[idv][CenaFirme]/2);
                        
PlayerInfo[playerid][pFirma] = -1;
                        
SendClientMessage(playerid,-1,w);
                        
UpdateFirme(idv);
                        
format(Labelsizeof(Label), ""SZ"Firma: "B"%s\n"SZ"Vlasnik: "B"%s\n"SZ"Cijena: "B"%i$\n"SZ"Level: "B"%i",InfoFirme[idv][ImeFirme],InfoFirme[idv][VlasnikFirme],InfoFirme[idv][CenaFirme],InfoFirme[idv][LevelFirme]);
                        
Update3DTextLabelText(InfoFirme[idv][LabelFirme],-1,Label);
                    }
                    case 
2:
                    {
                        
ShowPlayerDialog(playerid,Dialog_Firme+1,DIALOG_STYLE_INPUT,"Withdraw","How much money you want to withdraw from your account?","Withdraw","Quit");
                     }
                }
            }
            else
             {
                
SendClientMessage(playerid, -1"You quit!");
             }
        }
        return 
1;
    } 
Reply


Messages In This Thread
I need help with business! - Please HELP me! - by ivanVU - 13.10.2012, 09:41
Re: I need help with business! - by gtakillerIV - 13.10.2012, 16:41
Re: I need help with business! - by ivanVU - 13.10.2012, 16:56
Re: I need help with business! - by gtakillerIV - 13.10.2012, 17:52
Re: I need help with business! - by ivanVU - 14.10.2012, 09:54
Re: I need help with business! - by Simplyfrag - 14.10.2012, 15:44
Re: I need help with business! - by ivanVU - 14.10.2012, 16:05
Re: I need help with business! - by SwisherSweet - 15.10.2012, 08:14
Re: I need help with business! - by ivanVU - 15.10.2012, 08:30
Re: I need help with business! - by fiki574 - 15.10.2012, 09:06

Forum Jump:


Users browsing this thread: 1 Guest(s)