Jump to content

Comando para criar NRG ?


Recommended Posts

Quero criar uma NRG, eu vi esse comando la na Wiki MTA

function createVehicleForPlayer(thePlayer, command, vehicleModel)

local x,y,z = getElementPosition(thePlayer) -- get the position of the player

x = x + 5 -- add 5 units to the x position

local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)

-- check if the return value was ''false''

if (createdVehicle == false) then

-- if so, output a message to the chatbox, but only to this player.

outputChatBox("Failed to create vehicle.",thePlayer)

end

end

addCommandHandler("createvehicle", createVehicleForPlayer)

mas da esse erro ai Failed to create vehicle oquje falta pro meu comando estar correto ?

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