Help with IsPlayerInRangeOfPoint
#1

This is a line in my duty system for the FD, For some reason I always get "You are not at the Firemen Lockers!" even when I am on the points that should make me on duty. Whats wrong and how can I fix this?

Here is the code:
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);
                    }
                }
            }
PS: When I removed the "!" to test the points, they worked perfectly... But whats wrong now!?!?

Thanks: jakejohnsonusa
Reply


Messages In This Thread
Help with IsPlayerInRangeOfPoint - by jakejohnsonusa - 16.12.2012, 02:54
Re: Help with IsPlayerInRangeOfPoint - by Joshua1 - 16.12.2012, 03:01
Re: Help with IsPlayerInRangeOfPoint - by Randy More - 16.12.2012, 03:28
Re: Help with IsPlayerInRangeOfPoint - by jakejohnsonusa - 16.12.2012, 11:31
Re: Help with IsPlayerInRangeOfPoint - by Mike_Peterson - 16.12.2012, 11:41
Re: Help with IsPlayerInRangeOfPoint - by jakejohnsonusa - 16.12.2012, 12:15
Re: Help with IsPlayerInRangeOfPoint - by Mike_Peterson - 16.12.2012, 12:29
Re: Help with IsPlayerInRangeOfPoint - by jakejohnsonusa - 16.12.2012, 12:48
Re: Help with IsPlayerInRangeOfPoint - by [DOG]irinel1996 - 16.12.2012, 12:58
Re: Help with IsPlayerInRangeOfPoint - by jakejohnsonusa - 16.12.2012, 13:05

Forum Jump:


Users browsing this thread: 3 Guest(s)