hey guys, I want to know how to create a vehicle propertypropertyvalue because the only thing we have is GetVehiclePropertyValue and SetVehiclePropertyValue and I have an error when I do this code (all the code work properly without it so my code is not the error and sorry for my english, im from montreal):
function CheckVehicleLocked(player, nearestVehicle)
local nearPlate = GetVehicleLicensePlate(nearestVehicle)
if tostring(vehiclekey[playervehicle].owner) == tostring(GetPlayerSteamId(player)) then
if GetVehiclePropertyValue(nearestCar, "locked") then
AddPlayerChat(player, "vehicule deverouiller")
SetVehiclePropertyValue(nearestCar, "locked", false, true)
else
AddPlayerChat(player, "vehicule verouiller")
SetVehiclePropertyValue(nearestCar, "locked", true, true)
end
return
else
print("sa marche pas")
end
end
function CheckVehicleLocked(player, nearestVehicle)
local nearPlate = GetVehicleLicensePlate(nearestVehicle)
if tostring(vehiclekey[playervehicle].owner) == tostring(GetPlayerSteamId(player)) then
if GetVehiclePropertyValue(nearestCar, "locked") then
AddPlayerChat(player, "vehicule deverouiller")
SetVehiclePropertyValue(nearestCar, "locked", false, true)
else
AddPlayerChat(player, "vehicule verouiller")
SetVehiclePropertyValue(nearestCar, "locked", true, true)
end
return
else
print("sa marche pas")
end
end
Comment