need help as soon as possible plss..
#4

pawn Код:
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);
                done = 0;
                lockdone = 0;
            }
            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;
 }
Try this?
Reply


Messages In This Thread
need help as soon as possible plss.. - by iThePunisher - 19.01.2014, 10:42
Re: need help as soon as possible plss.. - by FailerZ - 19.01.2014, 10:44
Re: need help as soon as possible plss.. - by iThePunisher - 19.01.2014, 11:18
Re: need help as soon as possible plss.. - by iOxide - 19.01.2014, 11:33
Re: need help as soon as possible plss.. - by iThePunisher - 19.01.2014, 11:38
Re: need help as soon as possible plss.. - by iOxide - 19.01.2014, 11:47
Re: need help as soon as possible plss.. - by InglewoodRoleplay - 19.01.2014, 12:07

Forum Jump:


Users browsing this thread: 1 Guest(s)