Help On this CMD
#3

Код:
CMD:bizwithdraw(playerid, params[])
{
    for(new biz = 0; biz < MAX_BIZ; biz++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 100, BizInfo[biz][IXCoord], BizInfo[biz][IYCoord], BizInfo[biz][IZCoord]))
        {
            if(GetPlayerVirtualWorld(playerid) == BizInfo[biz][VW])
            {
                if(strcmp(BizInfo[biz][Owner], GetPlayerNameEx(playerid), true)) == 0)
                {
                    new money;
                    if(sscanf(params,"d", money)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bizwithdraw [amount]");
                    if(money > BizInfo[biz][Till]) return SendClientMessage(playerid, COLOR_GRAD2, "You don't have that much money in your Till!");
                    new string[150];
                    format(string,sizeof(string),"You've taken $%d out of your Business Till.", money);
                    SendClientMessage(playerid, COLOR_GREY, string);
                     GivePlayerCash(playerid, money);
                     BizInfo[biz][Till] -= money;
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "You're not in your bussiness.");
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Help On this CMD - by Bojaa - 15.05.2017, 09:06
Re: Help On this CMD - by XtremeRz - 15.05.2017, 09:26
Re: Help On this CMD - by Bolex_ - 15.05.2017, 09:37
Re: Help On this CMD - by Bojaa - 15.05.2017, 09:53
Re: Help On this CMD - by Tord - 15.05.2017, 10:00
Re: Help On this CMD - by Bojaa - 15.05.2017, 14:27
Re: Help On this CMD - by Tord - 15.05.2017, 15:40
Re: Help On this CMD - by GTLS - 15.05.2017, 16:18
Re: Help On this CMD - by DRIFT_HUNTER - 15.05.2017, 16:57

Forum Jump:


Users browsing this thread: 1 Guest(s)