/lockfcar issue
#1

So when I just ride the car in it's position I can do /lockfcar when its on its position [where I created it], but when I just walk away from the position I wont be able to do /lockfcar it says that Im not near a familycar

Here's the code:
pawn Код:
}
    if(strcmp(cmd, "/lockfcar", true) == 0)
    {
            new sendername2[MAX_PLAYER_NAME+1];
            GetPlayerName(playerid, sendername2,MAX_PLAYER_NAME);
            for(new fv=0;fv<MAX_FAMVEHICLES;fv++)
            {
                if(fVehicleInfo[fv][fvID] != 0 &&IsPlayerInRangeOfPoint(playerid, 5.0, fVehicleInfo[fv][fvX], fVehicleInfo[fv][fvY], fVehicleInfo[fv][fvZ]))
                {
                    if(PlayerInfo[playerid][pFMember] == fVehicleInfo[fv][fvFam])
                    {
                        if(fVehicleInfo[fv][fvLocked] != 0)
                        {
                            fVehicleInfo[fv][fvLocked] = 0;
                            UnLockCar(fVehicleInfo[fv][fvID]);
                            format(string, sizeof(string), "* %s has unlocked the family car.", sendername2);
                            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            return 1;
                        }
                        if(fVehicleInfo[fv][fvLocked] == 0)
                        {
                            fVehicleInfo[fv][fvLocked] = 1;
                            LockCar(fVehicleInfo[fv][fvID]);
                            format(string, sizeof(string), "* %s has locked the family car.", sendername2);
                            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            return 1;
                        }
                    }
                    else
                    {
                        return SendClientMessage(playerid, COLOR_GREY," You're not in the family that owns this car !");
                    }
                }
                else
                {
                    if(fv != MAX_FAMVEHICLES-1)
                    {
                        continue;
                    }
                    else
                    {
                        return SendClientMessage(playerid, COLOR_GREY," You're not near to any family car !");
                    }
                }
            }
            return 1;
    }
Reply


Messages In This Thread
/lockfcar issue - by Stanford - 18.04.2013, 17:14
Re: /lockfcar issue - by Necip - 18.04.2013, 17:20
Re: /lockfcar issue - by Stanford - 18.04.2013, 17:32
Re: /lockfcar issue - by Stanford - 18.04.2013, 17:34
Re: /lockfcar issue - by Pottus - 18.04.2013, 17:37
Re: /lockfcar issue - by BigGroter - 18.04.2013, 17:44
Re: /lockfcar issue - by Stanford - 19.04.2013, 07:10
Re: /lockfcar issue - by Stanford - 19.04.2013, 08:23
Re: /lockfcar issue - by dr.lozer - 19.04.2013, 08:29
Re: /lockfcar issue - by Stanford - 19.04.2013, 15:09

Forum Jump:


Users browsing this thread: 1 Guest(s)