Jump to content

problem in code


Professional

Recommended Posts

hello 

 

i have problem in this code

he not working

whyyyyyyyyyyyy ????????????????????????????????????????????????????????? 

local Vehicle = createVehicle ( 470, 2485.3427734375, -1665.353515625, 13.34375 ) 
  
 function weapon() 
 if ( Vehicle ) then 
 triggerClientEvent(root,'createClientWeapon',source,Vehicle) 
  end
 end
addCommandHandler( "gocar", Vehicle, Weapon)

 

 problem in = addCommandHandler 

Link to comment
  • Moderators

A typo

And the predefined variable source does not exist with addCommandHandlers. Use the first parameter instead.

 

local Vehicle = createVehicle ( 470, 2485.3427734375, -1665.353515625, 13.34375 )

 

function weapon(player)

if ( Vehicle ) then

triggerClientEvent(root, 'createClientWeapon', player, Vehicle)

end

end

addCommandHandler( "gocar", Vehicle, Weapon)

Link to comment
  • Moderators

@xeon17

It is a kind of addiction, except for the wasting part. I am well aware that I shouldn't.

If you had some lessons around ethical, you would know what I am talking about. Because it is a very common addiction and most of the time overlooked. Yet, everybody has this addiction.

With other words: the feeling of being needed.

 

  • Like 3
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...