Jump to content

Vehicle Weapon Editing


funkylok

Recommended Posts

Hi,

I am wondering if there is a way to replace the water cannon on the Swatvan with a flame thrower?

I have been searching through the files in the data folder trying to find how these weapons are handled, but i cant find them (for those vehicles that fire projectiles).

If anyone knows how this might be achieved, let me know, i am so looking forwards to have some pyro fun.

Thanks in advance for the help.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

I am wondering if there is a way to replace the water cannon on the Swatvan with a flame thrower?

I have been searching through the files in the data folder trying to find how these weapons are handled, but i cant find them (for those vehicles that fire projectiles).

If anyone knows how this might be achieved, let me know, i am so looking forwards to have some pyro fun.

Thanks in advance for the help.

You can place a flamethrower on ANY car. Here is a CLEO script that checks to see if you are driving a vehicle and you can use the "+" key on the numpad to activate the flame.

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
thread 'FLAME_CAR' 
//Checks to see if the player is defined and driving any vehicle (might need restrictions)
:FLAME_CAR_19
wait 0 
if and
  Actor.Driving($PLAYER_ACTOR)
  Player.Defined($PLAYER_CHAR)
jf @FLAME_CAR_19 
//Get the player's car as 0@ and add an invisible man with a flamethrower on it.
:FLAME_CAR_44
03C0: 0@ = actor $PLAYER_ACTOR car 
Model.Load(#FLAME)
Model.Load(#MALE01)
038B: load_requested_models 
0407: store_coords_to 1@ 2@ 3@ from_car 0@ with_offset 0.0 0.0 0.0 
5@ = Actor.Create(CivMale, #MALE01, 0.0, 0.0, 0.0)
01B2: give_actor 5@ weapon 37 ammo 99999 // Load the weapon model before using this 
01B9: set_actor 5@ armed_weapon_to 37 
Actor.WeaponAccuracy(5@) = 100
//If you remove this line you will see the invisible man.
0337: set_actor 5@ visibility 0 
Actor.SetImmunities(5@, 1, 1, 1, 1, 1)
//Set the current vehicle to FIRE PROOF
Car.SetImmunities(0@, 0, 1, 0, 0, 0)
02A9: set_actor 5@ immune_to_nonplayer 1 
0619: enable_actor 5@ collision_detection 0 
06A7: put_actor 5@ into_turret_on_car 0@ at_car_offset 0.0 2.0 0.0 position 2 shooting_angle 0.0 0.0 with_weapon 37 
Model.Destroy(#FLAME)
Model.Destroy(#MALE01)
//Wait for a keypress of 107 "+" on the numpad or LMB Fire
:FLAME_CAR_239
wait 0 
if 
  Actor.InCar($PLAYER_ACTOR, 0@)
jf @FLAME_CAR_357 
if 
  not Actor.Dead(5@)
jf @FLAME_CAR_379 
if or
00E1:   player 0 pressed_key 17 
0AB0:   key_pressed 107 
jf @FLAME_CAR_239 
//Need to add some target control here so far just fires forwards.
017B: set_actor 5@ weapon 37 ammo_to 99999 
0407: store_coords_to 1@ 2@ 3@ from_car 0@ with_offset 0.0 100.0 0.0 
0668: AS_actor 5@ rotate_and_shoot_at 1@ 2@ 3@ 100 ms 
jump @FLAME_CAR_239 
//Player left car make it normal.
:FLAME_CAR_357
Actor.DestroyInstantly(5@)
Car.RemoveReferences(0@)
wait 1000 
jump @FLAME_CAR_19 
//Invisible man dead? REALLY! Wow, how did you manage that?
:FLAME_CAR_379
Actor.DestroyInstantly(5@)
Car.RemoveReferences(0@)
jump @FLAME_CAR_44 

I don't know if this works with ALL vehicles somewhat untested. Have fun you funny arsonist you!

EDIT: I made some changes lowered my invisible man to make the flames seem to come from the grill. Added LMB keypress. I tested a BMX that is funny riding a BMX shooting flames. Also since you are not holding the weapon the cops don't blame you.

Edited by ToonSkull
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...