Search the Community
Showing results for tags 'ontrailerattach'.
-
addEventHandler("onTrailerAttach", resourceRoot, function ( TruckerVeh1 ) local driver1 = getVehicleOccupant ( TruckerVeh1 ) if ( driver1 ) then if (isElement(TruckerVeh1) and isElement(TruckerTra1)) then triggerClientEvent(driver1 , "TrailerAttach", resourceRoot ) outputChatBox("The load has been attached",driver1) end end end ) addEventHandler("onTrailerDetach", resourceRoot, function ( TruckerVeh1) local driver1 = getVehicleOccupant ( TruckerVeh1 ) if ( driver1 ) then if (isElement(TruckerVeh1) and isElement(TruckerTra1)) then triggerClientEvent(driver1 , "TrailerDetach", resourceRoot ) outputChatBox("The load has been Detach",driver1) end end end ) addEventHandler("onTrailerAttach", resourceRoot, function ( TruckerVeh2 ) local driver2 = getVehicleOccupant ( TruckerVeh2 ) if ( driver2 ) then if (isElement(TruckerVeh2) and isElement(TruckerTra2)) then triggerClientEvent(driver2 , "TrailerAttach", resourceRoot ) outputChatBox("The load has been attached",driver2) end end end ) addEventHandler("onTrailerDetach", resourceRoot, function ( TruckerVeh2 ) local driver2 = getVehicleOccupant ( TruckerVeh2 ) if ( driver2 ) then if (isElement(TruckerVeh2) and isElement(TruckerTra2)) then triggerClientEvent(driver2 , "TrailerDetach", resourceRoot ) outputChatBox("The load has been Detach",driver2) end end end ) Why when I connect the first trailer to the first truck it shows me in the chat "The load has been attached" twice even though I did a verification condition and so on onTrailerDetach
-
addEventHandler("onTrailerAttach", resourceRoot, function ( TruckerVeh1 ) local driver1 = getVehicleOccupant ( TruckerVeh1 ) if ( driver1 ) then if (isElement(TruckerVeh1) and isElement(TruckerTra1)) then triggerClientEvent(driver1 , "TrailerAttach", resourceRoot ) outputChatBox("تم ربط الحمولة",driver1) end end end ) addEventHandler("onTrailerDetach", resourceRoot, function ( TruckerVeh1) local driver1 = getVehicleOccupant ( TruckerVeh1 ) if ( driver1 ) then if (isElement(TruckerVeh1) and isElement(TruckerTra1)) then triggerClientEvent(driver1 , "TrailerDetach", resourceRoot ) outputChatBox("احترس فتم ايقاع الحمولة اذهب لكي تقوم بربطها",driver1) end end end ) addEventHandler("onTrailerAttach", resourceRoot, function ( TruckerVeh2 ) local driver2 = getVehicleOccupant ( TruckerVeh2 ) if ( driver2 ) then if (isElement(TruckerVeh2) and isElement(TruckerTra2)) then triggerClientEvent(driver2 , "TrailerAttach", resourceRoot ) outputChatBox("تم ربط الحمولة",driver2) end end end ) addEventHandler("onTrailerDetach", resourceRoot, function ( TruckerVeh2 ) local driver2 = getVehicleOccupant ( TruckerVeh2 ) if ( driver2 ) then if (isElement(TruckerVeh2) and isElement(TruckerTra2)) then triggerClientEvent(driver2 , "TrailerDetach", resourceRoot ) outputChatBox("احترس فتم ايقاع الحمولة اذهب لكي تقوم بربطها",driver2) end end end ) onTrailerDetach لية لما اربط الترلا الاولة في الشاحنة الاولة يظهرلي في الشات"تم ربط الحمولة" مرتين برغم اني مسوي شرط تحقق وكذالك لما افي