Jump to content

Little help please


FuriouZ

Recommended Posts

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:

mta-screen_2013-05-10_17-18-05.png

What is problem ?

Link to comment
  • Moderators
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 by Guest
Link to comment
  • Moderators

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
  • Moderators

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...