ThePope Posted January 14, 2010 Share Posted January 14, 2010 Hello all, I feel like I'm spamming a little bit here, or I wan't so many unusual things I am looking for a way to spawn a player into or inside a vehicle that he/she just spawned. Is this possible? 'Cause I can't find anything about this on the wiki nor the forum. thanks in advance! Link to comment
ThePope Posted January 14, 2010 Author Share Posted January 14, 2010 Hello all, I feel like I'm spamming a little bit here, or I wan't so many unusual things I am looking for a way to spawn a player into or inside a vehicle that he/she just spawned. Is this possible? 'Cause I can't find anything about this on the wiki nor the forum. thanks in advance! Link to comment
50p Posted January 14, 2010 Share Posted January 14, 2010 Use this function: https://wiki.multitheftauto.com/wiki/WarpPedIntoVehicle Link to comment
50p Posted January 14, 2010 Share Posted January 14, 2010 Use this function: https://wiki.multitheftauto.com/wiki/WarpPedIntoVehicle Link to comment
ThePope Posted January 14, 2010 Author Share Posted January 14, 2010 and this can also be done like this? oPlayerVehicle = createVehicle( 12, -2137, 656, 13 ) warpPedIntoVehicle( getLocalPlayer(), oPlayerVehicle ) Link to comment
ThePope Posted January 14, 2010 Author Share Posted January 14, 2010 and this can also be done like this? oPlayerVehicle = createVehicle( 12, -2137, 656, 13 ) warpPedIntoVehicle( getLocalPlayer(), oPlayerVehicle ) Link to comment
robhol Posted January 14, 2010 Share Posted January 14, 2010 No, you can't use client-created vehicles. Think about the sync issues. If you create the vehicle server-side (or do it all there) you'll be fine. Link to comment
robhol Posted January 14, 2010 Share Posted January 14, 2010 No, you can't use client-created vehicles. Think about the sync issues. If you create the vehicle server-side (or do it all there) you'll be fine. Link to comment
madis Posted January 14, 2010 Share Posted January 14, 2010 warpPedIntoVehicle is server-only function, so you can't simply use getLocalPlayer() (which is client-only function). Server should check if something triggered some event you need to use warping at, and usually the source of the event will be the player who trigger it and you can use that source instead of getLocalPlayer(). Link to comment
madis Posted January 14, 2010 Share Posted January 14, 2010 warpPedIntoVehicle is server-only function, so you can't simply use getLocalPlayer() (which is client-only function). Server should check if something triggered some event you need to use warping at, and usually the source of the event will be the player who trigger it and you can use that source instead of getLocalPlayer(). Link to comment
ThePope Posted January 14, 2010 Author Share Posted January 14, 2010 thanks, I'm gonna try some things with this info Link to comment
ThePope Posted January 14, 2010 Author Share Posted January 14, 2010 thanks, I'm gonna try some things with this info 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