GTA Modification Forums
[need help]bomb mod modification
 |
|
 |
| |
j7em  |
Posted: Wednesday, Aug 8 2012, 01:07
|
Player Hater

Group: Members
Joined: Aug 8, 2012

|
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
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Skorpro  |
|
GTAholiker

Group: Members
Joined: Jul 19, 2009


|
Hi, | QUOTE | | i downloaded bomb mod by Skorpro it works fine thanks for this awesome mod | Thanx | 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 This post has been edited by Skorpro on Friday, Aug 10 2012, 22:09
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|