Jump to content
funkylok

Vehicle Weapon Editing

Recommended Posts

funkylok    0

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.

Share this post


Link to post
Share on other sites
ToonSkull    4

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 [email protected] and add an invisible man with a flamethrower on it.
:FLAME_CAR_44
03C0: [email protected] = actor $PLAYER_ACTOR car 
Model.Load(#FLAME)
Model.Load(#MALE01)
038B: load_requested_models 
0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 0.0 
[email protected] = Actor.Create(CivMale, #MALE01, 0.0, 0.0, 0.0)
01B2: give_actor [email protected] weapon 37 ammo 99999 // Load the weapon model before using this 
01B9: set_actor [email protected] armed_weapon_to 37 
Actor.WeaponAccuracy([email protected]) = 100
//If you remove this line you will see the invisible man.
0337: set_actor [email protected] visibility 0 
Actor.SetImmunities([email protected], 1, 1, 1, 1, 1)
//Set the current vehicle to FIRE PROOF
Car.SetImmunities([email protected], 0, 1, 0, 0, 0)
02A9: set_actor [email protected] immune_to_nonplayer 1 
0619: enable_actor [email protected] collision_detection 0 
06A7: put_actor [email protected] into_turret_on_car [email protected] 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, [email protected])
jf @FLAME_CAR_357 
if 
  not Actor.Dead([email protected])
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 [email protected] weapon 37 ammo_to 99999 
0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 100.0 0.0 
0668: AS_actor [email protected] rotate_and_shoot_at [email protected] [email protected] [email protected] 100 ms 
jump @FLAME_CAR_239 
//Player left car make it normal.
:FLAME_CAR_357
Actor.DestroyInstantly([email protected])
Car.RemoveReferences([email protected])
wait 1000 
jump @FLAME_CAR_19 
//Invisible man dead? REALLY! Wow, how did you manage that?
:FLAME_CAR_379
Actor.DestroyInstantly([email protected])
Car.RemoveReferences([email protected])
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

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


×