Jump to content

Cped memory coding


venid

Recommended Posts

According to the wiki page, 

CPed +0x598 = [byte] Player lock (set to 1 to lock player controls, can't move


I want an example script with CPed +0x598 let's say by keypress so the character can't move

Link to comment
Share on other sites

3 hours ago, venid said:

According to the wiki page, 

CPed +0x598 = [byte] Player lock (set to 1 to lock player controls, can't move


I want an example script with CPed +0x598 let's say by keypress so the character can't move

Which game you're talking about? Because CPed + 0x598 is not a lock status. It's a pedtype [DWORD] for San Andreas. 
If you want to lock a player do it like this:

while true
    wait 0
    if 00E1:   player 0 pressed_key 17
    then
        wait 1000
        if 09E7: NOT  player $PLAYER_CHAR not_frozen
        then
            0575: set_actor $PLAYER_ACTOR pinned_position 1 //  0 to unlock
            01B4: set_player $PLAYER_CHAR can_move 1        //  0 to unlock
        end
    end
end

EDIT: Wiki page is completely wrong. 0x59C is a ped stats which can still not be used to lock a player out.

Edited by Jack
Link to comment
Share on other sites

5 minutes ago, Jack said:

Which game you're talking about? Because CPed + 0x598 is not a lock status. It's a pedtype [DWORD] for San Andreas. 
If you want to lock a player do it like this:

while true
    wait 0
    if 00E1:   player 0 pressed_key 17
    then
        wait 1000
        if 09E7: NOT  player $PLAYER_CHAR not_frozen
        then
            0575: set_actor $PLAYER_ACTOR pinned_position 1 //  0 to unlock
            01B4: set_player $PLAYER_CHAR can_move 1        //  0 to unlock
        end
    end
end

 

Yes, GTA SA. 

 

And my bad, It seems I have the cped all wrong. 

 

Long story short. I have a weapon animation that only plays correct while crouching or when I use the "bad" ifp variation.  While standing, the character shakes and I thought that 0x598 would lock the character or something.

 

Would you happen to know how I can make the weapon animation while standing play without shaking? 

Link to comment
Share on other sites

5 minutes ago, Jack said:

I'm not sure. Try editing weapon.dat from the data folder.

Unfortunately that doesn't work. I know it has something to do with the character moving foward since with the poor weapon skill and while crouching player doesn't move while firing.

 

Anyways, hopefully someone on here knows something 

Edited by venid
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.