Jump to content

#Madara

Members
  • Posts

    107
  • Joined

  • Last visited

Everything posted by #Madara

  1. i try to drop it but it's dosen't work Client : bindKey("H", "down", function() local vehicle = getPedOccupiedVehicle(localPlayer) local id = getElementModel (vehicle) local x, y, z = getElementPosition(vehicle) if ( vehicle ) and ( id == 425 ) and getElementData(vehicle"AttachElements",true) then triggerServerEvent("detachVehicle",hitElement,vehicle) setElementData(vehicle,"AttachElements",false) elseif ( vehicle ) and ( id == 425 ) and getElementData(vehicle"AttachElements",false) then local dist = getElementDistanceFromCentreOfMassToBaseOfModel(vehicle) local offset = 2 local hit, _, _, _, hitElement = processLineOfSight(x, y, z-dist, x, y, z-dist-offset, false, true, false, false, false) if hit and getElementType(hitElement) == "vehicle" then outputChatBox("You attach "..getVehicleName(hitElement)) triggerServerEvent("attachVehicle", hitElement, vehicle) setElementData(vehicle,"AttachElements",true) end end end ) Server : * deleted . DebugScript : client.lua:6: attempt to call local 'vehicle' ( a userdata value )
  2. it's work fine but the player i attached his vehicle to my hunter he can't see his vehicle got attached but me can see his vehicle attached by hunter
  3. i make this and it's dosen't work addEventHandler("onClientRender",root, function() bindKey("H","down", function() local vehicle = getPedOccupiedVehicle(localPlayer) -- Your vehicle local id = getElementModel (vehicle) local x, y, z = getElementPosition(vehicle) if ( vehicle ) and ( id == 425 ) then-- Position of hunter local dist = getElementDistanceFromCentreOfMassToBaseOfModel(vehicle) -- Gets ground of hunter, so the process line doesn't collide with hunter itself. local offset = 2 -- How much units under the hunter should it take to attach a vehicle? local hit, _, _, _, hitElement = processLineOfSight(x, y, z-dist, x, y, z-dist-offset, false, true, false, false, false) if hit and getElementType(hitElement) == "vehicle" then outputChatBox("You attach "..getVehicleName(hitElement)) -- Returns vehicle element and outputs vehicle name. attachElements(hitElement, vehicle) else return end end end end end ) [/b]
  4. i know but i mean how i know the vehicle i want to attach it to add it in arguments of function attachElements
  5. how i can attach any vehicle in server with hunter when i go above the vehicle i want attach it?
  6. getDistanceBetweenPoints2D or getDistanceBetweenPoints3D -- Attach the vehicle, only if the hunter is above of the vehicle. Can you give me an example, because I did not understand how if the hunter is above of the vehicle getDistanceBetweenPoints3D
  7. Client : addEventHandler("onClientGUIClick",root, --- حدث الضغط على الزر function ( ) -- نجيب التكست الي اخترناه في القريد لست local weapName = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1]) , 1 ) --WEAPON_MINIGUN == نتحقق اذا ضغط على الزر و التكست الي حدده في القريد لست if ( source == GUIEditor.button[1] and weapName == "WEAPON_MINIGUN" ) then -- تريقر لسيرفر حق نعطيه الخلاط لان الوظيفة حقت اعطاء سلاح فقط سيرفر triggerServerEvent("MINIGUN",localPlayer) end end ) Server : addEvent("MINIGUN",true) addEventHandler("MINIGUN",root, function() giveWeapon(source,38,300) -- نعطيه خلاط فيه 300 طلقة end )
  8. i think you can't play sound from youtube
  9. Hi guys , i have a question , How i can attach vehicle with hunter if hunter go above the vehicle and the who into hunter press ( H ) the vehicle attached to the hunter and when the who in hunter press ( H ) again drop the vehicle who got attached .
×
×
  • Create New...