whats wrong .
#1

i have this cmd for /sellbus but the prob is .. i can sell any bus in the game

lets say i own "sex shop" biz and my friend own "4D" biz. if i went to his biz and did /sellbus i cant cuz i already have no biz. but if i bought biz and went to my friend biz then i can sell it . i hope u guys got that i mean.

here the cmd ( i think the prob with it not with another stuff )

pawn Код:
dcmd_sellbus(playerid,params[])
{
    #pragma unused params
 if(DoesPlayerOwnBusiness(playerid) == 0) return SendClientMessage(playerid,COLOUR_RED,"You do not own any business");
    else
    {
        if(IsPlayerInRangeOfOwnedBusiness(playerid) != -1)
        {
            new biz[50],pname[MAX_PLAYER_NAME];
            new b = IsPlayerInRangeOfOwnedBusiness(playerid);
            new string[128];
            new name[MAX_STRING];
            format(biz,sizeof(biz),"%iBusinessname",b);
            name = dini_Get("business.ini",biz);
            format(string,sizeof(string),"You have sold %s",name);
            SendClientMessage(playerid,COLOUR_YELLOW,string);
            OwnsBusiness[playerid] = 0;
            format(biz,sizeof(biz),"%iOwner",b);
            dini_IntSet("business.ini",biz,0);
            format(biz,sizeof(biz),"%iCost",b);
            new cash = dini_Int("Business.ini",biz);
            GivePlayerMoney(playerid,cash);
            OwnsBusiness[playerid] = 0;
            GetPlayerName(playerid,pname,sizeof(pname));
            dini_IntSet("Business.ini",pname,0);
            }
        else return SendClientMessage(playerid,COLOUR_RED,"You are not in range of your business!");
        }
    return 1;
}
i can show u the whole script if u want. every thing is working great except this i rly need it done! ty ^
Reply


Messages In This Thread
whats wrong . - by [bs]_lancer - 23.07.2011, 23:04
Re: whats wrong . - by Mean - 23.07.2011, 23:46
Re: whats wrong . - by [bs]_lancer - 24.07.2011, 00:20
Re: whats wrong . - by Mean - 24.07.2011, 09:29

Forum Jump:


Users browsing this thread: 1 Guest(s)