CLEO Help Sniper exception condition help

CLEO related
Status
Not open for further replies.

Audioli

Active member
Joined
May 20, 2015
Messages
58
Reaction score
0
I'm trying to edit a little this cleo mod
it's an Auto C-bug but I'm still having problems with it
eg. when you fire in sniper while using it, you will rapidfire.
I want that the cleo do not cbug with Sniper because it's too obvious I can shoot like 3 bullets in 1 second.
Please help me  :-/

Code:
{$CLEO .cs}
0000: NOP
repeat
wait 400
until SAMP.Available
0B34: samp register_client_command "cbug" to_label @Cmd
0B34: samp register_client_command "cbugwait" to_label @wait
10@ == 0

while true
wait 10@
0470: 3@ = actor $PLAYER_ACTOR current_weapon
if and
02E0:   actor $PLAYER_ACTOR firing_weapon
31@ == 1
    then
    if and
    3@ >= 23
    3@ <= 25
        then jump @work
        end
    if or
    3@ == 33
    3@ == 34
        then jump @work
        end
    end
continue
:work
01B2: give_actor $PLAYER_ACTOR weapon 3@ ammo 0 // Load the weapon model before using this
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
2@ += -1.0
Actor.PutAt($PLAYER_ACTOR, 0@, 1@, 2@)
end

:Cmd
0B12: 31@ = 31@ XOR 1
SAMP.CmdRet

:wait
0B35: samp 8@ = get_last_command_params
0AD4: 9@ = scan_string 8@ format "%d" 10@ 
samp.CmdRet()
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,486
Reaction score
227
Location
( ͡° ͜ʖ ͡°)
:work
if
82D8: not actor $PLAYER_ACTOR current_weapon == 31 // sniper
then
01B2: give_actor $PLAYER_ACTOR weapon 3@ ammo 0 // Load the weapon model before using this
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
2@ += -1.0
Actor.PutAt($PLAYER_ACTOR, 0@, 1@, 2@)
end
end
 

bladero

Active member
Joined
Jan 3, 2017
Messages
73
Reaction score
0
Well then you dont have sampfuncs sdk installed go here: http://ugbase.eu/Thread-ASI-SAMPFUNCS-5-3-0-3-7 and just follow the instructions below its under For developers:
 
Status
Not open for further replies.
Top