IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Post mod/code requests in the Mod Requests topic

Post mod releases in the Mod Showroom

Read the Modding Rules BEFORE posting!

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 [need help]bomb mod modification

 
j7em  
Posted: Wednesday, Aug 8 2012, 01:07
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Aug 8, 2012

XXXXX



hi all

i downloaded bomb mod by Skorpro it works fine thanks for this awesome mod
but the problem is the bomb in this mod has lots of explosions and i want to make it only one explosion

in other meaning , when i press F4 to dotinate the bomb it explodes like a cluster bomb but i want to make it explode as the real bomb ( only one explosion )
so i headed to the script file trying to do what i wanted but no joy
here is the code :

CODE


---------------------------------------------------------------------------------------------
-- Bomb Mod V1.0 by Skorpro                                                                --
--                                                                                         --
-- If you want to use/modify this script/function, just do it! But note that is my work :) --
-- My regards to Alexander Blade (Alice) !!                                                --
--                                                                                  --
---------------------------------------------------------------------------------------------

function BombType(xc, yc, zc, typ, breit_var, hoch_var, abstand, zeit_zw_exp)
hoch_var = hoch_var * abstand
breit_var = breit_var * abstand
zeit_zw_exp = zeit_zw_exp + 1
DELETE_OBJECT(bomb)
for hoch = 0, hoch_var, abstand do
-- start position
zc = zc + hoch
ADD_EXPLOSION(xc, yc, zc, typ, itof(7.50), 1, 0, itof(1.01))
-- start position end
for breit = 4, breit_var, 4 do
 xc = xc - breit
 Wait(zeit_zw_exp)
end
end
Wait(zeit_zw_exp)
end

function SpawnBomb()
if (IsKeyPressed(66) == 1) then -- F4
 local p = {}
 GET_PLAYER_CHAR(GET_PLAYER_ID(), p)
 PLAYER_CHAR = p.a
 if PLAYER_CHAR <= 0 then return end
 if (IS_CHAR_IN_ANY_HELI(PLAYER_CHAR) == 1) then
   local BombHash = GET_HASH_KEY("bm_beerkeg1hi")
   REQUEST_MODEL(BombHash)
   while HAS_MODEL_LOADED(BombHash) == 0 do Wait(100) end  
   x = {}  y = {}  z = {}  zground = {}
   GET_CHAR_COORDINATES(PLAYER_CHAR, x, y, z)
   GET_GROUND_Z_FOR_3D_COORD(x.b, y.b, z.b, zground)
   GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS(PLAYER_CHAR, 0.5, -2.1, -2.1, x, y, z)
   bomb = {}
   CREATE_OBJECT(BombHash, x.b, y.b, z.b, bomb, 1)
   SET_OBJECT_HEALTH(bomb.a, 100.0)
   SET_OBJECT_ROTATION(bomb.a, itof(90.0), 0, 0)
   Wait(25)
   z.b = z.b - zground.b
   repeat
   Wait(27)
   z.b = z.b - 1
   SLIDE_OBJECT(bomb.a, x.b, y.b, z.b, itof(0.0), itof(0.0), itof(3.0), 1)
   until z.b <= zground.b
   ----
   BombType(x.b, y.b, zground.b, 4, 5, 2, 3, 0)
   ----
 elseif eb == 0 then
   local BombHash2 = GET_HASH_KEY("ec_bomb_ne")
   REQUEST_MODEL(BombHash2)
   while HAS_MODEL_LOADED(BombHash2) == 0 do Wait(100) end  
   a = {}  b = {}  c = {}  cground = {}
   GET_CHAR_COORDINATES(PLAYER_CHAR, a, b, c)
   GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS(PLAYER_CHAR, 0.0, 0.9, 0.0, a, b, c)
   GET_GROUND_Z_FOR_3D_COORD(a.b, b.b, c.b, cground)
   bomb = {}
   CREATE_OBJECT(BombHash2, a.b, b.b, cground.b, bomb, 1)
   SET_OBJECT_HEALTH(bomb.a, 1000.0)
   SET_OBJECT_ONLY_DAMAGED_BY_PLAYER(bomb.a, 1)
   FREEZE_OBJECT_POSITION(bomb.a, 1)
   PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", "Press F4 for detonation", 2000, 1)
   Wait(2000)
   eb = 1
 elseif eb == 1 then
  ----
  BombType(a.b, b.b, cground.b, 4, 4, 2, 2, 0)
  ----
  eb = 0
 end
end
Wait(1000)
end

function main()
eb = 0
Wait(1000)
 while true do
   SpawnBomb()
 end
 Wait(100)
end

-- start
main();



any help please?

thanks in advance colgate.gif
PM
  Top
 

 
Skorpro  
Posted: Friday, Aug 10 2012, 22:01
Quote Post


GTAholiker
Group Icon
Group: Members
Joined: Jul 19, 2009

eu.gif

XXXXX



Hi,

QUOTE
i downloaded bomb mod by Skorpro it works fine thanks for this awesome mod

Thanx biggrin.gif

QUOTE
but the problem is the bomb in this mod has lots of explosions and i want to make it only one explosion


Search this (in heli)...
CODE
BombType(x.b, y.b, zground.b, 4, 5, 2, 3, 0)


...and change it to:
CODE
BombType(x.b, y.b, zground.b, 4, 1, 1, 1, 0)


Now search this (on foot)...
CODE
BombType(a.b, b.b, cground.b, 4, 4, 2, 2, 0)


...and change it to:
CODE
BombType(a.b, b.b, cground.b, 4, 1, 1, 1, 0)


Watch here: "Function explanation"

Have fun smile.gif

This post has been edited by Skorpro on Friday, Aug 10 2012, 22:09
Users WebsitePM
  Top
 

 
j7em  
Posted: Friday, Aug 10 2012, 22:58
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Aug 8, 2012

XXXXX



thanks a lot Skorpro thats what am locking for smile.gif
PM
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG