FuriouZ Posted May 10, 2013 Share 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 ? Link to comment
Moderators IIYAMA Posted May 10, 2013 Moderators Share 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 Link to comment
Moderators IIYAMA Posted May 10, 2013 Moderators Share 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. Link to comment
FuriouZ Posted May 10, 2013 Author Share Posted May 10, 2013 This is vehicle handbrake. Link to comment
Moderators IIYAMA Posted May 10, 2013 Moderators Share 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.) Link to comment
Blaawee Posted May 11, 2013 Share Posted May 11, 2013 https://wiki.multitheftauto.com/wiki/Call Link to comment
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