IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 2 questions

 animation and memory
 
KirillWd  
Posted: Thursday, Jul 12 2012, 07:49
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jul 12, 2012

XXXXX



Hey, everyone! I have two different question, but I don't want to create one more topic so ask here

First:
On many SAMP's servers you can choose the animation (for example, WALK_DRUNK from PED) and player still can move and rotate (when you're pressing WASD), but with chosen animation. Well, how can I do the same thing in single game?

Second:
How to change gravity in the game? I know I should write memory, but how? I've found code's string on some site. This: "WriteMem(0x863984, 0.0015, 4, True)". It doesn't work cos there is no such function in SB. So I've tried to use opcode
This: "0A8C: write_memory 0x863984 size 4 value 0.0015 virtual_protect 1". It's probably the stupidest thing I've ever done, but I really don't understand how to change the memory. Can someone expain me or give links for some resources? It would be great if somebody could create CLEO-file and send me a source.

That's all I wanted. Peace! biggrin.gif
PM
  Top
 

 
Bad.boy!  
Posted: Thursday, Jul 12 2012, 09:02
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



You can set the walk style:
CODE
0245: set_actor $PLAYER_CHAR walk_style_to "FATMAN"


You can find most memory addresses here. But it isn't protected. This should work:
CODE
0A8C: write_memory 0x863984 size 4 value 0.0015 virtual_protect 0
PM
  Top
 

 
arijitsen  
Posted: Thursday, Jul 12 2012, 09:19
Quote Post


Modder,Gamer & GFX Artist
Group Icon
Group: Members
Joined: Jun 19, 2012

ia.gif

XXXXX



To make CJ walk like drunk here is the code:
0605: actor $PLAYER_ACTOR perform_animation_sequence "WALK_DRUNK" IFP_file "PED" 4.0 loop 0 1 1 0 time -1 // versionA
& about memory address Bad.boy has already told you.
Users WebsitePM
  Top
 

 
KirillWd  
Posted: Thursday, Jul 12 2012, 09:28
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jul 12, 2012

XXXXX



QUOTE (Bad.boy! @ Thursday, Jul 12 2012, 09:02)
You can set the walk style:
CODE
0245: set_actor $PLAYER_CHAR walk_style_to "FATMAN"


You can find most memory addresses here. But it isn't protected. This should work:
CODE
0A8C: write_memory 0x863984 size 4 value 0.0015 virtual_protect 0

well, how to add new styles and watch already exist?

0A8C: write_memory 0x863984 size 4 value 0.0015 virtual_protect 0
it doesn't work. Error:
the memory can't be written
so what's wrong?

arijitsen, I know how to start animation and attach it to player. But I need player to follow the camera with this animation

This post has been edited by KirillWd on Thursday, Jul 12 2012, 09:33
PM
  Top
 

 
JACK JONES  
Posted: Thursday, Jul 12 2012, 09:54
Quote Post


Booom!!!
Group Icon
Group: Members
Joined: Dec 6, 2011

sr.gif

XXXXX



Try now:
CODE
0007: 0@ = 0.0015 // floating-point values
0A8C: write_memory 0x863984 size 1 value 0@ virtual_protect 0


This post has been edited by JACK JONES on Thursday, Jul 12 2012, 10:08
PM
  Top
 

 
KirillWd  
Posted: Thursday, Jul 12 2012, 12:08
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jul 12, 2012

XXXXX



DUDES, I DID IT biggrin.gif
I changed gravity
CODE

{$CLEO}
0@ = 0.0005
:MEMORY
wait 0
0A8C: write_memory 0x863984 size 4 value 0@ virtual_protect 1

:TEXT
0A8D: 1@ = read_memory 0x863984 size 4 virtual_protect 1
1@ *= 100000.0
0092: 1@ = float 1@ to_integer
01E5: text_1number_highpriority 'NUMBER' 1@ 5000 ms 1
wait 5000
jump @TEXT

I've just substituted virtual protect to 1 and everything works now

But the anim problem still exists

This post has been edited by KirillWd on Thursday, Jul 12 2012, 12:11
PM
  Top
 

 
Michael-Knight1  
Posted: Thursday, Jul 12 2012, 16:39
Quote Post


Never Give UP
Group Icon
Group: Members
Joined: Jul 8, 2012

gr.gif

XXXXX



You should read Seemanns topic :

http://www.gtaforums.com/index.php?showtopic=262280
Users WebsitePM
  Top
 

 
Bad.boy!  
Posted: Thursday, Jul 12 2012, 17:50
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



QUOTE (KirillWd @ Thursday, Jul 12 2012, 14:08)
But the anim problem still exists

Have you tried my solution?

CODE
0245: set_actor $PLAYER_CHAR walk_style_to "FATMAN" // "WALK_DRUNK" in your case


@MK
What has that to do with anything? He knows how to read/write memory.
PM
  Top
 

 
KirillWd  
Posted: Thursday, Jul 12 2012, 19:31
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jul 12, 2012

XXXXX



QUOTE (Bad.boy! @ Thursday, Jul 12 2012, 17:50)
QUOTE (KirillWd @ Thursday, Jul 12 2012, 14:08)
But the anim problem still exists

Have you tried my solution?

CODE
0245: set_actor $PLAYER_CHAR walk_style_to "FATMAN" // "WALK_DRUNK" in your case


yep, I have. Nothing's out. The walk style doesn't change.
so it's done somehow else in samp
PM
  Top
 

 
Michael-Knight1  
Posted: Thursday, Jul 12 2012, 19:47
Quote Post


Never Give UP
Group Icon
Group: Members
Joined: Jul 8, 2012

gr.gif

XXXXX



QUOTE (KirillWd @ Thursday, Jul 12 2012, 19:31)
QUOTE (Bad.boy! @ Thursday, Jul 12 2012, 17:50)
QUOTE (KirillWd @ Thursday, Jul 12 2012, 14:08)
But the anim problem still exists

Have you tried my solution?

CODE
0245: set_actor $PLAYER_CHAR walk_style_to "FATMAN" // "WALK_DRUNK" in your case


yep, I have. Nothing's out. The walk style doesn't change.
so it's done somehow else in samp

Write Full Script whatsthat.gif
Users WebsitePM
  Top
 

 
KirillWd  
Posted: Sunday, Jul 22 2012, 20:45
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jul 12, 2012

XXXXX



this work
CODE

0A1A: actor $PLAYER_ACTOR perform_animation "WALK_DRUNK" IFP_file "PED" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 -1 ms

but if use it with condition of movement then problem is the player's walk speed
for example
CODE

:ANIM
wait 0
if
   00E1: key_pressed 0 1
jf @ANIM
0A1A: actor $PLAYER_ACTOR perform_animation "WALK_DRUNK" IFP_file "PED" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 -1 ms
jump @ANIM
PM
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG