Jump to content


  • Posts

  • Joined

  • Last visited


  • Birthday 07/07/2002


  • Location
  • Occupation

Recent Profile Visitors

964 profile views

DREFTHUN's Achievements


Rat (9/54)



  1. Contact the server. There’s nothing MTA can do.
  2. welcome :salute:

    1. Infinity-War


      sorry for return message :lol:

  3. • Completey written from scratch (or if you are willing from refurbished functions of my own scripts for faster work) • Quick work • Communication between seller and buyer • Relatively cheap • MySQL and phpmyadmin knowledge • Can make almost anything DM me on Discord (DREFT#7428) if you are interested. I can send video proof of my previous projects too.
  4. It is bugged. setPedLookAt Issues Issue ID Description #4325 setPedLookAt does not work for remote players
  5. function MakePlayerHeadshot( attacker, weapon, bodypart, loss ) if getElementType ( attacker ) == "ped" then if bodypart == 9 then if getPedArmor(source) > 0 then triggerEvent( "onPlayerHeadshotArmor", source) else triggerEvent( "onPlayerHeadshot", source, attacker, weapon, loss ) setPedHeadless ( source, true ) killPed( source, attacker, weapon, bodypart ) setTimer( BackUp, 900, 1, source ) end end end end function onPlayerHeadshotArmor() setPedArmor(source, 0) end addEvent("onPlayerHeadshotArmor", true) addEventHandler("onPlayerHeadshotArmor", root, onPlayerHeadshotArmor) Try this (Not tested)
  6. --Server fuelConsumption = 0.004 fuelTable = {} function vehMove() for i,v in ipairs(getElementsByType("vehicle")) do x,y,z = getElementPosition(v) if fuelTable[v] then distance = getDistanceBetweenPoints3D(x,y,z,fuelTable[v][2],fuelTable[v][3],fuelTable[v][4]) enginePlus = 0 if getVehicleEngineState(v) then enginePlus = 0.08 end newFuel = fuelTable[v][1] - (fuelConsumption*(distance+enginePlus)) fuelTable[v] = {newFuel,x,y,z} setElementData(v, "fuel", fuelTable[v][1]) else if getElementData(v, "fuel") then fuelTable[v] = {getElementData(v, "fuel"), x, y, z} else fuelTable[v] = {100, x, y, z} end end end end setTimer(vehMove, 1000, 0) --Client sx,sy = guiGetScreenSize() function testShowFuel() if isPedInVehicle(localPlayer) then dxDrawRectangle(sx-210,sy-30,200,20,tocolor(0,0,0,120)) if getElementData(getPedOccupiedVehicle(localPlayer), "fuel") then fuel = getElementData(getPedOccupiedVehicle(localPlayer), "fuel") else fuel = 100 end dxDrawRectangle(sx-210,sy-30,fuel/100*200,20,tocolor(127,198,118,255)) end end addEventHandler("onClientRender", root, testShowFuel)
  7. Hello! I have a problem. I wrote a custom damage system with the event onClientPlayerDamage. But whenever the player is doing a driveby. The event doesn’t seem to get called, even tho the player is taking damage. Is there a fix to it? Thanks, in advance.
  8. PM me your discord name and I’ll help you in about 3 hrs.
  9. It happens with the chainsaw, and with simple punching too. Should I just change the fighting style and it should be good to go?
  • Create New...