hi basically i am new to cleo scripting and have made myself a cleo script that replicates quick swapping (swapping to a different weapon and back again to avoid reload time) i was wondering if someone could help me add a button to toggle it on and a button to disable it into the script
Note the script is only coded for shotguns and pistols at the moment
heres the cleo code
any help would be much appreciated, thanks
Note the script is only coded for shotguns and pistols at the moment
heres the cleo code
Code:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
{$VERSION 3.1.0027}
{$CLEO .cs}
//-------------MAIN---------------
thread 'GIVE_WEAPON'
jump @GIVE_WEAPON_26
:GIVE_WEAPON_26
wait 0
if
Player.Defined($PLAYER_CHAR)
else_jump @GIVE_WEAPON_26
jump @GIVE_WEAPON_53
:GIVE_WEAPON_53
wait 0
if
02D8: actor $PLAYER_ACTOR current_weapon == 22
02D8: actor $PLAYER_ACTOR current_weapon == 23
02D8: actor $PLAYER_ACTOR current_weapon == 24
else_jump @GIVE_WEAPON_310
wait 0
if
02E0: actor $PLAYER_ACTOR aggressive
else_jump @GIVE_WEAPON_53
jump @GIVE_WEAPON_116
:GIVE_WEAPON_116
wait 0
04B8: get_weapon_data_from_actor $PLAYER_ACTOR weapon_group 4 weapon 1@ ammo 2@ model 3@
wait 10
if
2@ > 0
else_jump @GIVE_WEAPON_256
wait 1800
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 1@
wait 10
04B8: get_weapon_data_from_actor $PLAYER_ACTOR weapon_group 3 weapon 1@ ammo 2@ model 3@
wait 600
0812: AS_actor $PLAYER_ACTOR perform_animation "BUDDY_RELOAD" IFP_file "BUDDY" 10.0 loopA 0 lockX 0 lockY 0 lockF 0 time 1 // versionB
wait 10
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 1@
jump @GIVE_WEAPON_53
:GIVE_WEAPON_256
wait 1800
01B2: give_actor $PLAYER_ACTOR weapon 0 ammo 0 // Load the weapon model before using this
wait 600
04B8: get_weapon_data_from_actor $PLAYER_ACTOR weapon_group 3 weapon 1@ ammo 2@ model 3@
wait 10
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 1@
jump @GIVE_WEAPON_53
:GIVE_WEAPON_310
wait 0
if
02D8: actor $PLAYER_ACTOR current_weapon == 25
02D8: actor $PLAYER_ACTOR current_weapon == 26
02D8: actor $PLAYER_ACTOR current_weapon == 27
else_jump @GIVE_WEAPON_53
wait 0
if
02E0: actor $PLAYER_ACTOR aggressive
else_jump @GIVE_WEAPON_310
jump @GIVE_WEAPON_373
:GIVE_WEAPON_373
wait 0
04B8: get_weapon_data_from_actor $PLAYER_ACTOR weapon_group 5 weapon 1@ ammo 2@ model 3@
wait 10
if
2@ > 0
else_jump @GIVE_WEAPON_509
wait 800
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 1@
wait 10
04B8: get_weapon_data_from_actor $PLAYER_ACTOR weapon_group 4 weapon 1@ ammo 2@ model 3@
wait 500
0812: AS_actor $PLAYER_ACTOR perform_animation "UZI_RELOAD" IFP_file "UZI" 10.0 loopA 0 lockX 0 lockY 0 lockF 0 time 1 // versionB
wait 10
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 1@
jump @GIVE_WEAPON_53
:GIVE_WEAPON_509
wait 0
04B8: get_weapon_data_from_actor $PLAYER_ACTOR weapon_group 3 weapon 1@ ammo 2@ model 3@
wait 10
if
2@ > 0
else_jump @GIVE_WEAPON_651
wait 800
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 1@
wait 10
04B8: get_weapon_data_from_actor $PLAYER_ACTOR weapon_group 4 weapon 1@ ammo 2@ model 3@
wait 600
0812: AS_actor $PLAYER_ACTOR perform_animation "COLT45_RELOAD" IFP_file "COLT45" 10.0 loopA 0 lockX 0 lockY 0 lockF 0 time 1 // versionB
wait 10
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 1@
jump @GIVE_WEAPON_53
:GIVE_WEAPON_651
wait 800
01B2: give_actor $PLAYER_ACTOR weapon 0 ammo 0 // Load the weapon model before using this
wait 400
04B8: get_weapon_data_from_actor $PLAYER_ACTOR weapon_group 4 weapon 1@ ammo 2@ model 3@
wait 10
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 1@
jump @GIVE_WEAPON_53
any help would be much appreciated, thanks