SA-MP Forums Archive
problem with /duty - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: problem with /duty (/showthread.php?tid=289786)



problem with /duty - Chris_Morrison - 12.10.2011

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;



Re: problem with /duty - Tom1412 - 12.10.2011

erm on the off duty try removing the else


e.g

if(OnDuty[playerid]==1)


Re: problem with /duty - SuperViper - 13.10.2011

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


Re: problem with /duty - TheLazySloth - 13.10.2011

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.


Re: problem with /duty - Chris_Morrison - 13.10.2011

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