TextLable doesnt update?
#6

PHP код:
else if(strcmp(x_job,"business",true) == 0)
{
    if(
BizOffer[playerid] < 999)
     {
          if(
PlayerInfo[playerid][pCash] > BizPrice[playerid])
        {
            if(
IsPlayerConnected(BizOffer[playerid]))
            {
                  if(
ProxDetectorS(3.0playeridBizOffer[playerid]))
                {
                    for(new 
0sizeof(BizzInfo); i++)
                     {
                            
GetPlayerName(GuardOffer[playerid], giveplayersizeof(giveplayer));
                            
GetPlayerName(playeridsendernamesizeof(sendername));
                            if(!
strcmp(BizzInfo[i][bOwner],giveplayer,true))
                            {
                                
format(stringsizeof(string), "* You accepted the Business for $%d from %s.",BizPrice[playerid],giveplayer);
                                
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                                
format(stringsizeof(string), "* %s accepted your Business, and the $%d was added to your Bank Account.",sendername,BizPrice[playerid]);
                                
SendClientMessage(GuardOffer[playerid], COLOR_LIGHTBLUEstring);
                                
format(stringsizeof(string), "%s has accepted the business from %s for $%d"sendername,giveplayer,BizPrice[playerid]);
                                
PayLog(string);
                                
PlayerInfo[playerid][pPbiskey] = PlayerInfo[BizOffer[playerid]][pPbiskey];
                                
strmid(BizzInfo[i][bOwner], sendername0strlen(sendername), 255);
                                
OnPropTextdrawUpdate(i);
                                
OnBizzPickupUpdate(i);
                                
OnPropUpdate();
                                
UpdateAccount(playerid);
                                
PlayerInfo[BizOffer[playerid]][pPbiskey] = 255;
                                
PlayerInfo[BizOffer[playerid]][pAccount] += BizPrice[playerid];
                                
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-BizPrice[playerid];
                                
GivePlayerMoney(playerid, -BizPrice[playerid]);
                                 
BizOffer[playerid] = 999;
                                
BizPrice[playerid] = 0;
                                
OnPropTextdrawUpdate(i);
                                
OnBizzPickupUpdate(i);
                                
OnPropUpdate();
                                return 
1;
                            }
                    }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GRAD1"   You're too far away !");
                    return 
1;
                }
            }
        }
        else
        {
              
SendClientMessage(playeridCOLOR_GREY"   You can't afford that !");
            return 
1;
        }
     }
    else
    {
        
SendClientMessage(playeridCOLOR_GREY"   Nobody offered you a business.");
        return 
1;
      }

Try this. I put in this row:
PHP код:
if(!strcmp(BizzInfo[i][bOwner],giveplayer,true)) 
So the script will check if the bizz is yours. So you have the correct bizz id.
Reply


Messages In This Thread
TextLable doesnt update? - by MayaEU - 26.06.2016, 09:20
Re: TextLable doesnt update? - by MayaEU - 26.06.2016, 10:54
Re: TextLable doesnt update? - by Mencent - 26.06.2016, 11:15
Re: TextLable doesnt update? - by MayaEU - 26.06.2016, 11:21
Re: TextLable doesnt update? - by Zevcore - 26.06.2016, 11:27
Re: TextLable doesnt update? - by Mencent - 26.06.2016, 11:30
Re: TextLable doesnt update? - by MayaEU - 26.06.2016, 11:36
Re: TextLable doesnt update? - by Mencent - 26.06.2016, 11:39
Re: TextLable doesnt update? - by MayaEU - 26.06.2016, 11:40
Re: TextLable doesnt update? - by Mencent - 26.06.2016, 11:41
Re: TextLable doesnt update? - by MayaEU - 26.06.2016, 11:47
Re: TextLable doesnt update? - by Mencent - 26.06.2016, 11:49
Re: TextLable doesnt update? - by MayaEU - 26.06.2016, 11:56
Re: TextLable doesnt update? - by Mencent - 26.06.2016, 11:57
Re: TextLable doesnt update? - by MayaEU - 26.06.2016, 12:03
Re: TextLable doesnt update? - by MayaEU - 26.06.2016, 12:48
Re: TextLable doesnt update? - by MayaEU - 26.06.2016, 15:31
Re: TextLable doesnt update? - by MayaEU - 27.06.2016, 14:44

Forum Jump:


Users browsing this thread: 1 Guest(s)