Jump to content

#RooTs

Members
  • Posts

    1,990
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by #RooTs

  1. client.lua addEventHandler("onClientVehicleExplode", getRootElement(), function() cancelEvent() end) or server.lua addEventHandler("onVehicleExplode", getRootElement(), function() cancelEvent() end) other example addEventHandler ( "onClientVehicleExplode", getRootElement(), cancelEvent ) -- predefined variable "cancelEvent"
  2. onClientVehicleExplode -- or onVehicleExplode and cancelEvent()
  3. this event worked addEventHandler("onClientVehicleExplode", getRootElement(), function() setElementData( localPlayer, "neon", 0 ) -- Zerar triggerServerEvent ("detachNeon", getLocalPlayer(), source) end) This event not more. when the passenger exit of my vehicle, my neon is removed.. the neon only to be removed when I leave my vehicle addEventHandler("onClientPlayerVehicleExit", getRootElement(),function() local theVehicle = getPedOccupiedVehicle(localPlayer) if theVehicle and getVehicleController(theVehicle) == localPlayer then setElementData( localPlayer, "neon", 0 ) -- Zerar local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) end end)
  4. Stolen: https://community.multitheftauto.com/ind ... s&id=12630 Original: https://community.multitheftauto.com/ind ... s&id=10615 DONE
  5. remove one ")" of closed
  6. Stolen: https://community.multitheftauto.com/ind ... s&id=11241 Original: https://community.multitheftauto.com/ind ... s&id=10673 DONE
  7. this will not help the boy at in nothing. if not help the boy, do not confuse his mind
  8. setWindowFlashing Admins add in bbcode of forum, and WIKI [lua] https://wiki.multitheftauto.com/wiki/SetWindowFlashing
  9. not tested yet, but I noticed that removed the event "onPlayerVehicleExit"
  10. I want the neon is destroyed when the vehicle explode. I tried in many ways. but did not succeed..... function detachNeon( theVehicle ) local attachedElements = getAttachedElements ( theVehicle ) for i,v in ipairs ( attachedElements ) do detachElements ( v, theVehicle ) destroyElement ( v ) end end addEventHandler( "onPlayerVehicleExit", getRootElement(), detachNeon ) addEvent( "detachNeon", true ) addEventHandler( "detachNeon", getRootElement(), detachNeon ) function onPlayerQuit() local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local getNeonType = getElementData(source, "neon") if ( getNeonType ) then setAccountData ( playeraccount, "neon", getNeonType) local theVehicle = getPedOccupiedVehicle ( source ) if ( getNeonType ~= 0 ) and ( theVehicle ) then detachNeon( theVehicle ) end end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local getNeonTypeAccData = getAccountData ( playeraccount, "neon" ) if ( getNeonTypeAccData ~= 0 ) then setElementData(source, "neon", getNeonTypeAccData) end end end addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin )
  11. because when the vehicle of a player blows my neon is reset? addEventHandler("onClientVehicleExplode", getRootElement(), function() -- or root, or getLocalPlayer setElementData( localPlayer, "neon", 0 ) -- Zerar local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) end)
  12. I just added, "not" in my code. and it was resolved if not getVehicleEngineState ( vehicle ) then function VehicleEngineState ( ) local vehicle = getPedOccupiedVehicle(source) if ( vehicle ) then if not getVehicleEngineState ( vehicle ) then setVehicleEngineState ( vehicle, true ) triggerClientEvent ( "motLigado", source ) else setVehicleEngineState ( vehicle, false ) triggerClientEvent ( "motDesligado", source ) end end end addEvent("motor", true) addEventHandler("motor", root, VehicleEngineState)
  13. 30 visit.. OMG does anyone here know how to solve it? I lost one day of programming because of it
  14. @Bonsai my client function Locked (_,state) local theVehicle = getPedOccupiedVehicle(localPlayer) if theVehicle and getVehicleController(theVehicle) == localPlayer then if painel == true then if state == "down" then if isCursorOnElement (botX+sizeX+735, 240, 42, 16) then -- motor triggerServerEvent ("motor", getLocalPlayer()) end end end end end addEventHandler ("onClientClick", root, Locked) I'm using only 1 button / click. likewise, I can not use 2 Trigger Event
  15. What is wrong ? I need to do it that way because of triggerClientEvent function switchEngine ( ) local vehicle = getPedOccupiedVehicle(source) if ( vehicle ) then if getVehicleEngineState ( vehicle ) then setVehicleEngineState ( vehicle, true ) triggerClientEvent ( "motLigado", source ) else setVehicleEngineState ( vehicle, false ) triggerClientEvent ( "motDesligado", source ) end end end addEvent("motor", true) addEventHandler("motor", root, TrancarVeiculo) found other means to make, on / off. evil can not use triggerClientEvent function switchEngine ( ) local vehicle = getPedOccupiedVehicle(source) if not vehicle then return end local state = getVehicleEngineState ( vehicle ) setVehicleEngineState ( vehicle, not state ) end addEvent("motor", true) addEventHandler("motor", root, switchEngine)) Any solution ?
  16. stolen/no description https://community.multitheftauto.com/ind ... s&id=12603 DONE
  17. #RooTs

    Server list spam

    show me screen capture image, with both servers. please
×
×
  • Create New...