Editing Business
#1

When i edit business, some of them are not editing, like type.

CMD
PHP код:
CMD:editbiz(playeridparams[])
   {
    new 
biz BizEditID[playerid];
    new 
choice[32],string[128],amount;
    if(
PlayerInfo[playerid][pAdmin] < 4)
    {
        
SendClientMessageEx(playeridCOLOR_GRAD2"You are not authorized to use that command!");
        return 
1;
    }
if(
sscanf(params"s[32]dD"choicebizamount)) 
{
                    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /editbiz [name]");
                    
SendClientMessage(playeridCOLOR_GRAD1"Available names: ID, Interior, Intmenu, Exterior, Price, Type, Name, Sellbiz, Reset, VW, Products");
                    return 
1;
                }
            
            if(
strcmp(choice,"Interior",true) == 0)
            {
                new 
interior GetPlayerInterior(playerid);
                new 
vw 1000 random(199999999999999999);
                new 
Float:posxFloat:posyFloat:poszFloat:posa;
                
GetPlayerPos(playeridposxposyposz);
                
GetPlayerFacingAngle(playeridposa);
                new 
Float:angle posa 180.0000;
                
BizInfo[biz][bIntLocationx] = posx;
                
BizInfo[biz][bIntLocationy] = posy;
                
BizInfo[biz][bIntLocationz] = posz;
                
BizInfo[biz][bInterior] = interior;
                
BizInfo[biz][bVirtualWorld] = vw;
                
BizInfo[biz][bExitAngle] = angle;
                   
SetPlayerVirtualWorld(playeridvw);
                   
PlayerInfo[playerid][pVW] = vw;
                   
PlayerInfo[playerid][pInBiz] = biz;
                
SendClientMessage(playerid,COLOR_LIGHTBLUE"You have changed this business interior.");
                return 
1;
            }
            else if(
strcmp(choice,"intmenu",true) == 0)
            {
                
ShowPlayerDialog(playerid9974,DIALOG_STYLE_LIST"Business Interior Menu""Bank\nCity Hall\nLSPD\nGym\nDrug House\nCrack Lab\n24/7\nAmmunation 1\nAmmunation 2\nAmmunation 3\nAmmunation 4\nAmmunation 5\nBinco\nDidier sachs\nProlaps\nSuburban\nVictim\nZip\nClub\nBar\nResturant\nPhone Company\nLottery""Set Interior""Cancel");
                return 
1;
            }
            else if(
strcmp(choice,"Reset",true) == 0)
            {
                if(
PlayerInfo[playerid][pAdmin] < 99999)
                {
                    
SendClientMessage(playeridCOLOR_GREY"   Only for server owner !");
                    return 
1;
                }
                
BizInfo[biz][bLocation_x] = 0.0000;
                
BizInfo[biz][bLocation_y] = 0.0000;
                
BizInfo[biz][bLocation_z] = 0.0000;
                
BizInfo[biz][bInterior] = 0;
                
BizInfo[biz][bVirtualWorld] = 0;
                
BizInfo[biz][bExitAngle] = 0.0000;
                
BizInfo[biz][bEnterAngle] = 0.0000;
                
BizInfo[biz][bIntLocationx] = 0.0000;
                
BizInfo[biz][bIntLocationy] = 0.0000;
                
BizInfo[biz][bIntLocationz] = 0.0000;
                
strmid(BizInfo[biz][bOwner], "The State"0strlen("The State"), 255);
                
strmid(BizInfo[biz][bName], "None"0strlen("None"), 255);
                
BizInfo[biz][bLocked] = 0;
                
BizInfo[biz][bOwned] = 0;
                
BizInfo[biz][bType] = 0;
                
BizInfo[biz][bCameras] = 0;
                
BizInfo[biz][bTill] = 0;
                
BizInfo[biz][bFee] = 0;
                
DestroyDynamicMapIcon(BizIcon[biz]);
                
DestroyDynamicPickup(BizPickup[biz]);
                 
DestroyDynamic3DTextLabel(BizLabel[biz]);
                
SendClientMessage(playerid,COLOR_LIGHTBLUE"You have reseted this business.");
                return 
1;
            }
            else if(
strcmp(choice,"Exterior",true) == 0)
            {
                new 
pickup;
                if(
BizInfo[biz][bType] == 0) { pickup 1239; }
                else if(
BizInfo[biz][bType] != 0) { pickup 1272; }
                new 
Float:posxFloat:posyFloat:poszFloat:posa;
                
GetPlayerPos(playeridposxposyposz);
                new 
interiorz GetPlayerInterior(playerid);
                new 
pvw GetPlayerVirtualWorld(playerid);
                
GetPlayerFacingAngle(playeridposa);
                new 
Float:angle posa 180.0000;
                
BizInfo[biz][bLocation_x] = posx;
                
BizInfo[biz][bLocation_y] = posy;
                
BizInfo[biz][bLocation_z] = posz;
                
BizInfo[biz][bEnterAngle] = angle;
                
BizInfo[biz][bPInt] = interiorz;
                
BizInfo[biz][bPVW] = pvw;
                 
DestroyDynamicPickup(BizPickup[biz]);
                 
DestroyDynamic3DTextLabel(BizLabel[biz]);
                
BizPickup[biz] = CreateDynamicPickup(pickup1BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                
SendClientMessage(playerid,COLOR_LIGHTBLUE"You have changed this business entrance.");
                if(
BizInfo[biz][bOwned] == && BizInfo[biz][bType] != 0)
                {
                      new 
VString[255];
                    new 
price BizInfo[biz][bPrice];
                    
format(VString,sizeof(VString),"Business for sale ! \nPrice: $%d \nType /buybiz to purchase it"price);
                    
BizLabel[biz] = Text3D:CreateDynamic3DTextLabel(VStringCOLOR_REDBizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z]+0.120INVALID_PLAYER_IDINVALID_VEHICLE_ID0BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                       
DestroyDynamicMapIcon(BizIcon[biz]);
                    if(
BizInfo[biz][bType] == 1)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 170);
                    else if(
BizInfo[biz][bType] == 2)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 490);
                    else if(
BizInfo[biz][bType] == 3)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 180);
                    else if(
BizInfo[biz][bType] == 4)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 500);
                    else if(
BizInfo[biz][bType] == 5)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 450);
                    else if(
BizInfo[biz][bType] == 6)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 250);
                    else if(
BizInfo[biz][bType] == 7)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 620);
                    else if(
BizInfo[biz][bType] == 8)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 360);
                }
                if(
BizInfo[biz][bOwned] == && BizInfo[biz][bType] != 0)
                {
                      new 
VString[255];
                    new 
name[25], owner[MAX_PLAYER_NAME];
                       
strmid(ownerBizInfo[biz][bOwner], 0strlen(BizInfo[biz][bOwner]), 255);
                    
strmid(nameBizInfo[biz][bName], 0strlen(BizInfo[biz][bName]), 255);
                    
format(VString,sizeof(VString),"%s \nOwner: %s \nEntry fee: $%d"name,owner,BizInfo[biz][bFee]);
                    
BizLabel[biz] = Text3D:CreateDynamic3DTextLabel(VStringCOLOR_GREENBizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z]+0.120INVALID_PLAYER_IDINVALID_VEHICLE_ID0BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                    
DestroyDynamicMapIcon(BizIcon[biz]);
                    if(
BizInfo[biz][bType] == 1)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 170);
                    else if(
BizInfo[biz][bType] == 2)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 490);
                    else if(
BizInfo[biz][bType] == 3)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 180);
                    else if(
BizInfo[biz][bType] == 4)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 500);
                    else if(
BizInfo[biz][bType] == 5)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 450);
                    else if(
BizInfo[biz][bType] == 6)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 250);
                    else if(
BizInfo[biz][bType] == 7)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 620);
                    else if(
BizInfo[biz][bType] == 8)
                        
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 360);
                }
                if(
BizInfo[biz][bOwned] == && BizInfo[biz][bType] == 0)
                {
                      new 
VString[255];
                    new 
name[25];
                    
strmid(nameBizInfo[biz][bName], 0strlen(BizInfo[biz][bName]), 255);
                    
format(VString,sizeof(VString),"%s"name);
                    
BizLabel[biz] = Text3D:CreateDynamic3DTextLabel(VStringCOLOR_GREENBizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z]+0.120INVALID_PLAYER_IDINVALID_VEHICLE_ID0BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                }
                return 
1;
            }
            else if(
strcmp(choice,"Price",true) == 0)
            {
                new 
price strvalEx(params);
                if(!
strlen(params))
                {
                    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /editbiz Price [price]");
                    return 
1;
                }
                if(
BizInfo[biz][bOwned] == 1)
                {
                    
SendClientMessage(playeridCOLOR_GREY"   The business is owned");
                    return 
1;
                }
                if(
BizInfo[biz][bType] == 0)
                {
                    
SendClientMessage(playeridCOLOR_GREY"   The business is not buyable");
                    return 
1;
                }
                if(
price 50000000 || price 0)
                {
                    
SendClientMessage(playeridCOLOR_GREY"   The price must be between $1 - $50,000,000 !");
                    return 
1;
                }
                
BizInfo[biz][bPrice] = price;
                  
DestroyDynamic3DTextLabel(BizLabel[biz]);
                  new 
VString[255];
                
format(VString,sizeof(VString),"Business for sale ! \nPrice: $%d \nType /buybiz to purchase it"price);
                
BizLabel[biz] = Text3D:CreateDynamic3DTextLabel(VStringCOLOR_REDBizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z]+0.120INVALID_PLAYER_IDINVALID_VEHICLE_ID0BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                
format(stringsizeof(string), "You have set this business price to %d."price);
                
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
                return 
1;
            }
            else if(
strcmp(choice,"Type",true) == 0)
            {
                new 
type strvalEx(params);
                if(!
strlen(params))
                {
                    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /editbiz Type [0-5]");
                    
SendClientMessage(playeridCOLOR_GREY"Available types: 0 - Normal building | 1 - 24/7 | 2 - Club | 3 - Ammunation | 4 - Restaurant");
                    
SendClientMessage(playeridCOLOR_GREY"Available types: 5 - Clothing store | 6 - Phone company | 7 - Ad Company | 8 - Lottery");
                    return 
1;
                }
                if(
type || type 8)
                {
                    
SendClientMessage(playeridCOLOR_GREY"   The biz type must be between 0 - 8 !");
                    return 
1;
                }
                
BizInfo[biz][bType] = type;
                  
DestroyDynamic3DTextLabel(BizLabel[biz]);
                  
DestroyDynamicPickup(BizPickup[biz]);
                if(
type == 0)
                {
                    
BizPickup[biz] = CreateDynamicPickup(12391BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                }
                else if(
type != 0)
                {
                    if(
BizInfo[biz][bOwned] == && BizInfo[biz][bType] != 0)
                    {
                        new 
VString[255];
                        new 
price BizInfo[biz][bPrice];
                        
format(VString,sizeof(VString),"Business for sale ! \nPrice: $%d \nType /buybiz to purchase it"price);
                        
BizLabel[biz] = Text3D:CreateDynamic3DTextLabel(VStringCOLOR_REDBizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z]+0.120INVALID_PLAYER_IDINVALID_VEHICLE_ID0BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                        
DestroyDynamicMapIcon(BizIcon[biz]);
                        if(
BizInfo[biz][bType] == 1)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 170);
                        else if(
BizInfo[biz][bType] == 2)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 490);
                        else if(
BizInfo[biz][bType] == 3)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 180);
                        else if(
BizInfo[biz][bType] == 4)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 500);
                        else if(
BizInfo[biz][bType] == 5)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 450);
                        else if(
BizInfo[biz][bType] == 6)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 250);
                        else if(
BizInfo[biz][bType] == 7)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 620);
                        else if(
BizInfo[biz][bType] == 8)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 360);
                    }
                    if(
BizInfo[biz][bOwned] == && BizInfo[biz][bType] != 0)
                    {
                          new 
VString[255];
                        new 
name[25], owner[MAX_PLAYER_NAME];
                           
strmid(ownerBizInfo[biz][bOwner], 0strlen(BizInfo[biz][bOwner]), 255);
                        
strmid(nameBizInfo[biz][bName], 0strlen(BizInfo[biz][bName]), 255);
                        
format(VString,sizeof(VString),"%s \nOwner: %s \nEntry fee: $%d"name,owner,BizInfo[biz][bFee]);
                        
BizLabel[biz] = Text3D:CreateDynamic3DTextLabel(VStringCOLOR_GREENBizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z]+0.120INVALID_PLAYER_IDINVALID_VEHICLE_ID0BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                        
DestroyDynamicMapIcon(BizIcon[biz]);
                        if(
BizInfo[biz][bType] == 1)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 170);
                        else if(
BizInfo[biz][bType] == 2)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 490);
                        else if(
BizInfo[biz][bType] == 3)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 180);
                        else if(
BizInfo[biz][bType] == 4)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 500);
                        else if(
BizInfo[biz][bType] == 5)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 450);
                        else if(
BizInfo[biz][bType] == 6)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 250);
                        else if(
BizInfo[biz][bType] == 7)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 620);
                        else if(
BizInfo[biz][bType] == 8)
                            
BizIcon[biz] = CreateDynamicMapIcon(BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], 360);
                    }
                    if(
BizInfo[biz][bOwned] == && BizInfo[biz][bType] == 0)
                    {
                          new 
VString[255];
                        new 
name[25];
                        
strmid(nameBizInfo[biz][bName], 0strlen(BizInfo[biz][bName]), 255);
                        
format(VString,sizeof(VString),"%s"name);
                        
BizLabel[biz] = Text3D:CreateDynamic3DTextLabel(VStringCOLOR_GREENBizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z]+0.120INVALID_PLAYER_IDINVALID_VEHICLE_ID0BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                        
DestroyDynamicMapIcon(BizIcon[biz]);
                    }
                     
BizPickup[biz] = CreateDynamicPickup(12721BizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z], BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                }
                
format(stringsizeof(string), "You have set this business type to %d."type);
                
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
                return 
1;
            }
            else if(
strcmp(choice,"ID",true) == 0)
            {
                new 
bid strvalEx(params);
                if(!
strlen(params))
                {
                    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /editbiz ID [BizID]");
                    return 
1;
                }
                if(
bid || bid 199)
                {
                    
SendClientMessage(playeridCOLOR_GREY"   The id must be between 0 - 199 !");
                    return 
1;
                }
                
BizEditID[playerid] = bid;
                
format(stringsizeof(string), "You are now editing the biz id %d."bid);
                
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
                return 
1;
            }
            else if(
strcmp(choice,"Name",true) == 0)
            {
            new 
idx;
                new 
length strlen(params);
                while ((
idx length) && (params[idx] <= ' '))
                {
                    
idx++;
                }
                new 
offset idx;
                new 
result[64];
                while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                {
                    
result[idx offset] = params[idx];
                    
idx++;
                }
                
result[idx offset] = EOS;
                if(!
strlen(result))
                {
                    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /editbiz Name [Name]");
                    return 
1;
                }
                if(
InvalidChar(result) == 1)
                {
                    
SendClientMessage(playeridCOLOR_GREY"   ERROR: cannot contain invalid characters  !");
                    return 
1;
                }
                
strmid(BizInfo[biz][bName], result0strlen(result), 25);
                 
DestroyDynamic3DTextLabel(BizLabel[biz]);
                if(
BizInfo[biz][bOwned] == && BizInfo[biz][bType] != 0)
                {
                      new 
VString[255];
                    new 
price BizInfo[biz][bPrice];
                    
format(VString,sizeof(VString),"Business for sale ! \nPrice: $%d \nType /buybiz to purchase it"price);
                    
BizLabel[biz] = Text3D:CreateDynamic3DTextLabel(VStringCOLOR_REDBizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z]+0.120INVALID_PLAYER_IDINVALID_VEHICLE_ID0BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                }
                if(
BizInfo[biz][bOwned] == && BizInfo[biz][bType] != 0)
                {
                      new 
VString[255];
                    new 
name[25], owner[MAX_PLAYER_NAME];
                       
strmid(ownerBizInfo[biz][bOwner], 0strlen(BizInfo[biz][bOwner]), 255);
                    
strmid(nameBizInfo[biz][bName], 0strlen(BizInfo[biz][bName]), 255);
                    
format(VString,sizeof(VString),"%s \nOwner: %s \nEntry fee: $%d"name,owner,BizInfo[biz][bFee]);
                    
BizLabel[biz] = Text3D:CreateDynamic3DTextLabel(VStringCOLOR_GREENBizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z]+0.120INVALID_PLAYER_IDINVALID_VEHICLE_ID0BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                }
                if(
BizInfo[biz][bOwned] == && BizInfo[biz][bType] == 0)
                {
                      new 
VString[255];
                    new 
name[25];
                    
strmid(nameBizInfo[biz][bName], 0strlen(BizInfo[biz][bName]), 255);
                    
format(VString,sizeof(VString),"%s"name);
                    
BizLabel[biz] = Text3D:CreateDynamic3DTextLabel(VStringCOLOR_GREENBizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z]+0.120INVALID_PLAYER_IDINVALID_VEHICLE_ID0BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                }
                
format(stringsizeof(string), "You have set this biz name to %s."result);
                
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
                return 
1;
            }
            else if(
strcmp(choice,"VW",true) == 0)
            {
                new 
vw strvalEx(params);
                if(!
strlen(params))
                {
                    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /editbiz VW [VirtualWorld]");
                    return 
1;
                }
                
BizInfo[biz][bVirtualWorld] = vw;
                
format(stringsizeof(string), "You have set this biz virtual world to %d."vw);
                
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
                return 
1;
            }
            else if(
strcmp(choice,"Products",true) == 0)
            {
                new 
prod strvalEx(params);
                if(!
strlen(params))
                {
                    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /editbiz Products [amount]");
                    return 
1;
                }
                
BizInfo[biz][bProducts] = prod;
                
format(stringsizeof(string), "You have set this biz products to %d."prod);
                
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
                return 
1;
            }
            else if(
strcmp(choice,"Jackpot",true) == 0)
            {
                new 
jpot strvalEx(params);
                if(!
strlen(params))
                {
                    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /editbiz Jackpot [jackpot]");
                    return 
1;
                }
                
BizInfo[biz][bLottoJackpot] = jpot;
                
format(stringsizeof(string), "You have set this biz jackpot to %d."jpot);
                
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
                return 
1;
            }
            else if(
strcmp(choice,"LottoTime",true) == 0)
            {
                new 
ltime strvalEx(params);
                if(!
strlen(params))
                {
                    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /editbiz LottoTime [0/1]");
                    return 
1;
                }
                
BizInfo[biz][bLottoTime] = ltime;
                
format(stringsizeof(string), "You have set this biz lotto time to %d."ltime);
                
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
                return 
1;
            }
            else if(
strcmp(choice,"Sellbiz",true) == 0)
            {
            
                new 
x_nr[32];
                if(!
strlen(x_nr))
                {
                    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /editbiz Sellbiz [confirm]");
                    
SendClientMessage(playeridCOLOR_YELLOW,"Are you sure ? !");
                    return 
1;
                }
                if(
strcmp(x_nr,"confirm",true) == 0)
                {
                    if(
BizInfo[biz][bOwned] == 0)
                    {
                        
SendClientMessage(playeridCOLOR_GRAD1"   This biz is not owned !");
                        return 
1;
                    }
                    
BizInfo[biz][bOwned] = 0;
                    
BizInfo[biz][bLocked] = 0;
                    
DestroyDynamic3DTextLabel(BizLabel[biz]);
                    
strmid(BizInfo[biz][bOwner], "The State"0strlen("The State"), 255);
                    new 
VString[255];
                    new 
price BizInfo[biz][bPrice];
                    
format(VString,sizeof(VString),"Business for sale ! \nPrice: $%d \nType /buybiz to purchase it"price);
                    
BizLabel[biz] = Text3D:CreateDynamic3DTextLabel(VStringCOLOR_REDBizInfo[biz][bLocation_x], BizInfo[biz][bLocation_y], BizInfo[biz][bLocation_z]+0.120INVALID_PLAYER_IDINVALID_VEHICLE_ID0BizInfo[biz][bPVW], BizInfo[biz][bPInt], -1100.0);
                    
SendClientMessage(playerid,COLOR_YELLOW"Biz sold !");
                }
            }
            return 
1;
        } 
Reply


Messages In This Thread
Editing Business - by FaZeRs - 11.02.2014, 13:46
Re: Editing Business - by FaZeRs - 11.02.2014, 17:35
Re: Editing Business - by FaZeRs - 11.02.2014, 18:10

Forum Jump:


Users browsing this thread: 1 Guest(s)