News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Show Posts

* Messages | Topics | Attachments

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Ming

Pages: 1 2 [3] 4 5 ... 10
31
Modding Questions/Help / Chainsaw Sound
« on: May 20, 2022, 02:59:33 AM »
SoundPlayAmbience("add.sound.here",volume)
Does anyone know of anything that sounds like a chainsaw?

32
Mod Showroom / BLOODY Chainsaw Execution mod
« on: May 19, 2022, 11:49:29 PM »

33
Modding Questions/Help / CameraSetConvCam()
« on: May 19, 2022, 09:02:18 PM »
How to use CameraSetConvCam()

36
Modding Questions/Help / PedIsHit
« on: May 15, 2022, 10:16:56 PM »
PedIsHit(Ped, 2, 500)
What is 2 means, is 500 time?

37
Modding Questions/Help / Re: Pickup
« on: May 12, 2022, 07:29:52 AM »
Yeah.
You can find all functions here, or here.
Thank you 👍

38
Modding Questions/Help / check Ped is hit or not
« on: May 11, 2022, 11:28:47 PM »
Code: [Select]

Check = function()
  while true do
    if FrontPedIsHitByPlayer() then
      PedApplyDamage(PlayerHitPed, 10000000)
    end
    Wait (0)
  end
end

HealthRecords = function()
  while true do
    if IsInTable(AllPedHealth, Ped) then
      AllPedHealth[InTableIndex(AllPedHealth, Ped) + 1] = PedGetHealth(Ped)
    else
      table.insert(Ped)
      table.insert(PedGetHealth(Ped))
    end
    Wait(0)
  end
end

FrontPedIsHitByPlayer = function()
  for NPC, Ped in {PedFindInAreaXYZ(0, 0, 0, 99999)} do
    if IsInTable(AllPedHealth, Ped) and PedGetHealth(Ped) ~= AllPedHealth[InTableIndex(AllPedHealth, Ped) + 1] and PedGetWhoHitMeLast(Ped) == gPlayer and Ped ~= gPlayer then
      PlayerHitPed = Ped
      return true
    end
  end
  return false
end
I want to check ped is hit by player or not, but it doesn't work, I use PedIsHit(), but after the Ped is grabbed, PedIsHit is invalid

39
Modding Questions/Help / Pickup
« on: May 11, 2022, 10:10:44 PM »
Is there a function like PickupGetPosXYZ(), PickupFindInAreaXYZ()?

40
Textures Help / Re: Unsed Weapon
« on: May 05, 2022, 10:24:32 PM »
What is it

This one is probably the bolt cutters used in the mission Revenge on Mr. Burton

Another

This is most likely the watter balloons??
This looks like textures in the inventory, maybe this used to be the player's weapon

41
Textures Help / Re: Unsed Weapon
« on: May 05, 2022, 03:01:55 AM »
Another

42
Textures Help / Unsed Weapon
« on: May 05, 2022, 12:04:51 AM »
What is it

43
Modding Questions/Help / Nerd Tank
« on: May 04, 2022, 09:44:37 PM »
Code: [Select]
function main()
  repeat
    Wait(0)
  until SystemIsReady() and not AreaIsLoading()
  Wait(500)
 
  LoadAnimationGroup("Authority")
  LoadAnimationGroup("Bike")
  LoadAnimationGroup("V_Bike")
  LoadAnimationGroup("Boxing")
  LoadAnimationGroup("B_Striker")
  LoadAnimationGroup("CV_Female")
  LoadAnimationGroup("CV_Male")
  LoadAnimationGroup("DO_Edgar")
  LoadAnimationGroup("DO_Grap")
  LoadAnimationGroup("DO_StrikeCombo")
  LoadAnimationGroup("DO_Striker")
  LoadAnimationGroup("Earnest")
  LoadAnimationGroup("F_Adult")
  LoadAnimationGroup("F_BULLY")
  LoadAnimationGroup("F_Crazy")
  LoadAnimationGroup("F_Douts")
  LoadAnimationGroup("F_Girls")
  LoadAnimationGroup("F_Greas")
  LoadAnimationGroup("F_Jocks")
  LoadAnimationGroup("F_Nerds")
  LoadAnimationGroup("F_OldPeds")
  LoadAnimationGroup("F_Pref")
  LoadAnimationGroup("F_Preps")
  LoadAnimationGroup("G_Grappler")
  LoadAnimationGroup("G_Johnny")
  LoadAnimationGroup("G_Striker")
  LoadAnimationGroup("Grap")
  LoadAnimationGroup("J_Damon")
  LoadAnimationGroup("J_Grappler")
  LoadAnimationGroup("J_Melee")
  LoadAnimationGroup("J_Ranged")
  LoadAnimationGroup("J_Striker")
  LoadAnimationGroup("LE_Orderly")
  LoadAnimationGroup("Nemesis")
  LoadAnimationGroup("NPC_AggroTaunt")
  LoadAnimationGroup("NPC_Mascot")
  LoadAnimationGroup("N_Ranged")
  LoadAnimationGroup("N_Striker")
  LoadAnimationGroup("N_Striker_A")
  LoadAnimationGroup("N_Striker_B")
  LoadAnimationGroup("P_Grappler")
  LoadAnimationGroup("P_Striker")
  LoadAnimationGroup("PunchBag")
  LoadAnimationGroup("Qped")
  LoadAnimationGroup("Rat_Ped")
  LoadAnimationGroup("Russell")
  LoadAnimationGroup("Russell_Pbomb")
  LoadAnimationGroup("Straf_Dout")
  LoadAnimationGroup("Straf_Fat")
  LoadAnimationGroup("Straf_Female")
  LoadAnimationGroup("Straf_Male")
  LoadAnimationGroup("Straf_Nerd")
  LoadAnimationGroup("Straf_Prep")
  LoadAnimationGroup("Straf_Savage")
  LoadAnimationGroup("Straf_Wrest")
  LoadAnimationGroup("TE_Female")
  LoadAnimationGroup("Dodgeball")
  LoadAnimationGroup("Dodgeball2")
 
  CreateThread("Chariot1")
  CreateThread("Chariot2")
  CreateThread("Chariot3")
  CreateThread("Chariot4")
  CreateThread("DestroyCar")
 
end

DestroyCar = function()
  while true do
    if true or (VehicleIsValid(NerdChariot) and PedIsInVehicle(gPlayer, NerdChariot)) then
      local gPX, gPY, gPZ = PedGetPosXYZ(gPlayer)
      local AllVehicles = VehicleFindInAreaXYZ(gPX, gPY, gPZ, 30)
      if type(AllVehicles) == "table" then
        for VHCNumber, Vehicle in ipairs(AllVehicles) do
         
          if VehicleIsValid(Vehicle) and not VehicleIsModel(Vehicle, 272) and not VehicleIsModel(Vehicle, 273) and not VehicleIsModel(Vehicle, 274) and not VehicleIsModel(Vehicle, 275) and not VehicleIsModel(Vehicle, 276) and not VehicleIsModel(Vehicle, 277) and not VehicleIsModel(Vehicle, 278) and not VehicleIsModel(Vehicle, 279) and not VehicleIsModel(Vehicle, 280) and not VehicleIsModel(Vehicle, 281) and not VehicleIsModel(Vehicle, 282) and not VehicleIsModel(Vehicle, 283) and not VehicleIsModel(Vehicle, 284) and not VehicleIsModel(Vehicle, 289) then
           
            if CarIsDamage(Vehicle) then
             
              local Effect1 = EffectCreate("CarDestroyed", VehicleGetPosXYZ(Vehicle))
              EffectSlowKill(Effect1, 0.5)
             
              VehicleDelete(Vehicle)
             
            end
           
          end
        end
      end
    end
    Wait(0)
  end
end

CarIsDamage = function(car)
  if CarGetDamageNumber(car) == 1 then
    return true
  elseif CarGetDamageNumber(car) == 2 then
    return true
  elseif CarGetDamageNumber(car) == 3 then
    return true
  elseif CarGetDamageNumber(car) == 4 then
    return true
  elseif CarGetDamageNumber(car) == 5 then
    return true
  elseif CarGetDamageNumber(car) == 6 then
    return true
  elseif CarGetDamageNumber(car) == 7 then
    return true
  elseif CarGetDamageNumber(car) == 8 then
    return true
  elseif CarGetDamageNumber(car) == 9 then
    return true
  elseif CarGetDamageNumber(car) == 10 then
    return true
  elseif CarGetDamageNumber(car) == 11 then
    return true
  elseif CarGetDamageNumber(car) == 12 then
    return true
  elseif CarGetDamageNumber(car) == 13 then
    return true
  elseif CarGetDamageNumber(car) == 14 then
    return true
  elseif CarGetDamageNumber(car) == 15 then
    return true
  else
    return false
  end
end

Chariot1 = function()
  while true do
   
    if not VehicleIsValid(NerdChariot) and PedIsInAreaXYZ(gPlayer, 191.8, -6, 6, 50, 0) then
     
      NerdChariot = VehicleCreateXYZ(288, 191.8, -6, 6) --41.5, -133.3, 3
     
    end
   
    Wait(500)
  end
end

Chariot2 = function()
  while true do
   
    if VehicleIsValid(NerdChariot) and PedIsInVehicle(gPlayer, NerdChariot) then
     
      local HX, HY, HZ = PedGetHeadPos(gPlayer)
      local Heading = PedGetHeading(gPlayer)
      local DeltaX = -math.sin(Heading)
      local DeltaY = math.cos(Heading)
      if math.deg(Heading) > 0 then
        Rotation = math.deg(Heading) - 180
      else
        Rotation = math.deg(Heading) + 179.99
      end
      QiangIndex, Qiang = CreatePersistentEntity("WPCannon", HX + DeltaX, HY + DeltaY, HZ + 2, Rotation, AreaGetVisible())
      repeat
       
        DeletePersistentEntity(QiangIndex, Qiang)
        local HX, HY, HZ = PedGetHeadPos(gPlayer)
        local Heading = PedGetHeading(gPlayer)
        local DeltaX = -math.sin(Heading)
        local DeltaY = math.cos(Heading)
        if math.deg(Heading) > 0 then
          Rotation = math.deg(Heading) - 180
        else
          Rotation = math.deg(Heading) + 179.99
        end
        QiangIndex, Qiang = CreatePersistentEntity("WPCannon", HX + DeltaX, HY + DeltaY, HZ + 0.6, Rotation, AreaGetVisible())
       
        Wait(0)
      until not PedIsInVehicle(gPlayer, NerdChariot)
     
      DeletePersistentEntity(QiangIndex, Qiang)
     
    end
   
    Wait(0)
  end
end

Chariot3 = function()
  while true do
   
    if IsButtonPressed(6, 0) and PedIsInVehicle(gPlayer, NerdChariot) then
     
      ChariotShotgun()
      Wait(80)
      ChariotFire()
      Wait(0)
      ChariotFire()
      Wait(0)
      ChariotFire()
      Wait(0)
      ChariotFire()
      Wait(0)
      ChariotFire()
      Wait(0)
      ChariotFire()
      Wait(70)
     
    end
   
    Wait(0)
  end
end

ChariotFire = function()
  local HX, HY, HZ = PedGetHeadPos(gPlayer)
  local Heading = PedGetHeading(gPlayer)
  local DeltaX = -math.sin(Heading)
  local DeltaY = math.cos(Heading)
  Effect1 = EffectCreate("SGTargetHit", HX + DeltaX*1.8, HY + DeltaY*1.8, HZ + 0.8)
  EffectSlowKill(Effect1, 0.1)
  CreateProjectile(308, HX + DeltaX*1.5, HY + DeltaY*1.5, HZ + 1, DeltaX*2, DeltaY*2, -0.3, 50)
 
end

ChariotShotgun = function()
  for i = 1, 6 do
    local HX, HY, HZ = PedGetHeadPos(gPlayer)
    local Heading = PedGetHeading(gPlayer)
    local DeltaX = -math.sin(Heading)
    local DeltaY = math.cos(Heading)
    Effect1 = EffectCreate("SGTargetHit", HX + DeltaX*1.8, HY + DeltaY*1.8, HZ + 0.8)
    EffectSlowKill(Effect1, 0.1)
    CreateProjectile(316, HX + DeltaX*1.5, HY + DeltaY*1.5, HZ + 1, DeltaX*4 + math.random(-200, 200)/1000, DeltaY*4 + math.random(-200, 200)/1000, -0.4 + math.random(-200, 200)/1000, 100)
    Wait(0)
  end
end

Chariot4 = function()
  PedSetFlag(gPlayer, 42, true)
  while true do
   
    if VehicleIsValid(NerdChariot) then
     
      local TX, TY, TZ = VehicleGetPosXYZ(NerdChariot)
     
      if PedIsInAreaXYZ(gPlayer, TX, TY, TZ, 3) and not PedIsInAnyVehicle(gPlayer) then
       
        if IsButtonBeingPressed(9, 0) then
         
        end
       
      end
     
    end
   
    Wait(0)
  end
end
This mod make player drive the Tank and fire cannon, all functions are working fine, only the cannon can't destroy cars, the car can be destroyed with punch,but not cannon

44
Modding Questions/Help / Re: Move any Object
« on: May 02, 2022, 03:00:51 AM »
You are right, I am really in a hurry to do mods, thanks for the advice, you are the best modder :D

45
Modding Questions/Help / Re: Move any Object
« on: April 30, 2022, 02:10:32 AM »
Got it!
Code: [Select]
FrontObjects = {ObjectFindInArea(X, Y, Z, 1)}
      if FrontObjects[1] then
        FrontObject = FrontObjects[2]
                ObjectBreak(FrontObject)
        PEIndex, PE = CreatePersistentEntity(FrontObject, X, Y, Z, Rotation, AreaGetVisible())
Can I do this? Or Object ID not work in CreatePersistentEntity

Pages: 1 2 [3] 4 5 ... 10