function scriptCreateTank ( commandName )
local luckyBugger = getLocalPlayer() -- get the local player
local x, y, z = getElementPosition ( luckyBugger ) -- retrive the player's position
local theVehicle = createVehicle ( 404, x, y, z + 10 ) -- create the tank 10 units above them
setElementData(theVehicle, "model", 737)
outputChatBox ( "You got Tank'd!", 255, 0, 0)
end
--Attach the 'scriptCreateTank' function to the "tank" command
addCommandHandler ( "tank", scriptCreateTank )
[M]Province
Надо указать новый ID модели setElementData(theVehicle, "model").
Модель которая указывается в createVehicle значения не имеет, главное чтобы была в диапазоне от 400 до 611.
Во время события onClientElementStreamIn он читает новую модель, и занимает свободный слот в диапазоне игровых моделей от 400 до 611 с учетом типа транспортного средства, в данном случае "Automobile".
При событии onClientElementStreamOut он освобождает раннее занятый слот.