problem with /duty
#1

i did LSFD faction and when i try to off duty it's doing that:

as you can see it's not off duty
the code:
pawn Код:
else if(PlayerInfo[playerid][pMember] == 19||PlayerInfo[playerid][pLeader] == 19)
            {
                    if (!PlayerToPoint(10, playerid, 2803.7346,-1680.6244,664.4708)) return SendClientMessage(playerid,COLOR_RED,"you aren't at the locker room!!");
                    if(OnDuty[playerid]==0)
                    {
                        format(string, sizeof(string), "* The fire man %s takes out the uniform and the eiqupment from the locker", sendername);
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        SetPlayerSkin(playerid,277);
                        AC_GivePlayerWeapon(playerid,42,5000);
                    }

                    else if(OnDuty[playerid]==1)
                    {
                        format(string, sizeof(string), "* The fire man %s puts hes uniform and the eiquipment in the locker", sendername);
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        SetPlayerSkin(playerid,PlayerInfo[playerid][pModel]);
                        AC_ResetPlayerWeapons(playerid);
                        SetPlayerArmour(playerid, 0);
                        OnDuty[playerid] = 0;
                    }

            return 1;
Reply
#2

erm on the off duty try removing the else


e.g

if(OnDuty[playerid]==1)
Reply
#3

When going on duty, add
pawn Код:
OnDuty[playerid] = 1;
after AC_GivePlayerWeapon.
Reply
#4

Quote:
Originally Posted by Tom1412
Посмотреть сообщение
erm on the off duty try removing the else


e.g

if(OnDuty[playerid]==1)
No.

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
When going on duty, add
pawn Код:
OnDuty[playerid] = 1;
after AC_GivePlayerWeapon.
Yes.
Reply
#5

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
When going on duty, add
pawn Код:
OnDuty[playerid] = 1;
after AC_GivePlayerWeapon.
Thank you very much +rep!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)