Asellbiz help script
#1

Hi.. i have problem, my script not working. i use /asellhouse, but i must use /sellbiz again to sell it.

PHP код:
CMD:asellbizz(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] < 99999 || PlayerInfo[playerid][pShopTech] == 0)
    {
        
SendClientMessageEx(playerid,COLOR_WHITE,"Co Owner Admin Only or Shop Tech");
        return 
1;
    }
    new 
string[128], biz;
    new 
businesstype[128];
    if(
sscanf(params"d"biz)) return SendClientMessageEx(playeridCOLOR_WHITE"USAGE: /asellbiz [bizid]");
    if(
IsPlayerInRangeOfPoint(playerid3.0,BizzInfo[biz][bEntranceX],BizzInfo[biz][bEntranceY],BizzInfo[biz][bEntranceZ]))
    {
        if(
PlayerInfo[BizzInfo[biz][bOwner]][pPBiskey2] == biz)
        {
            
PlayerInfo[BizzInfo[biz][bOwner]][pPBiskey2] = 0;
            return 
1;
        }
        else if(
PlayerInfo[BizzInfo[biz][bOwner]][pPBiskey] == biz)
        {
            
PlayerInfo[BizzInfo[biz][bOwner]][pPBiskey] = 0;
        }
        if(
BizzInfo[biz][bType] > 0)
        {
            if(
BizzInfo[biz][bType] == 1) { businesstype "24-7";}
            else if(
BizzInfo[biz][bType] == 2) { businesstype "Clothes Store";}
            else if(
BizzInfo[biz][bType] == 3) { businesstype "Club";}
            else if(
BizzInfo[biz][bType] == 4) { businesstype "Ammunation";}
            else if(
BizzInfo[biz][bType] == 5) { businesstype "Casino";}
            else if(
BizzInfo[biz][bType] == 6) { businesstype "Restaurant";}
            else if(
BizzInfo[biz][bType] == 7) { businesstype "Paintball";}
            else if(
BizzInfo[biz][bType] == 8) { businesstype "Bank";}
            else if(
BizzInfo[biz][bType] == 9) { businesstype "Electronic Store";}
            else if(
BizzInfo[biz][bType] == 10) { businesstype "Equipment Store";}
            else if(
BizzInfo[biz][bType] == 11) { businesstype "Sex shop";}
        }
        else
        {
            
businesstype "Not Available";
        }
          
BizzInfo[biz][bOwned] = 0;
        
BizzInfo[biz][bLocked] = 1;
        
format(BizzInfo[biz][bOwner], 128"Nobody" );
        
format(BizzInfo[biz][bMessage], 255"Nothing" );
        
PlayerPlaySound(playerid10520.00.00.0);
        
        
SaveBusiness(biz);
        
DestroyDynamicPickup(BizzInfo[biz][bPickupID]);
        
BizzInfo[biz][bPickupID] = CreateDynamicPickup(127323BizzInfo[biz][bEntranceX], BizzInfo[biz][bEntranceY], BizzInfo[biz][bEntranceZ]);
        
DestroyDynamic3DTextLabel(business1[biz]);
        
format(stringsizeof(string), "{FF0000}[%s Sell Bizz]{0080FF}\nPrice: $%d\nLevel: %d\nBizz ID: %d\n/buybiz untuk membeli bizz"businesstype,BizzInfo[biz][bBuyPrice],BizzInfo[biz][bLevelNeeded], biz);
        
business2[biz] = CreateDynamic3DTextLabel(stringCOLOR_WHITEBizzInfo[biz][bEntranceX], BizzInfo[biz][bEntranceY], BizzInfo[biz][bEntranceZ]+0.75,10.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,0,-1,-1100.0);
    }
    
SendClientMessageEx(playeridCOLOR_WHITE"You need to be near your house(exterior) in order to sell it.");
     return 
1;

Reply
#2

Lolzz xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)