Chlorek Posted June 19, 2011 Share 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! Link to comment
JR10 Posted June 19, 2011 Share 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. Link to comment
Chlorek Posted June 19, 2011 Author Share 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? Link to comment
JR10 Posted June 19, 2011 Share 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. Link to comment
Chlorek Posted June 19, 2011 Author Share 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 =] Link to comment
will briggs Posted June 19, 2011 Share 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... Link to comment
JR10 Posted June 19, 2011 Share 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. Link to comment
will briggs Posted June 19, 2011 Share 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... Link to comment
Chlorek Posted June 19, 2011 Author Share 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. 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