Professional

problem in code

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 

Share this post


Link to post

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)

Share this post


Link to post
1 hour ago, Professional said:

I do not know did not work

OK, bye

 

  • Like 3
  • Haha 2

Share this post


Link to post

@IIYAMA

I wanted to ask you this question for a couple of weeks already. You seem like a very intelligent guy. But why are you wasting your time dealing with people like @Professional

The forum and the game itself are full of braindead people, what's the point? 

(No offence , I truly respect your work)

  • Like 1
  • Haha 2
  • Confused 1

Share this post


Link to post

@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

Share this post


Link to post

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.