i have wanted to make a resource like this:when i enter in a vehicle on the list the "moto" clothing shold be added
local VEH = {
581,
509,
481,
462,
521,
463,
510,
522,
461,
448,
468,
586
}
function onEnterVehicle ( theVehicle, seat, jacked, VEH )
if getElementModel ( theVehicle ) == ("VEH") then
addPedClothes ( source, "moto", "moto", 16 )
end
end
addEventHandler ( "onPlayerVehicleEnter", getRootElement(), onEnterVehicle )
function onExitVehicle ( theVehicle, seat, jacked,VEH )
if getElementModel ( theVehicle ) == ("VEH") then
removePedClothes ( source, 16 )
end
end
addEventHandler ( "onPlayerVehicleExit", getRootElement(), onExitVehicle )
can someone help me to fix it?
(i used wiki examples)