GTA: Modification Area

A website for the GTA modding scene

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Big-game starts raising Schneider's profile
Sun Mar 04, 2012 2:28 am by lavivi

» [Help] cleo created lighting
Thu Oct 14, 2010 1:03 am by findmy012

» Mission Question
Thu Oct 14, 2010 1:02 am by findmy012

» [IV] Spoiler Script
Thu Oct 14, 2010 1:02 am by findmy012

» Mission mod [help]
Sat Sep 18, 2010 5:50 pm by jayd00

» Bc7 Mod Help
Fri Aug 20, 2010 11:19 am by pengpeng

» Found a bug
Fri Dec 18, 2009 4:22 am by _CJ360_

» [IV] Novitec Rosso 599 GTB
Tue Nov 17, 2009 4:22 pm by Kotton

» Hello/Guidance Request
Mon Oct 12, 2009 6:45 am by Adler

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Affiliates
image

Image

Image

Image

Image

Image

Image

Image

Image

Image

image

Image

steve-m.com

Image


----- Русский -----

Если ваш сайт содержит большую коллекцию SCM/CLEO-скриптов (больше 16), напишите на мой e-mail, и я добавлю его в список. Приветствуются скрипты, которые не встречаются на других сайтах ... Спасибо. ))))


----- English -----

If your website has a big enough collection of SCM/CLEO scripts (more than 16) notify me by e-mail
, and I will add it to the list. The unique scripts are preferable ... Thank you. ))))

Log in

I forgot my password



December 2016
MonTueWedThuFriSatSun
   1234
567891011
12131415161718
19202122232425
262728293031 

Calendar Calendar


You are not connected. Please login or register

Hello/Guidance Request

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Hello/Guidance Request on Sat Aug 22, 2009 8:38 pm

Okay, I don't speak a word of Russian so I give myself kudos for being able to register so fast. I thought there was no better place for modding information than GTAForums, but then I saw this place!

I've read a few things and it's already given me the inspiration to make new mods as well as showing me how.

I've been coding for a while now and I'm getting to the stage where I'm bored of the opcodes given to me. I use memory addressing from time to time but besides from that I have no clue how to use many functions in the San Andreas .exe.

After reading a few topics I've got the idea that a few different coding techniques can be used in CLEO Scripts (?) such as ASM, Delphi etc(?). Well I don't know which one I need. All I've ever done is a bit of C++/Basic and a heap of web languages. I've always wanted to break into C++ but due to my fondness of GTASA, it's changed into wanting to learn something that I can make scripts in that with.

So if anyone knows what technique I'm better of starting with, and then teaching me some basics in which I can go on learning then I'd be a happy person Very Happy If there are any tutorials in existance, point me in that direction with my tail between my legs... No references intended.

View user profile http://gtag.gtagaming.com

2 Re: Hello/Guidance Request on Sun Aug 23, 2009 12:22 am


Okay, I don't speak a word of Russian so I give myself kudos for being able to register so fast. I thought there was no better place for modding information than GTAForums, but then I saw this place!


Ops! Yes, sorry I forgot that I have all my display site infromation in Russian. I forget that not very one understands Russian. Are you able to read your/my profile information, or is it still in Russian for you? And thank you for the nice comment, it's very nice to hear. Grin Smile




So if anyone knows what technique I'm better of starting with, and then teaching me some basics in which I can go on learning then I'd be a happy person If there are any tutorials in existance, point me in that direction with my tail between my legs... No references intended.


There are tut's on the Microsoft website on C/C++.

As for what you should start off with, I recommand first to try and use a ASM injector in your script. There are two topics for this (as you problay read)


  • One in the SA Memory Topic
  • One in the Russian forum (in Russian!)


Delphi codes are for Delphi, it's a programming tool, the same Sanny Builder was written in. ASM, yes but these for main.scm, we have even better ways to pull of the function when we use CLEO.

You said about functions in the .exe file, there is a huge list of them, that Seemann & listener created, I can give you a link to the TXT-file, but as for the topic - again in Russian language. Wink


_________________
Some links for modding information:
• GTAModding Wiki
• Документация по моддингу GTA
• Sanny Builder (Русский)
• Sanny Builder Profile

View user profile http://gtamodding.com

3 Re: Hello/Guidance Request on Sun Aug 23, 2009 12:53 am

Heh, that's okay. I should be the one saying sorry. Besides, it's me who only knows one language and you who knows 2. Us english speaking peoples are lazy, lol.

I can always use Google Translate to view the pages in english. And then confuse you all with my badly translated Russian Razz

Your profile is in english besides from the Location & Job/Hobby fields.

I'm finding that the Russian/Japanese sites are the ones to check out when it comes to advanced coding. Only problem I have is that Google searches english sites over everything else.


I'm confused when it comes to the memory address wiki's.

1. What is the difference between function and normal memory addreses? And how do I use each of them correctly. (I believe you use them differently?)

2. That isn't a full list, right? I've seen addresses used which I can't find listed there.


My main priority is trying to find out what stuff like this means:

Code:
0A9F: 0@ = current_thread_pointer
000A: 0@ += 0x10
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
000E: 0@ -= @Dialog_Text
000A: 0@ += 4
0085: 1@ = 0@ // (int)
000A: 1@ += 31
for 31@ = 0@ to 1@
  0A8C: write_memory 31@ size 1 value 0x20 virtual_protect 0
end

(Rysuke's mission loader, lol.)

And be able to write stuff like that without having someone to hold my hand...

Speaking of which, I've been trying for days to learn how to write a keyboard script in San Andreas... Like the one in the Mission Loader. I've got the original source and I still can't figure out what I need.

All I know is that AAAAAA(...) is the changable text and 0000: NOP turns it into the entered text. I don't know how the keys are retrieved, converted to letters and added to the text box. If I could figure that out, I'd be able to make alot of mods with it Smile

Also, big thanks to you for that 3 page topic full of examples. I needed the address to fix a headlight and I thought I was never gonna get one. But yeah, I managed to bump into your topic. Gonna improve Vigilante Justice with it now... Very Happy

View user profile http://gtag.gtagaming.com

4 Re: Hello/Guidance Request on Sun Aug 23, 2009 1:16 am


Heh, that's okay. I should be the one saying sorry. Besides, it's me who only knows one language and you who knows 2. Us english speaking peoples are lazy, lol.



Actually, more than 2.


  • Russian
  • German
  • Ukrainian
  • Japanese
  • English




I can always use Google Translate to view the pages in english. And then confuse you all with my badly translated Russian



Ха-ха, я знаю ... (ha ha, I know) Google is a machine made translator, so it's the best possible at this stage, it's very bad in translating Japanese ...




I'm finding that the Russian/Japanese sites are the ones to check out when it comes to advanced coding. Only problem I have is that Google searches english sites over everything else


Yes, I take it because we have more information, your computer searches English ones, because Google deafult search is set to English on your computer (must be), try to change it

http://www.google.ru/preferences?hl=ru



1. What is the difference between function and normal memory addreses? And how do I use each of them correctly. (I believe you use them differently?)



A function address is something you call, a memory address is usually something you read or write to.




2. That isn't a full list, right? I've seen addresses used which I can't find listed there.


It's almost a full list of memory functions not memory addresses (per say).



(Rysuke's mission loader, lol.)

And be able to write stuff like that without having someone to hold my hand...

Speaking of which, I've been trying for days to learn how to write a keyboard script in San Andreas... Like the one in the Mission Loader. I've got the original source and I still can't figure out what I need.


Ryosuke is getting the keys of the keyboard and when you type them it writes the message. Yes, he is complex, but his scripts are easy to understand if your reading the source, and you have exp. with memory handling/hacking.



All I know is that AAAAAA(...) is the changable text and 0000: NOP turns it into the entered text. I don't know how the keys are retrieved, converted to letters and added to the text box. If I could figure that out, I'd be able to make alot of mods with it


It's not the AAAAA part which does this ... it's all of Ryosuke's scrpt which does. AAAAAA (...) is used because this can mean anything, it would not work if Ryosuke put something like ***** for example.

Also Ryosuke posted his source code there if it helps:

http://ryosuke.my-sv.net/mapmod/cml/cml.txt



Also, big thanks to you for that 3 page topic full of examples. I needed the address to fix a headlight and I thought I was never gonna get one. But yeah, I managed to bump into your topic. Gonna improve Vigilante Justice with it now...



It's no problem... more to come soon, sure. Wink


_________________
Some links for modding information:
• GTAModding Wiki
• Документация по моддингу GTA
• Sanny Builder (Русский)
• Sanny Builder Profile

View user profile http://gtamodding.com

5 Re: Hello/Guidance Request on Sun Aug 23, 2009 4:54 am

I read Ryosuke's source but I can't figure out what I need from it. I have no idea what the addresses do either...


I tried stripping it down. But I'm having trouble on the keypresses. So far there is just an empty box waiting to have stuff put in it. Note that if the wait at the bottom is removed, the text box will only show up for 0ms and keep getting removed...

Code:
snip

And someone from my forum tried:

But we can't get it to work so far. The box on this one won't show up. But I get a feeling data is still being sent to it.

Code:
snip



Last edited by Deji on Tue Aug 25, 2009 2:17 am; edited 1 time in total

View user profile http://gtag.gtagaming.com

6 Re: Hello/Guidance Request on Sun Aug 23, 2009 8:07 am



Deji, try:



Code:

{$CLEO .cs}

 0000:
// Initial checks; If 'TYPESAVE' is typed

:start
while true
wait 0
if
  0256:  player $PLAYER_CHAR defined
then
    if
      $ONMISSION == 0
    then
        0A8D: 10@ = read_memory 0x969110 size 4 virtual_protect 0
        0A8D: 11@ = read_memory 0x969114 size 4 virtual_protect 0
      if and
          04A4:  10@ == 0x53415645 // Hex String 'SAVE'
          04A4:  11@ == 0x54595045 // Hex String 'TYPE'
          then
              break
            end
        end
    end
end
03E5: show_text_box 'CHEAT1'
0A8C: write_memory 0x00969110 size 4 value 0 virtual_protect 0 // Clears previous keypress
0A8C: write_memory 0x00969114 size 4 value 0 virtual_protect 0 // Clears previous keypress
0A8C: write_memory 0x00969118 size 4 value 0 virtual_protect 0 // Clears previous keypress
0A8C: write_memory 0x0096911C size 4 value 0 virtual_protect 0 // Clears previous keypress
01B4: set_player $PLAYER_CHAR can_move 0
03BF: set_player $PLAYER_CHAR ignored_by_everyone 1

:KEYPRESS
0A8D: 10@ = read_memory 0x969110 size 4 virtual_protect 0
0A8D: 11@ = read_memory 0x969114 size 4 virtual_protect 0
0A8D: 12@ = read_memory 0x969118 size 4 virtual_protect 0
0A8D: 13@ = read_memory 0x96911C size 4 virtual_protect 0

0050: gosub @POINTER
0A8C: write_memory 0@ size 4 value 10@ virtual_protect 0
000A: 0@ += 4
0A8C: write_memory 0@ size 4 value 11@ virtual_protect 0
000A: 0@ += 4
0A8C: write_memory 0@ size 4 value 12@ virtual_protect 0
000A: 0@ += 4
0A8C: write_memory 0@ size 4 value 13@ virtual_protect 0

:SHOW_TEXT
gosub @POINTER
09C1: add_next_text_to_brief_history 1
gosub @BlackBox


0A8C: write_memory 0x00969110 size 4 value 0 virtual_protect 0 // Clears previous keypress
0A8C: write_memory 0x00969114 size 4 value 0 virtual_protect 0 // Clears previous keypress
0A8C: write_memory 0x00969118 size 4 value 0 virtual_protect 0 // Clears previous keypress
0A8C: write_memory 0x0096911C size 4 value 0 virtual_protect 0 // Clears previous keypress

if
  80E1:  not player 0 pressed_key 16
jf @FINISH
wait 750
jump @KEYPRESS



:FINISH
03E6: remove_text_box
01B4: set_player $PLAYER_CHAR can_move 1
03BF: set_player $PLAYER_CHAR ignored_by_everyone 0
wait 2000
jump @START

:POINTER
0A9F: 0@ = current_thread_pointer
000A: 0@ += 0x10
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
000E: 0@ -= @TEMP_MEMORY
000A: 0@ += 4
return

:BlackBox
if
    0AA9:  is_game_version_original
then
    0AA5: call 0x588BE0 num_params 4 pop 4 0 0 0 0@
else
    0AA5: call 0x5893B0 num_params 4 pop 4 0 0 0 0@
end
return  // Set SB 'Case Converting' to 'As is'!

:TEMP_MEMORY
0900: "AAAAAAAAAAAAAAAA"
0000:


Untested! You may need to modify it a little, so that after you type one letter, when you type another the current text_box and letter will not deleted. (Because the text_box gets re-displayed after you type another letter.) Have no time to test that yet. I will later.

This,


Code:

000A: 0@ += 4


is needed to skip the opcode 0900 data, and point directly to the text (see topic "Coding Snippets").


Off speaking - I have my own way of writting small messages on the screen, without text_box's but
in priority text, but text_box can be applyed also easily.


Code:

{$CLEO}

wait 2000
0A9F: 0@ = current_thread_pointer
0@ += 0x10
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
0@ -= @Buffer   

while true
wait 100
0AB1: call_scm_func @GetStringL 1 0x969110 1@
0AB1: call_scm_func @CopyStringWR 3 0x969110 0@ 1@ 
0AA5: call 0x69F0B0 num_params 4 pop 4 0 0 100 0@ 
end

:GetStringL
repeat
0A8D: 1@ = read_memory 0@ size 1 virtual_protect 0
000A: 0@ += 1
000A: 2@ += 1
until 1@ == 0
000A: 2@ += 0xFFFFFFFF
0AB2: ret 1 2@

:CopyStringWR
2@ -= 1
for 5@ = 2@ downto 0 do             
0A8E: 4@ = 0@ + 5@
0A8D: 3@ = read_memory 4@ size 1 virtual_protect 0
0A8C: write_memory 1@ size 1 value 3@ virtual_protect 0
000A: 1@ += 1
end
0A8C: write_memory 1@ size 1 value 0 virtual_protect 0 
0AB2: ret 0

:Buffer
hex
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
end


http://waterviper.forumtwilight.com/forum-f2/tema-t107.htm#334


Also, it would be better instead of doing it the first way, and just get the indexs,


Code:

for 1@ = 65 to 90 // A - Z


etc. And write to them.





_________________
Some links for modding information:
• GTAModding Wiki
• Документация по моддингу GTA
• Sanny Builder (Русский)
• Sanny Builder Profile

View user profile http://gtamodding.com

7 Re: Hello/Guidance Request on Sun Aug 23, 2009 2:20 pm

It's going well so far! I managed to fix a few bugs and the typing system works flawlesly. The only problem is that to keep the text box on screen the text box function needs to be called over and over...

The one problem that persists is making the spacebar and backspace function properly...

Also, random text appears on the second line.
(seems to collect random variable names or somethin)

Code:
snip... (page was getting loong)



Last edited by Deji on Tue Aug 25, 2009 2:16 am; edited 1 time in total

View user profile http://gtag.gtagaming.com

8 Re: Hello/Guidance Request on Mon Aug 24, 2009 8:19 am


Also, random text appears on the second line.
(seems to collect random variable names or somethin)


Хмм, I will have a look at that. Yes, it does seem to "collect" some variable, but I am not sure, why that one.
It gets the active interior, you should use hex..end structure.


Code:

hex
"____________________"
"____________________"
"____________________"
"____________________" 00
end


for example, this has 4 lines, adding more lines of thw same size will make the text_box more big, it will also fix that "active interior" from showing. '00' is a null digit, it's used just so the hex..end structure its self does not appear.


Code:

:POINTER
0A9F: 0@ = current_thread_pointer
000A: 0@ += 0x10
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
000E: 0@ -= @TEMP_MEMORY
return

:TEMP_MEMORY
hex
"____________________"
"____________________"
"____________________"
"____________________" 00
end


The parts you used in the script that skip 4 data-type bytes, because you used a opcode to store the text, you can delete if you this method, because there is nothing (no data-type (0900:)) to skip anymore, so all parts in the script that are used to skip the 0900 data can now be deleted.

In your script there is a trick from which Ryosuke, I, and some more use. Maybe that's something to do with it ... don't know - not tested.

There is a topic about data-storage in CLEO scripts, on a Wiki.

Varistor - ローカル変数の制限突破



the text box on screen the text box function needs to be called over and over...


Yea, this is a "real bitch", or something like that, what about display it once, check if any key is pressed (A-Z) and then display the text_box, again?




The one problem that persists is making the spacebar and backspace function properly...



~ Space bar ~


Code:

if and
    0AB0: key_pressed 0x20
then
  0A8C: write_memory 0@ size 1 value 0x20 virtual_protect 0
  0@ += 1
  0A8C: write_memory 0@ size 1 value 0x5F virtual_protect 0
  0@ += 1
  0A8C: write_memory 0@ size 1 value 0x0 virtual_protect 0
  0@ -= 1
    CHARS += 1
repeat
    wait 0
  until 8AB0: not key_pressed 0x20
end


~ Back space ~

Code:

if
  0AB0: key_pressed 0x8
 then
  0@ -= 1
  0A8C: write_memory 0@ size 1 value 0x5F virtual_protect 0
    CHARS -= 1
  repeat
  wait 0
  until 8AB0: not key_pressed 0x8
end


Should work.


_________________
Some links for modding information:
• GTAModding Wiki
• Документация по моддингу GTA
• Sanny Builder (Русский)
• Sanny Builder Profile

View user profile http://gtamodding.com

9 Re: Hello/Guidance Request on Mon Aug 24, 2009 11:54 pm

cheers. I had to change it a bit to make it work... To be honest I can't believe I couldn't add them before. It was soo simple and I think I even nearly did it, but got the lines muddled up.



It seems to work perfectly. I even managed to add number support...

And I managed to get it to activate animations:

Code:
0605: actor $PLAYER_ACTOR perform_animation_sequence 0@ IFP_file "PED" 4.0 loop 1 0 0 0 time -1
0000:

Invalid entries crash the game though... Know of any way to ask the game whether an animation exists? Not just the IFP file, the animations inside.

Otherwise I'd have to add billions of checks for each anim in San Andreas. xD

Can't wait to find out. I've been working on a debugging script for a while... I never intended for it to be a full blown debugger... But I used it everytime I wanted to make a script to help me with something. Over time it's grown and grown...

So adding the feature to test anims as well as testing parameters of the animation opcodes would be great!

Also, any specific way of performing an opcode line in hexidecimal? Or would this work:

Code:
20 30 30 30 31 3a 20 35 30 30 30

= wait 5000 command?

If I can figure that out I could maybe code the abillity to get any opcode and test the hell outa it Smile

View user profile http://gtag.gtagaming.com

10 Re: Hello/Guidance Request on Tue Aug 25, 2009 1:48 am


Invalid entries crash the game though... Know of any way to ask the game whether an animation exists? Not just the IFP file, the animations inside.


Yes, I think somewhere, but why do not just check if the animation (0@) has loaded if not, don't make CJ perform, because if the entry is invalid then the animation will not be loaded - therefore no crash possible, all game versions will have the same animations in the gta3.img, (other than the animations used for 'Hot Coffee' which are not in v1.01 and higher). Put the loaded part in the loop before the player types the animation name on screen, if it's loaded jump to end the script or something like that.


If you want, you can write all animation names in NOP (opcode 0900) and read it from memory if the name is not either of these, jump to end the script or want you want to do. It's more hard enough.





Also, any specific way of performing an opcode line in hexidecimal?



You mean write a opcode using hex..end struct, instead of using the actual opcode? Yes, I do, for example:


Code:

D504030200030300030400060000803F0404040005FF0005FF0005FF005100


is like writing


Code:

04D5: create_corona_at 2@ 3@ 4@ radius 1.0 type 4 flare 0 RGB 255 255 255
0051: return


And this:


Code:

05AD: &0(1@,1s) == &@Thread(0@,1s)


Is the same as:


Code:

hex
AD05          // opcode      (05AD)
0C            // data type
0000          // array name  (&0)
0100          // index name  (1@)
0102          // size&type
0C            // data type
@Thread  // array name&index name (0@)
0102          // size&type
end


Just trying to make your script more complex, so that you can confuse people who don't understand this, and also make it so the mod is less likely to get stolen by someone else, huh?


_________________
Some links for modding information:
• GTAModding Wiki
• Документация по моддингу GTA
• Sanny Builder (Русский)
• Sanny Builder Profile

View user profile http://gtamodding.com

11 Re: Hello/Guidance Request on Tue Aug 25, 2009 2:15 am

*solved*

*solved*



unsolved:

Ugh... And now this doesn't even work anymore:

Code:
{$CLEO .cs}

const
CHARS = 30@
end
CHARS = 0

0000: NOP // To prevent the jump to 0 offset bug.

:start 
while true
wait 0
    if
        0256:  player $PLAYER_CHAR defined
    then
        if
            $ONMISSION == 0
        then
            0A8D: 2@ = read_memory 0x969110 size 4 virtual_protect 0
            0A8D: 3@ = read_memory 0x969114 size 4 virtual_protect 0
            if and
                04A4:  2@ == 0x53415645 // Hex String 'SAVE'
                04A4:  3@ == 0x54595045 // Hex String 'TYPE'
            then
                break
            end
        end
    end
end
0A8C: write_memory 0x00969110 size 4 value 0 virtual_protect 0 // Clears previous keypress
0A8C: write_memory 0x00969114 size 4 value 0 virtual_protect 0 // Clears previous keypress
0A8C: write_memory 0x00969118 size 4 value 0 virtual_protect 0 // Clears previous keypress
0A8C: write_memory 0x0096911C size 4 value 0 virtual_protect 0 // Clears previous keypress
01B4: set_player $PLAYER_CHAR can_move 0
03BF: set_player $PLAYER_CHAR ignored_by_everyone 1
while 0AB0:  key_pressed 0x45 // Should = the last character of your keypress/cheat to prevent it showing in box.
wait 0
end
0A9F: 0@ = current_thread_pointer
000A: 0@ += 0x10
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
000E: 0@ -= @TEMP_MEMORY
0085: 1@ = 0@ // (int)
000A: 1@ += 31
// Take away all _'s.
for 31@ = 0@ to 1@
  0A8C: write_memory 31@ size 1 value 0x20 virtual_protect 0
end
0A9F: 0@ = current_thread_pointer
000A: 0@ += 0x10
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
000E: 0@ -= @TEMP_MEMORY
//000A: 0@ += 4

:KEYPRESS
0050: gosub @POINTER
for 2@ = 40 to 90 // A - Z
    if
        0AB0:  key_pressed 2@ // If A-Z pressed.
    then
        0085: 24@ = 2@
        if
            002B:  15 >= CHARS // 16 = character limit.
        then
            000A: 0@ += CHARS // Each character typed will skip 1 "_" so that it always types to the last one.
            0A8C: write_memory 0@ size 1 value 2@ virtual_protect 0 // Write the new letter to the memory.
            000A: CHARS += 1 // Increase the character count.
        end
    end
    if
        0AB0: key_pressed 0x8
    then
        if
            0019:  CHARS > 0
        then
            000A: CHARS += -1
            005A: 0@ += CHARS
            0A8C: write_memory 0@ size 1 value 0x20 virtual_protect 0
            while 0AB0:  key_pressed 0x8
                wait 0
            end
        end
    end
    if
        0AB0: key_pressed 0x20
    then
        if
            8039:  not CHARS == 16 // Character limit.
        then
            005A: 0@ += CHARS
            0A8C: write_memory 0@ size 1 value 0x20 virtual_protect 0
            CHARS += 1
            while 0AB0:  key_pressed 0x20
                wait 0
            end
        end
    end
end

:SHOW_TEXT
wait 0
gosub @POINTER
if
0AA9:  is_game_version_original
then
    0AA5: call 0x588BE0 num_params 4 pop 4 0 0 0 0@ 
else
    0AA5: call 0x5893B0 num_params 4 pop 4 0 0 0 0@ 
end
0A8C: write_memory 0x00969110 size 4 value 0 virtual_protect 0 // Clears previous keypress
0A8C: write_memory 0x00969114 size 4 value 0 virtual_protect 0 // Clears previous keypress
0A8C: write_memory 0x00969118 size 4 value 0 virtual_protect 0 // Clears previous keypress
0A8C: write_memory 0x0096911C size 4 value 0 virtual_protect 0 // Clears previous keypress
if
  80E1:  not player 0 pressed_key 16
jf @FINISH
0006: 3@ = 0x0
while 0039:  3@ == 0x0
wait 0
if
    00E1:  player 0 pressed_key 16
then
    jump @FINISH
end
if
    0AB0:  key_pressed 0x20
then
    break
end
if
    0AB0:  key_pressed 0x8
then
    break
end
0A8D: 3@ = read_memory 0x00969110 size 1 virtual_protect 0
end
jump @KEYPRESS

:FINISH
gosub @POINTER
0605: as $PLAYER_ACTOR perform 0@ IFP_file "PED" 4.0 loop 1 0 0 0 time -1
03BF: set_player $PLAYER_CHAR ignored_by_everyone 0
01B4: set_player $PLAYER_CHAR can_move 1
CHARS = 0 // reset character count.
jump @START

:POINTER
0A9F: 0@ = current_thread_pointer
000A: 0@ += 0x10
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
000E: 0@ -= @TEMP_MEMORY
//000A: 0@ += 4 // Removed as we are using hex now, so we don't need to skip the 4 opcode numbers.
return

:BlackBox
if
    0AA9:  is_game_version_original
then
    0AA5: call 0x58B180 num_params 4 pop 4 0 0 0 0@
else
    0AA5: call 0x5893B0 num_params 4 pop 4 0 0 0 0@
end
return

:TEMP_MEMORY
hex
"________________" 00
end

I type in "ATM" and the game crashes... Yet before, when using the same code, it didn't. Since then I changed it but I changed it back again. So I don't know what's wrong.



Last edited by Deji on Tue Aug 25, 2009 3:17 am; edited 1 time in total

View user profile http://gtag.gtagaming.com

12 Re: Hello/Guidance Request on Tue Aug 25, 2009 2:27 am



OK, I see the problem now. I did not think you meant animations from the PED file which is loaded by .exe file.



Mmmm... That's not something I can manage to translate...



It's different. That one you use is used to translate "normal" hex input, but when we write opcodes in hex..end structure it's too hard for a number translation tool to convert. All it will give you is werid signs, like if you open a ASI/DLL file with the wrong program.

http://varistor.dyndns.org/wiki/index.php?%A5%B3%A5%ED%A5%CA%B4%D8%B7%B8


_________________
Some links for modding information:
• GTAModding Wiki
• Документация по моддингу GTA
• Sanny Builder (Русский)
• Sanny Builder Profile

View user profile http://gtamodding.com

13 Re: Hello/Guidance Request on Tue Aug 25, 2009 3:00 am

Okay.. Know anything about my problem with the crash?

Maybe it just doesn't like 0@ in place of the string... If so, how would I make this work..?


Code:

gosub @POINTER
gosub @POINTER2
[...]

:POINTER
0A9F: 0@ = current_thread_pointer
000A: 0@ += 0x10
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
000E: 0@ -= @TEMP_MEMORY
return

:POINTER2
0A9F: 1@ = current_thread_pointer
000A: 1@ += 0x10
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
000E: 1@ -= @ANIM
000A: 1@ += 6
0A8C: write_memory 1@ size 16 value 0@ virtual_protect 0
return

:ANIM
0605: actor $PLAYER_ACTOR perform_animation_sequence "________________" IFP_file "PED" 4.0 loop 1 0 0 0 time -1
0000:

It's supposed to make the player perform the animation and replace "____" (etc.) with the entered text.

View user profile http://gtag.gtagaming.com

14 Re: Hello/Guidance Request on Mon Oct 12, 2009 6:45 am

^ lol Keyboard script?

It's kind of updated now but untested. :/

Code:
EDIT

Can someone verify if this works? It should be compiled as key-in.cs with "AS IS" for SB case-converting.

There's a hypothetical bug stemming from the arrow keys. I call it the "Insert Bug" because it acts like the Insert button on the keyboard (replaces the char after the cursor except this script currently has no cursor).


And sorry for the thread hijack. I just thought that since Deji was already talking about this script I should just continue with it. Rolling Eyes

EDIT - Doesn't work sorry.



Last edited by Adler on Mon Oct 19, 2009 5:08 am; edited 2 times in total (Reason for editing : Tested - Doesn't work... :()

View user profile

15 Re: Hello/Guidance Request Today at 7:56 pm

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum