Fala galera.
Eu fiz o seguinte, coloquei isso daqui:
function createVehicleForPlayer(thePlayer, command, vehicleModel)
local x,y,z = getElementPosition(thePlayer)
x = x + 3
local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)
if (createdVehicle == false) then
outputChatBox("Falhou ao criar veiculo",thePlayer)
end
if (createdVehicle == true) then
outputChatBox("Veiculo criado com sucesso",thePlayer)
end
end
addCommandHandler("criarveiculo", createVehicleForPlayer)
O problema é o seguinte, quando eu digito /criarveiculo e um id que não existe, aparece certinho "Falhou ao criar veiculo"
Mas quando eu digito um ID certo, o carro aparece mais o
"Veiculo criado com sucesso" não aparece.
Será que devo colocar essa parte:
local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)
em cima do:
if (createdVehicle == true) then
outputChatBox("Veiculo criado com sucesso",thePlayer)
??