Anti reset gun

xDraco

Active member
Joined
Nov 13, 2022
Messages
37
Reaction score
2
Is it possible to keep the gun when that gun has no ammo? As we know that if a gun runs out of ammo, the gun will disappear.
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
456
Solutions
9
Reaction score
165
Location
Poland
PHP:
{$CLEO .cs}
{$USE bitwise}
0000:
            
WHILE TRUE
WAIT 0    

IF 0256:   player $PLAYER_CHAR defined
THEN       
    IF 82D8:   actor $PLAYER_ACTOR current_weapon == 0
    THEN
        0470: 1@ = actor $PLAYER_ACTOR current_weapon    
        041A: 0@ = actor $PLAYER_ACTOR weapon 1@ ammo
        IF 0@ == 0
        THEN
            0@ += 1
            01B2: give_actor $PLAYER_ACTOR weapon 1@ ammo 0@
        END
    END     
END

END
0A93: terminate_this_custom_script
 

Attachments

  • Script.cs
    17.7 KB · Views: 5

xDraco

Active member
Joined
Nov 13, 2022
Messages
37
Reaction score
2
PHP:
{$CLEO .cs}
{$USE bitwise}
0000:
           
WHILE TRUE
WAIT 0   

IF 0256:   player $PLAYER_CHAR defined
THEN      
    IF 82D8:   actor $PLAYER_ACTOR current_weapon == 0
    THEN
        0470: 1@ = actor $PLAYER_ACTOR current_weapon   
        041A: 0@ = actor $PLAYER_ACTOR weapon 1@ ammo
        IF 0@ == 0
        THEN
            0@ += 1
            01B2: give_actor $PLAYER_ACTOR weapon 1@ ammo 0@
        END
    END    
END

END
0A93: terminate_this_custom_script
Can it be change to 0-0 ? Instead of 0-1? Bcs the server detected me as ammo hacking. Thanks
 
Top