[HELP]Business
#6

pawn Код:
if(strcmp(cmd, "/sellbusiness", true) == 0 || strcmp(cmd, "/sellbiz", true) == 0)
    {
        if(PlayerInfo[playerid][pBusinessKey] == INVALID_BUSINESS_ID)
        {
            SendClientMessage(playerid, COLOR_RED, "You cannot sell your business because you don't have one.");
            return 1;
        }
        else
        {
            new businessid = PlayerInfo[playerid][pBusinessKey];
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            SendClientMessage(playerid, COLOR_YELLOW, "You have successfully sold your business.");

            PlayerInfo[playerid][pBusinessKey] = INVALID_BUSINESS_ID;

            new bizzname[32];
            strmid(bizzname, BusinessInfo[businessid][bDescription], 3, strlen(BusinessInfo[businessid][bDescription]), 32);
            format(string, sizeof(string), "%s has sold business %s.", PlayerName[playerid], BusinessInfo[businessid][bDescription]);
            SendClientMessageToAll(COLOR_YELLOW, string);

            GivePlayerMoney(playerid, BusinessInfo[businessid][bPrice]/2);
            SellBusiness(businessid);
            OnBusinessUpdate();
        }
        return 1;
    }
Reply


Messages In This Thread
[HELP]Business - by [Aka]Dragonu - 01.09.2011, 11:44
Re: [HELP]Business - by Pinguinn - 01.09.2011, 12:29
Re: [HELP]Business - by [Aka]Dragonu - 01.09.2011, 12:33
Re: [HELP]Business - by Pinguinn - 01.09.2011, 12:34
Re: [HELP]Business - by [Aka]Dragonu - 01.09.2011, 12:37
Re: [HELP]Business - by Jafet_Macario - 01.09.2011, 13:25
Re: [HELP]Business - by [Aka]Dragonu - 01.09.2011, 13:27
Re: [HELP]Business - by Jafet_Macario - 01.09.2011, 13:34
Re: [HELP]Business - by [Aka]Dragonu - 01.09.2011, 13:45

Forum Jump:


Users browsing this thread: 1 Guest(s)