Get Nearest Vehicle
#5

Right using your "stock" I made /lock command
pawn Код:
COMMAND:lock(playerid,params[])
{
    new pName[MAX_PLAYER_NAME];GetPlayerName(playerid,pName,sizeof pName);
    new vehicleid;
    vehicleid = GetClosestVehicle(playerid, 5);
    new veh = GetPlayerVehicleID(playerid);
    if(IsVehiclePrivate(veh))
    {
        if(strcmp(pName,PrivateVehicles[ConvertVID(veh)][_owner]))
        {
            SendClientMessage(playerid,COLOR_WHITE,"Closest vehicle doesn't belong to you!");
            return 1;
        }
        else
        {
            veh = ConvertVID(veh);
            PrivateVehicles[veh][_locked] = 0;
            SendClientMessage(playerid,COLOR_RED,"Car Locked!");
            SetVehicleParamsEx(vehicleid,engine,lights,alarm,0,bonnet,boot,objective);
        }
    }
    return 1;
}
But it doesn't work, It keeps coming up with Car Locked when you type it, It doesn' matter how far away from the car you are and if closest car is your car, it just comes up "Car Locked", any ideas?
Reply


Messages In This Thread
Get Nearest Vehicle - by HondaCBR - 31.12.2011, 11:53
AW: Get Nearest Vehicle - by BigETI - 31.12.2011, 12:21
Re: AW: Get Nearest Vehicle - by WooTFTW - 31.12.2011, 12:35
Re: Get Nearest Vehicle - by HondaCBR - 31.12.2011, 12:40
Re: Get Nearest Vehicle - by HondaCBR - 31.12.2011, 13:01
Re: Get Nearest Vehicle - by WooTFTW - 31.12.2011, 13:10
AW: Get Nearest Vehicle - by BigETI - 31.12.2011, 13:19
Re: AW: Get Nearest Vehicle - by WooTFTW - 31.12.2011, 13:28
AW: Re: AW: Get Nearest Vehicle - by BigETI - 31.12.2011, 13:38
Re: Get Nearest Vehicle - by HondaCBR - 31.12.2011, 13:47

Forum Jump:


Users browsing this thread: 1 Guest(s)