Jump to content

Creating Vehicle on server side


Kezoto

Recommended Posts

Hi, i have my script :

local modele = {
    [1] = {dff="pojazdy/samochody/bugattiveyron.dff",txd="pojazdy/samochody/bugattiveyron.txd"};
}

for v,c in ipairs(modele) do
    local requestid = engineRequestModel("vehicle")
    txd = engineLoadTXD(c.txd)
    engineImportTXD(txd, requestid)
    dff = engineLoadDFF(c.dff)
    engineReplaceModel(dff, requestid)
    triggerServerEvent("stworzAuto",root,requestid,1364.53418, -1040.15503, 26.14062)
end

and im trying to spawn vehicle on server side

 

function stworzAuto(id,x,y,z)
	createVehicle(id,x,y,z)
	print("b")
end

addEvent("stworzAuto",true)
addEventHandler("stworzAuto",root,stworzAuto)

 

 

I want create vehicle with custom id on server side, please help me

Link to comment
13 hours ago, Patrick said:

Hi. Your thread has been moved to Scripting section,

However, currently this is not possible, you can't create server-sided vehicle with freshly requested ID.

But i can't enter to this vehicle

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