Jump to content

warpPedIntoVehicle not working


Zahl

Recommended Posts

Well as I am a fan of learning by doing, I thought I should try to add some (mostly useless) features to existing resources instead of immediately trying to create a new game mode.

So one simple idea I had was to add some passengers to every vehicle in the race resource, but apparently this doesn't work.

Below the line

vehicle = createVehicle(spawnpoint.vehicle, x, y, z, 0, 0, spawnpoint.rotation, #nick <= 8 and nick or nick:sub(1, 8))

in race_server.lua, I added:

local ped = createPed(9, x + 2, y + 2, z + 1)
warpPedIntoVehicle(ped, vehicle, 1)

The ped gets created, but it stays outside the vehicle, the function returns false.

... So what's wrong here? :(

Link to comment

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