CreateAdvancedVehicle

From Multi Theft Auto: Wiki


Example

Click to collapse [-]
Server Example
function test(thePlayer)
x, y, z = getElementPosition(thePlayer)
createAdvancedVehicle(536,x+2,y+2,z+2,1,"Frank",255,255,0,255,0,0,100,0,0,100,0,0,100,0,0)
end
addCommandHandler("asd",test)

Code

Click to collapse [-]
Server Code
function createAdvancedVehicle(model,x,y,z,paintjob,plate,r1,g1,b1,r2,g2,b2,r3,g3,b3,r4,g4,b4)
v=createVehicle(model,x,y,z)
if (isElement(model) and getElementType(model)=="vehicle") then
setVehiclePaintjob(v , paintjob)
setVehicleColor(v, r1,g1,b1,r2,g2,b2,r3,g3,b3,r4,g4,b4)
setVehiclePlateText(v, plate)
end
end

Author

This function was created by Hydra.

More