function enableGUI ()
if getPedOccupiedVehicle(getLocalPlayer( )) == false then
outputChatBox ("You're not in a vehicle")
else
if guiGetVisible(GUI_Window[1]) == false then
guiSetVisible(GUI_Window[1], true)
showCursor(true)
else
guiSetVisible(GUI_Window[1], false)
showCursor(false)
end
end
end
bindKey ("1", "down", enableGUI )
You can add more checks if the model ==
Example:
function destroyNeon ( thePlayer, commandName )
if ( thePlayer ) then
local neon = getAttachedElements (veh)
for index , attachedElement in ipairs ( neon ) do
if getElementModel ( attachedElement ) == mineModel or getElementModel ( attachedElement ) == mineModel or getElementModel ( attachedElement ) == mineModel then
destroyElement (attachedElement)
end
end
end
end
Etc...
function destroyNeon ( thePlayer, commandName )
if ( thePlayer ) then
local neon = getAttachedElements (veh)
for index , attachedElement in ipairs ( neon ) do
if getElementModel ( attachedElement ) == mineModel then
destroyElement (attachedElement)
end
end
end
end
Replace mineModel with mine's model.
Stole zombies: https://community.multitheftauto.com/index.php?p= ... ls&id=2712
Stole Cargo ship : https://community.multitheftauto.com/index.php?p= ... ls&id=2710
stole car_lock : https://community.multitheftauto.com/index.php?p= ... ls&id=2711
There is a virus in all of them.
What you mean by "return table in chatbox"??
Outputting their types?
for index , attachedElement in ipairs ( getAttachedElements ( vehicle ) ) do
outputChatBox ( getElementType ( attachedElement ) )
end