Norhy Posted January 9, 2013 Share Posted January 9, 2013 I have a button, on which when the player click he should be spawned, but it doesn't work. -- Client-side: addEventHandler('onClientGUIClick', root, function() if source == btnTest then triggerServerEvent ( "spawnTest", source ) end end) -- Server-side: function spawnTest ( ) spawnPlayer ( source, 2500.78955, -1672.70386, 13.35180, 0, 0, 0, 0 ) fadeCamera ( true ) end addEvent ( "spawnTest", true ) addEventHandler ( "spawnTest", getRootElement ( ), spawnTest ) However it doesn't work, i have no errors / warning. Link to comment
Vision Posted January 9, 2013 Share Posted January 9, 2013 Change this triggerServerEvent ( "spawnTest", source ) to this triggerServerEvent ( "spawnTest", localPlayer ) Link to comment
Norhy Posted January 9, 2013 Author Share Posted January 9, 2013 I just noticed that it was not the problem, however thanks. 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