/offduty problems
#1

Hi i have edited my /duty command so u only need to do /offduty to go offduty and /equip to go onduty. The /equip works good now but the /offduty dosnt do anything, i get no errors or anything like that the only thing is that when i do it in game it dosnt do anything, im not going off duty or anything else so here is the cmd and i hope you will be able to solove the problem.
pawn Код:
if(strcmp(cmd, "/offduty", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerToPoint(3, playerid,220.4274,74.9089,1005.0391) || PlayerToPoint(3,playerid,1345.89,521.74,1067.76) || PlayerToPoint(3,playerid,1565.35,-1671.68,1723.10) || PlayerToPoint(3,playerid,233.5504,124.9487,1003.2188) || PlayerToPoint(3,playerid,203.5945,1869.5051,13.1406) || PlayerToPoint(3,playerid,-1342.0365,494.2091,11.1953) || PlayerToPoint(3,playerid,-228.5113,980.5826,13.1000) || PlayerInfo[playerid][pLocal] != 255)
            {
                if(PlayerInfo[playerid][pDuty] == 1)
                {
                    if(IsAFreecop(playerid))
                    {
                        format(string, sizeof(string), "* Voluntary Officer %s places his Badge and Gun in his locker.", sendername);
                        ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                        SafeResetPlayerWeapons(playerid);
                        PlayerInfo[playerid][pDuty] = 0;
                        SetPlayerColor(playerid, TEAM_HIT_COLOR);
                        new originalskin = PlayerInfo[playerid][pModel];
                        SetPlayerSkin(playerid, originalskin);
                        PlayerInfo[playerid][pChar] = 0;
                        SetPlayerWeapons(playerid);
                        return 1;
                    }
                    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
                    {
                        OnSwatDuty[playerid] = 0;
                        format(string, sizeof(string), "* Officer %s places his Badge and Gun in his locker.", sendername);
                    }
                    else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
                    {
                        OnTacticalDuty[playerid] = 0;
                        format(string, sizeof(string), "* Agent %s places his Badge and Gun in his locker.", sendername);
                        SetPlayerColor(playerid, 0xFFFFFFFF);
                    }
                    else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
                            {
                        OnSpecialFDuty[playerid] = 0;
                        format(string, sizeof(string), "* Sheriff %s places his Badge and Gun in his locker.", sendername);
                    }
                    else if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
                    {
                        OnSpecialFDuty[playerid] = 0;
                        format(string, sizeof(string), "* Army Member %s places his Badge and Gun in his locker.", sendername);
                    }
                    ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    SafeResetPlayerWeapons(playerid);
                    SafeSetPlayerArmour(playerid, 0);
                    SafeGivePlayerWeapon(playerid, 41, 500);
                    PlayerInfo[playerid][pDuty] = 0;
                    SetPlayerColor(playerid, TEAM_HIT_COLOR);
                    new originalskin = PlayerInfo[playerid][pModel];
                    SetPlayerSkin(playerid, originalskin);
                    AttachWeaponCorrectly(playerid, 99);
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "** You are not in a locker room !");
                return 1;
            }


            new y, m, d;
            new h,mi,s;
            getdate(y,m,d);
            gettime(h,mi,s);
            format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /offduty",d,m,y,h,mi,s,sendername);
            CommandLog(string);
        }
        return 1;
    }
Reply
#2

some help would be aprieated
Reply
#3

i didnt rlly understand.. maybe you could explain in some other way?
Reply
#4

Help please
Reply
#5

bump
Reply
#6

Cant anyone help me?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)