FuriouZ Posted May 10, 2013 Posted May 10, 2013 Hey all ! I have problem 'failed to call' Here is one code: if exports['EGvehicles']:isElementFrozen(vehicle) then dxDrawImage(ax,ay,32,37,"images/hud/park.png") ax = ax - 34 end And where i need to call function(player, cmd) local vehicle = getPedOccupiedVehicle(player) if vehicle and getVehicleController(vehicle) == player then if isElementFrozen(vehicle) then setElementData(vehicle, "vehicle.handbrake", 0) setElementFrozen(vehicle, false) else setElementData(vehicle, "vehicle.handbrake", 1) setElementFrozen(vehicle, true) end end end ) And debug: What is problem ?
Moderators IIYAMA Posted May 10, 2013 Moderators Posted May 10, 2013 (edited) if exports['EGvehicles']:isElementFrozen(vehicle) then It means that the script that receives this export does not accept these. The function isn't defined. Edited May 10, 2013 by Guest
Moderators IIYAMA Posted May 10, 2013 Moderators Posted May 10, 2013 The function isn't defined. if exports['EGvehicles']: checkFrozen(player) then meta.xml <export function="checkFrozen" type="server"/> function checkFrozen(player) local vehicle = getPedOccupiedVehicle(player) if vehicle and getVehicleController(vehicle) == player then if isElementFrozen(vehicle) then setElementData(vehicle, "vehicle.handbrake", 0) setElementFrozen(vehicle, false) else setElementData(vehicle, "vehicle.handbrake", 1) setElementFrozen(vehicle, true) end end end Also calling onClientRender isn't a very good idea.
Moderators IIYAMA Posted May 10, 2013 Moderators Posted May 10, 2013 If you can't be a little bit clearer I can't help you. Here a both you got a perfect caller. It your codes don't contain the correct information I will be very hard to help you. (script names etc.)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now