Business system help [Help]
#4

make this
Код:
 CMD:lockb(playerid, params[])
{
    new string[128], idx, done, lockdone;
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(PlayerInfo[playerid][pBiz])
    {
        if(IsPlayerInRangeOfPoint(playerid, 2, BizInfo[PlayerInfo[playerid][pBiz]][bX], BizInfo[PlayerInfo[playerid][pBiz]][bY], BizInfo[PlayerInfo[playerid][pBiz]][bZ]))
        {
            if(!BizInfo[PlayerInfo[playerid][pBiz]][bStatus])
            {
                BizInfo[PlayerInfo[playerid][pBiz]][bStatus] = 1;
                format(string, sizeof(string), "[Business ID: %d]\nBusiness Type: %s\nBusiness Owner: %s\nStatus: %s", PlayerInfo[playerid][pBiz], RBT(PlayerInfo[playerid][pBiz]), BizInfo[PlayerInfo[playerid][pBiz]][bOwner], RBS(PlayerInfo[playerid][pBiz]));
                UpdateDynamic3DTextLabelText(BizInfo[PlayerInfo[playerid][pBiz]][bText], COLOR_WHITE, string);
                format(string, sizeof(string), "* %s takes out their business keys and unlocks it.", RPN(playerid));
                SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
                GameTextForPlayer(playerid, "~g~Business Unlocked", 3500, 3);
            }
            else if(BizInfo[PlayerInfo[playerid][pBiz]][bStatus])
            {
                BizInfo[PlayerInfo[playerid][pBiz]][bStatus] = 0;
                format(string, sizeof(string), "[Business ID: %d]\nBusiness Type: %s\nBusiness Owner: %s\nStatus: %s", PlayerInfo[playerid][pBiz], RBT(PlayerInfo[playerid][pBiz]), BizInfo[PlayerInfo[playerid][pBiz]][bOwner], RBS(PlayerInfo[playerid][pBiz]));
                UpdateDynamic3DTextLabelText(BizInfo[PlayerInfo[playerid][pBiz]][bText], COLOR_WHITE, string);
                format(string, sizeof(string), "* %s takes out their business keys and locks it.", RPN(playerid));
                SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
                GameTextForPlayer(playerid, "~r~Business Locked", 3500, 3);
   }
            done = 1;
            lockdone = 1;
            }
        }
        return 1;
    }
Reply


Messages In This Thread
Business system help [Help] - by Kaylen - 01.09.2014, 16:05
Re: Business system help [Help] - by Stanford - 01.09.2014, 16:07
Re: Business system help [Help] - by Kaylen - 01.09.2014, 16:23
Re: Business system help [Help] - by Barnwell - 01.09.2014, 17:04

Forum Jump:


Users browsing this thread: 1 Guest(s)