Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,279 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

uNiverselEgacy

Smuggler's Run bombs in SP?

Recommended Posts

uNiverselEgacy
Has anyone figured out how to do it in SP? I copied the code in the script as you can see below and it sort of works.
There is only one problem though and that is the bombs don't trigger an explosion effect when they detonate. I only get the particle effect of some dirt/debris/smoke.
The bomb does deal damage when they explode and the funny thing is if I use EXPLODE_PROJECTILES to manually make them explode the explosion effect is shown just fine.
static void DROP_BOMB(float x1, float y1, float z1, float x2, float y2, float z2, int damage, BOOL p7, Hash weaponHash, Ped ownerPed, BOOL isAudible, BOOL isInvisible, float speed, Entity entity, BOOL p14, BOOL p15, BOOL p16, BOOL p17, BOOL p18, BOOL p19, BOOL p20) { invoke<Void>(0xBFE5756E7407064A, x1, y1, z1, x2, y2, z2, damage, p7, weaponHash, ownerPed, isAudible, isInvisible, speed, entity, p14, p15, p16, p17, p18, p19, p20); }void func_4986(Vehicle iParam0, Hash iParam1, Vector3 *uParam2, Vector3 *uParam3, Vector3 *uParam4, Vector3 *uParam5){	Vector3 vVar0;	Vector3 Var1;	Vector3 vVar2;	Vector3 vVar3;	Vector3 vVar4;	Vector3 vVar5;	GAMEPLAY::GET_MODEL_DIMENSIONS(iParam1, &vVar0, &Var1);	vVar2.x = vVar0.x;	vVar2.y = Var1.y;	vVar2.z = vVar0.z;	vVar3.x = Var1.x;	vVar3.y = Var1.y;	vVar3.z = vVar0.z;	vVar4.x = vVar0.x;	vVar4.y = vVar0.y;	vVar4.z = vVar0.z;	vVar5.x = Var1.x;	vVar5.y = vVar0.y;	vVar5.z = vVar0.z;	*uParam2 = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iParam0, vVar2.x, vVar2.y, vVar2.z);	*uParam3 = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iParam0, vVar3.x, vVar3.y, vVar3.z);	*uParam4 = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iParam0, vVar4.x, vVar4.y, vVar4.z);	*uParam5 = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iParam0, vVar5.x, vVar5.y, vVar5.z);}static float func_4983(Vehicle iParam0){	float fVar0 = 0;	switch (ENTITY::GET_ENTITY_MODEL(iParam0))	{	case 0xD9927FE3:	// cuban800		fVar0 = 0.5f;		break;	case -749299473:		fVar0 = 0.45f;		break;	case -975345305:		fVar0 = 0.46f;		break;	case -1700874274:		fVar0 = 0.55f;		break;	case -392675425:		fVar0 = 0.5f;		break;	case 1043222410:		fVar0 = 0.6f;		break;	case -32878452:		fVar0 = 0.43f;		break;	case -42959138:		fVar0 = 0.5f;		break;	}	return fVar0;}static float func_4985(float fParam0, float fParam1, float fParam2, float fParam3, float fParam4){	return ((((fParam1 - fParam0) / (fParam3 - fParam2)) * (fParam4 - fParam2)) + fParam0);}static Vector3 func_4984(Vector3 vParam0, Vector3 vParam1, float fParam2, float fParam3, float fParam4){	return MAKE_VECTOR3(func_4985(vParam0.x, vParam1.x, fParam2, fParam3, fParam4), func_4985(vParam0.y, vParam1.y, fParam2, fParam3, fParam4), func_4985(vParam0.z, vParam1.z, fParam2, fParam3, fParam4));}static void drop_bomb(Vehicle iParam0, Ped ped){	// VEHICLE_WEAPON_BOMB VEHICLE_WEAPON_BOMB_INCENDIARY VEHICLE_WEAPON_BOMB_GAS VEHICLE_WEAPON_BOMB_CLUSTER	Hash weaponHashes[] = {0x9AF0B90C, 0x6AF7A717, 0x5540A91E, 0x0D28BCA3};	// W_Smug_Bomb_01, W_Smug_Bomb_04, W_Smug_Bomb_03, W_Smug_Bomb_02	Hash weaponModelHashes[] = {0xC4A21131, 0x351A7220, 0x23E64FB8, 0xD6D0B58E};	Vector3 vVar0;	Vector3 vVar1;	Vector3 vVar2;	Vector3 vVar3;	Vector3 vVar4;	Vector3 vVar5;	Vector3 vVar6;	Vector3 vVar7;	auto type = VEHICLE::GET_VEHICLE_MOD(Globals::curVehicle, 9);	if (type < 0 || type >= ARRAYSIZE(weaponHashes))		return;	request_model(weaponModelHashes[type]);	func_4986(iParam0, ENTITY::GET_ENTITY_MODEL(iParam0), &vVar0, &vVar1, &vVar2, &vVar3);	vVar4 = func_4984(vVar0, vVar1, 0.0f, 1.0f, 0.5f);	vVar5 = func_4984(vVar2, vVar3, 0.0f, 1.0f, 0.5f);	vVar4.z = (vVar4.z + 0.4f);	vVar5.z = (vVar5.z + 0.4f);	vVar6 = func_4984(vVar4, vVar5, 0.0f, 1.0f, func_4983(iParam0));	vVar4.z = (vVar4.z - 0.2f);	vVar5.z = (vVar5.z - 0.2f);	vVar7 = func_4984(vVar4, vVar5, 0.0f, 1.0f, (func_4983(iParam0) - 0.0004f));	DROP_BOMB(vVar6.x, vVar6.y, vVar6.z, vVar7.x, vVar7.y, vVar7.z,		0, FALSE, weaponHashes[type], ped, TRUE, TRUE, 0.0f,		0, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE);	AUDIO::PLAY_SOUND_FRONTEND(-1, "bomb_deployed", "DLC_SM_Bomb_Bay_Bombs_Sounds", TRUE);}

 

Share this post


Link to post
Share on other sites
uNiverselEgacy

I mean anyone any thoughts?

Share this post


Link to post
Share on other sites
K^2

You are calling DROP_BOMB with damage = 0 and isInvisible set. Have you tried playing with these values?

Share this post


Link to post
Share on other sites
uNiverselEgacy

You are calling DROP_BOMB with damage = 0 and isInvisible set. Have you tried playing with these values?

Those are the exact values in the script.

I've tried different values but they don't seem to make any difference.

The parameter names are from NativeDB. Apparently some of them don't seem to do what their names suggest.

Share this post


Link to post
Share on other sites
K^2

The code overall doesn't do much, other than computing the correct starting position for the bomb, so outside of playing with parameters passed to DROP_BOMB, not a whole lot that can go wrong. Could there be another script triggered on actual explosion?

Share this post


Link to post
Share on other sites
SkelePap

So how's the progress on this? Will you also make the countermeasures work in SP?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.