CLEO Help Set weapon back to what it was, in CLEO

CLEO related
Status
Not open for further replies.

Zin

Expert
Joined
Aug 1, 2013
Messages
1,734
Solutions
2
Reaction score
117
So after using this opcode
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0

how do I set the gun back to what it was so like, I have an mp5 I get set to fist and then get set back to mp5 again how do I do this?
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
27
zin said:
So after using this opcode
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0

how do I set the gun back to what it was so like, I have an mp5 I get set to fist and then get set back to mp5 again how do I do this?

i am not sure but maybe use weapon id? like fist id is 0 and mp5 is 29
so maybe 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 29
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,734
Solutions
2
Reaction score
117
Malchik said:
zin said:
So after using this opcode
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0

how do I set the gun back to what it was so like, I have an mp5 I get set to fist and then get set back to mp5 again how do I do this?

i am not sure but maybe use weapon id? like fist id is 0 and mp5 is 29
so maybe 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 29

Yeah but if I'm not using the mp5 and the deagle that would probably crash so I would have to make a massive if loop for all of the weapons I was wondering if maybe I can just store the weapon slot to a variable and then use the variable to switch it back.

Solved it: there was an opcode for getting current weapon
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
27
zin said:
Malchik said:
zin said:
So after using this opcode
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0

how do I set the gun back to what it was so like, I have an mp5 I get set to fist and then get set back to mp5 again how do I do this?

i am not sure but maybe use weapon id? like fist id is 0 and mp5 is 29
so maybe 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 29

Yeah but if I'm not using the mp5 and the deagle that would probably crash so I would have to make a massive if loop for all of the weapons I was wondering if maybe I can just store the weapon slot to a variable and then use the variable to switch it back.

Solved it: there was an opcode for getting current weapon

Maybe you could share this opcode? I want to make something with that too.
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,734
Solutions
2
Reaction score
117
You can just use the opcode searcher but here it is.

0470: 76@ = actor $PLAYER_ACTOR current_weapon
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
27
zin said:
You can just use the opcode searcher but here it is.

0470: 76@ = actor $PLAYER_ACTOR current_weapon

Yea i found it already in some sort of autoscroller, but thanks
 
Status
Not open for further replies.
Top