Help with Multiple points to a /duty
#1

Here is what I have for the Firefighter faction duty command. The problem is, is that only the first point is working as a duty point. What did I do wrong? How can I fix it so both points are duty points for the /duty command?

/duty code for firefighters:
pawn Код:
else if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
            {
                if(!IsPlayerInRangeOfPoint(playerid, 3.0, 2811.7837,-1167.3248,1025.5703) || IsPlayerInRangeOfPoint(playerid, 3.0, 1924.24,-1876.71,12.94))
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "You are not at the Firemen Lockers!");
                    return 1;
                }
                if(JobDuty[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_WHITE, "* You are now Off Duty from your Firemen Job and will not receive calls anymore.");
                    JobDuty[playerid] = 0;
                    SetPlayerColor(playerid, TEAM_HIT_COLOR);
                    SafeResetPlayerWeapons(playerid);
                    new originalskin = PlayerInfo[playerid][pModel];
                    SetPlayerSkin(playerid, originalskin);
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "* You are now On Duty with your Firemen Job and will receive calls from people in need.");
                    JobDuty[playerid] = 1;
                    SetPlayerColor(playerid, 0xAA333300);
                    SafeGivePlayerWeapon(playerid, 42, 2500);
                    SafeGivePlayerWeapon(playerid, 6, 1);

                    new rand = random(2)//change it to the number of skins you want
                    switch(rand)
                    {
                    case 0: SetPlayerSkin(playerid, 277);
                    case 1: SetPlayerSkin(playerid, 278);
                    }
                }
            }
Reply
#2

Shouldn't
pawn Код:
IsPlayerInRangeOfPoint(playerid, 3.0, 1924.24,-1876.71,12.94)
be:
pawn Код:
!IsPlayerInRangeOfPoint(playerid, 3.0, 1924.24,-1876.71,12.94)
??

pawn Код:
if(!IsPlayerInRangeOfPoint(playerid, 3.0, 2811.7837,-1167.3248,1025.5703) || !IsPlayerInRangeOfPoint(playerid, 3.0, 1924.24,-1876.71,12.94))
Reply
#3

Yes, THANKS! I will fix and test now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)