CLEO Help [Request] Antistun Fist

CLEO related
Status
Not open for further replies.

kungdun

Active member
Joined
Feb 16, 2017
Messages
31
Reaction score
0
* Name of the mod (if the mod doesn't exist, you don't have to tell one): Antistun Fist
* Where you saw it (not the server, we mean if you saw any videos/screenshots about it or not): blasthack forum - that version I found required sampfuncs which isn't available for 0.3.dl which is what I plan to use it on.
* What do you want (the most important part, explain this carefully) When getting punched by a player I don't want my character to fall to the ground.
* Details (add more details to your request) ^
* On/off key (specify it): Uhh F6 I guess.
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
Edit.:
Edited code.

PHP:
{$CLEO .cs}

0000:
  
WAIT 10000 
 
 
WHILE TRUE
    WAIT 0   
IF
056D:   actor $PLAYER_ACTOR defined 
THEN
    WAIT 0 
    // GET ALL STREAMED PEDS     
    0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
    000A: 29@ += 0x4
    0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
    FOR 30@ = 0 to 35584 step 0x100
        0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0
        000A: 29@ += 0x1
        IF AND
            0029:  31@ >= 0x00 
            001B:  0x80 > 31@
        THEN 
            005A: 31@ += 30@
                IF AND
                803B:   31@ == $PLAYER_ACTOR  // (int)
                056D:   actor 31@ defined
                THEN
                    00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
                    00A0: store_actor 31@ position_to 4@ 5@ 6@
                    0509: 7@ = distance_between_XY 1@ 2@ and_XY 4@ 5@
                    IF
                    7@ <= 0.3 // (float) , if player distance smaller or equals 0.3 then....
                    THEN
                        IF AND
                        02D8:   actor 31@ current_weapon == 0
                        051A:   actor $PLAYER_ACTOR damaged_by_actor 31@
                        THEN
                            0812: AS_actor $PLAYER_ACTOR perform_animation "HIT_WALK" IFP "PED" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 0 time 1
                            0467: clear_actor 31@ last_weapon_damage
                            054E: clear_actor $PLAYER_ACTOR damage 
                        END    
                    END
               END 
           END
       END
   END
END
 
Last edited:
Status
Not open for further replies.
Top