Chlorek Posted June 19, 2011 Posted June 19, 2011 Yo. I have one (I think easy for you scripters) question, so is it possible to warp player to a car using client side function? IF it is please give example or function name =] thanks for help!
JR10 Posted June 19, 2011 Posted June 19, 2011 Dude the wiki got all server side functions and events and all client side functions and events, No there is no function for it, but you can use triggerServerEvent to use warpPedIntoVehicle. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Chlorek Posted June 19, 2011 Author Posted June 19, 2011 Yeah I know it is a way, but then I have to move a lot of my functions to another script (server side). And it'll take so much time. So there isn't any way to do that?
JR10 Posted June 19, 2011 Posted June 19, 2011 What are you talking about, why you need to move alot of functions to another script, i think you don't understand, It's so simple here (and you don't need to move anything) --clientside function warpPlayer(vehicle) triggerServerEvent('warpThePlayer', root, vehicle) end --server side addEvent('warpThePlayer', true) addEventHandler('warpThePlayer', root, function(vehicle) warpPedIntoVehicle(client, vehicle) end ) not tested but should work. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Chlorek Posted June 19, 2011 Author Posted June 19, 2011 Oh no, I understand... you don't know how looks my script so it's you don't understand. But it's not important now. Thanks for help, I found little trick =]
JR10 Posted June 19, 2011 Posted June 19, 2011 No problem, Good luck. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
will briggs Posted June 19, 2011 Posted June 19, 2011 Erm, Chlorek, sorry to post after you solved it, but there is no way you can have server functions in a client script, you need to do what JR10 said by making a triggerServerEvent... Founder of SAUR - Founder/Owner of ARC RPG
JR10 Posted June 19, 2011 Posted June 19, 2011 Erm, Chlorek, sorry to post after you solved it, but there is no way you can have server functions in a client script, you need to do what JR10 said by making a triggerServerEvent... There is, https://wiki.multitheftauto.com/wiki/CallClientFunction https://wiki.multitheftauto.com/wiki/CallServerFunction But i don't know if it's working. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
will briggs Posted June 19, 2011 Posted June 19, 2011 Yeah but what he means is attualy having a new function the same as a server on in a clinet script, that aint callfunction... Founder of SAUR - Founder/Owner of ARC RPG
Chlorek Posted June 19, 2011 Author Posted June 19, 2011 I just got new idea how to do that. So bcuz of function on client side is called from server script, I made warping ped to vehicle before triggerClientEvent so on server side =] not on called client side function.
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