-
Posts
1,990 -
Joined
-
Last visited
-
Days Won
2
Everything posted by #RooTs
-
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"
-
onClientVehicleExplode -- or onVehicleExplode and cancelEvent()
-
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)
-
Stolen: https://community.multitheftauto.com/ind ... s&id=12630 Original: https://community.multitheftauto.com/ind ... s&id=10615 DONE
-
remove one ")" of closed
-
Stolen: https://community.multitheftauto.com/ind ... s&id=11241 Original: https://community.multitheftauto.com/ind ... s&id=10673 DONE
-
this will not help the boy at in nothing. if not help the boy, do not confuse his mind
-
setWindowFlashing Admins add in bbcode of forum, and WIKI [lua] https://wiki.multitheftauto.com/wiki/SetWindowFlashing
-
I will test it later
-
not tested yet, but I noticed that removed the event "onPlayerVehicleExit"
-
add "onPlayerVehicleExit" pls
-
When the vehicle explode
-
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 )
-
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)
-
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)
-
Solved, thanks to all
-
30 visit.. OMG does anyone here know how to solve it? I lost one day of programming because of it
-
Any solution ?
-
@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
-
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 ?
-
Download? Please ?
-
stolen/no description https://community.multitheftauto.com/ind ... s&id=12603 DONE
-
show me screen capture image, with both servers. please