Jump to content

spawn into car


ThePope

Recommended Posts

Posted

Hello all,

I feel like I'm spamming a little bit here, or I wan't so many unusual things :P

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!

Posted

Hello all,

I feel like I'm spamming a little bit here, or I wan't so many unusual things :P

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!

Posted

and this can also be done like this?

oPlayerVehicle = createVehicle( 12, -2137, 656, 13 )
 
warpPedIntoVehicle( getLocalPlayer(), oPlayerVehicle )

Posted

and this can also be done like this?

oPlayerVehicle = createVehicle( 12, -2137, 656, 13 ) warpPedIntoVehicle( getLocalPlayer(), oPlayerVehicle )

Posted

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.

Posted

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.

Posted

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().

Posted

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().

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.
×
×
  • Create New...