Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

      1. St Andrews Cathedral
    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

Sign in to follow this  
Pie015

Player.Definded

Recommended Posts

Pie015

Player.Defined doesent work, I type /savepos then /gotopos, but I added a Player.Defined check and I type /gotopos but nothing happens!???

 

 

{$VERSION 3.1.0027}{$CLEO .cs}//------------MAIN-------------0000::1wait 0if and  Player.Defined($PLAYER_CHAR)0AB0:  key_pressed 191else_jump @1:2wait 0if0AB0:  key_pressed 83else_jump @2:3wait 0if0AB0:  key_pressed 65else_jump @3:4wait 0if0AB0:  key_pressed 86else_jump @4:5wait 0if0AB0:  key_pressed 69else_jump @5:6wait 0if0AB0:  key_pressed 80else_jump @6:7wait 0if0AB0:  key_pressed 79else_jump @7:8wait 0if0AB0:  key_pressed 83else_jump @8:9Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])077E: get_active_interior_to [email protected]: show_text_styled GXT 'SAVEIT' time 3000 style 4  :10wait 0if and  Player.Defined($PLAYER_CHAR)0AB0:  key_pressed 191else_jump @10:11wait 0if0AB0:  key_pressed 71else_jump @11:12wait 0if0AB0:  key_pressed 79else_jump @12:13wait 0if0AB0:  key_pressed 84else_jump @13:14wait 0if0AB0:  key_pressed 79else_jump @14:15wait 0if0AB0:  key_pressed 80else_jump @15:16wait 0if0AB0:  key_pressed 79else_jump @16:17wait 0if0AB0:  key_pressed 83else_jump @17:18select_interior [email protected]($PLAYER_ACTOR, [email protected], [email protected], [email protected])0860: link_actor $PLAYER_ACTOR to_interior [email protected]: show_text_styled GXT 'GOTO' time 3000 style 4 jump @1

 

Edited by Pie015

Share this post


Link to post
Share on other sites
yair1221

whats all the fuss for?

just use:

0ADC: test_cheat "/savepos"

instead of all that if 0ab0:

and you dont need the player defined...its almost helpless...

Share this post


Link to post
Share on other sites
Pie015
whats all the fuss for?

just use:

0ADC: test_cheat "/savepos"

instead of all that if 0ab0:

and you dont need the player defined...its almost helpless...

Im using CLEO 3 so I have to use 0AB0 and I want player.defined because I always want to the saved pos

Share this post


Link to post
Share on other sites
yair1221

what do you mean?

a.install CLEO 4, believe me, its worth it, its WAY better than 3

b.what do you mean?

you can always save the pos...you dont need player.defined for that...

Share this post


Link to post
Share on other sites
Pie015

oops, i ment: I save my pos once then I can tele to it all the time until I type /savepos again

 

CLEO 4: Im not sure confused.gif, Most mods work on cleo 3

Share this post


Link to post
Share on other sites
TheSiggi

I prefer CLEO 3 myself and I don't see the point for 4 tounge.gif

the opcodes are nice but nothing that couldn't be done with 3 aswell

use memory for checking whether your cheat is typed

 

and simply use

 

0256: player $PLAYER_CHAR defined 

 

 

works always

(and a tip: F10 in SB Options> General > tick the books 'Write opcodes'

 

better choice imo

 

cheers

 

I like your progress tounge.gif

Share this post


Link to post
Share on other sites
yair1221

over 90% of the CLEO 3 mods work on CLEO 4

not including royouske's or whatever his name is

i swear, i never got it...i write it wrong every time...

Share this post


Link to post
Share on other sites
Pie015

Didnt work! sad.gif

 

 

{$VERSION 3.1.0027}{$CLEO .cs}//------------MAIN-------------0000::1wait 0if and0256: player $PLAYER_CHAR defined 0AB0:  key_pressed 191else_jump @1:2wait 0if0AB0:  key_pressed 83else_jump @2:3wait 0if0AB0:  key_pressed 65else_jump @3:4wait 0if0AB0:  key_pressed 86else_jump @4:5wait 0if0AB0:  key_pressed 69else_jump @5:6wait 0if0AB0:  key_pressed 80else_jump @6:7wait 0if0AB0:  key_pressed 79else_jump @7:8wait 0if0AB0:  key_pressed 83else_jump @8:9Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])077E: get_active_interior_to [email protected]: show_text_styled GXT 'SAVEIT' time 3000 style 4  :10wait 0if and0256: player $PLAYER_CHAR defined 0AB0:  key_pressed 191else_jump @10:11wait 0if0AB0:  key_pressed 71else_jump @11:12wait 0if0AB0:  key_pressed 79else_jump @12:13wait 0if0AB0:  key_pressed 84else_jump @13:14wait 0if0AB0:  key_pressed 79else_jump @14:15wait 0if0AB0:  key_pressed 80else_jump @15:16wait 0if0AB0:  key_pressed 79else_jump @16:17wait 0if0AB0:  key_pressed 83else_jump @17:18select_interior [email protected]($PLAYER_ACTOR, [email protected], [email protected], [email protected])0860: link_actor $PLAYER_ACTOR to_interior [email protected]: show_text_styled GXT 'GOTO' time 3000 style 4 jump @1

 

Edited by Pie015

Share this post


Link to post
Share on other sites
Pie015

Please help, I really want to complete this mod sad.gif

Share this post


Link to post
Share on other sites
TheSiggi

your keypress is messed up! You can't type as fast as the processor declares your conditions as wrong tounge.gif

 

use memory!

 

:MEMORY_READwait 00A8D:  [email protected]= read_memory  9867536 size 4 virtual_protect 0if04A4:  [email protected] == 0x53415645 //  4 byte hex-string - SAVEjf @MEMORY_READ

 

 

Share this post


Link to post
Share on other sites
Pie015

Yeah, but I dont know how to use memory at all!

Share this post


Link to post
Share on other sites
Nahiyan

First, you have to read the address and store it to a variable. (read with 0A8D)

Then, you have check what it is and if it is the text you want the player to type to activate the mod.

Last, you have to clear the address. (0A8C)

 

Remember, you can only read certain numbers of letters. (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, etc.)

And when you clear, clear with value 0.

 

You have to use ASCII Character Key Codes to check what [email protected] is. You can't just put in in SAVE. But you have to put it's ASCII Character Key Code(s).

 

For more information and/or list of ASCII Character Key Codes then go to http://www.gtaforums.com/index.php?showtop...st&p=1059267611

Share this post


Link to post
Share on other sites
TheSiggi

I gave you an example above:

 

just change the 04a4: hex-string to whatever you want (only 4 chars) so google for list of virtual key codes and select the letter you want and copy its hex (0xAB)value and add it to the 0x.... row in the line of 04a4:

 

s = 0x53 => 0x53

a = 41 => 0x5341

and so on

but keep in kind: you can only read out 4, 2 or one char from the buffer!

so the parameter 'size' defines the size of the part which should be read from the buffer: 4 = chars (letters), 2 = 2 letters and 1 = what else? 1!

 

if the condition is true it means you typed in SAVE

SSAVE would also work tounge.gif

but SAAVE wouldn't!

thats how the cheats work!

 

So if you typed SAVE in this case, you can now trigger your script!

 

{$CLEO}0000:while true   wait 20   if   0256:   player $PLAYER_CHAR defined   then       0A8D:  [email protected]= read_memory  9867536 size 4 virtual_protect 0       if       04A4:  [email protected] == 0x53415645 //  4 byte hex-string - SAVE       then           show_text_box 'CHEAT1'  (keyword 03e5)           Model.Load(#INFERNUS)           038B: load_requested_models   // just for the records           while not Model.Available(#INFERNUS)               wait 0           end           04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 3.0 0.0           02CE: [email protected] = ground_z_at [email protected] [email protected] [email protected]           0172: [email protected] = actor $PLAYER_ACTOR Z_angle           Inc([email protected], 90.0)           Inc([email protected], 0.01)           [email protected] = Car.Create(#INFERNUS, [email protected], [email protected], [email protected])           0175: set_car [email protected] Z_angle_to [email protected]           0224: set_car [email protected] health_to 5000           Model.Destroy(#INFERNUS)           Car.RemoveReferences([email protected])           0A8C: write_memory [email protected] size 4 value 0 virtual_protect 0  // you have to NOP the buffer, so you can read out cheats again           wait 2000       end   endend0000:0000:end_custom_thread (keyword 0A93)

 

 

 

Remember, you can only read certain numbers of letters. (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, etc.)

And when you clear, clear with value 0.

 

What the ...? mercie_blink.gif those are the bytes sizes of different bytes structures... byte, char ....

GTAs cheat pool only contains the last 30 chars input by the keyboard (not containing movement: wwwwwwwwwww for walking tounge.gif)

Edited by The_Siggi

Share this post


Link to post
Share on other sites
Pie015

Thanks siggi!

 

Last question, Can you put any numbers in

0A8D:  [email protected]= read_memory  9867536 size 4 virtual_protect 0

?

 

And How do I know the size? and How do I know the virtual_protect?

Share this post


Link to post
Share on other sites
TheSiggi

don't care about the VP, its only for conflicts between overwriting/reading different addresses

the size is easy: SAVE = 4 letters = 4 chars = 4 bytes = size

reading out 6 chars would require splitting the cheat into differnt parts eg. SAVEME = SAVE + ME, SA + VE + ME or SAVE + M + E

 

Press f12 in Sannybuilder to open the help, select the last elemt in the list and then select the top 'Virtual key codes' and a table should pop up

 

cheers!

 

EDIT:

 

the number behind read-memory is the address to which you want to read from the memory. Normaly they're written in hex but this is just the int value. In this case, you want to read from the cheat 'pool' or 'buffer'

 

And its Ryosuke confused.gif

Edited by The_Siggi

Share this post


Link to post
Share on other sites
Pie015

It doesent work this time! Can you help?

 

 

{$VERSION 3.1.0027}{$CLEO .cs}//---------MAIN-----------0000::1wait 0 if  Player.Defined($PLAYER_CHAR)jf @2    0A8D: [email protected] = read_memory 9867536 size 4 virtual_protect 0if04A4:  [email protected] == 0xBF53415645504F53 //  4 byte hex-string - SAVEjf @1:2Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])077E: get_active_interior_to [email protected]: show_text_styled GXT 'SAVEIT' time 3000 style 40A8C: write_memory 0xBF53415645504F53 size 8 value 0 virtual_protect 0:3wait 0if  Player.Defined($PLAYER_CHAR)jf @40A8D: [email protected] = read_memory 9065456 size 4 virtual_protect 0if04A4:  [email protected] == 0xBF474F544F504F53 //  @ ===== Anyjf @3:4select_interior [email protected]($PLAYER_ACTOR, [email protected], [email protected], [email protected])0860: link_actor $PLAYER_ACTOR to_interior [email protected]: show_text_styled GXT 'GOTO' time 3000 style 40A8C: write_memory 0xBF474F544F504F53 size 8 value 0 virtual_protect 0jump @1                                                                                                      

 

Share this post


Link to post
Share on other sites
yair1221

0xBF53415645504F53

 

i dont think you need the 0x

but im not sure, try without it

Share this post


Link to post
Share on other sites
TheSiggi

overflow! overflow! lol

 

 

04A4:  [email protected] == 0xBF53415645504F53 //  4 byte hex-string - SAVE

 

 

the string you try to read out is to long, those are definately more than 4 chars tounge.gif

reading out longer terms requieres a special procedure:

 

I want to read out 'DAMNCOP' = 7 chars I'll split it into 4 + 2 +1 bits:

 

DAMN + CO + P = 7 chars

 

so now I'll read out the memory:

 

 

0x44414D4E = DAMN

 

0x434F = CO

 

0x50 = P

 

 

0A8D: [email protected] = read_memory 9867536 size 4 virtual_protect 00A8D: [email protected] = read_memory 9867536 size 2 virtual_protect 00A8D: [email protected] = read_memory 9867536 size 1 virtual_protect 0if [email protected] = [email protected] = [email protected] = 0x50

 

 

In theory at least :S never did it actually tounge.gif

 

try yourself, it help you to understand it

 

EDIT:

 

bullsh*t!

sure he needs the '0x'! its the handle for hex code confused.gif

 

the compiler will change it to an int

Share this post


Link to post
Share on other sites
Pie015

Nope sad.gif Didnt work

 

 

:1wait 0 if  Player.Defined($PLAYER_CHAR)jf @2    0A8D: [email protected] = read_memory 9867536 size 4 virtual_protect 0                     0A8D: [email protected] = read_memory 9867536 size 3 virtual_protect 00A8D: [email protected] = read_memory 9867536 size 1 virtual_protect 0if and04A4:  [email protected] == 0xBF534156  04A4:  [email protected] == 0x45504F 04A4:  [email protected] == 0x53 jf @1:2Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])077E: get_active_interior_to [email protected]: show_text_styled GXT 'SAVEIT' time 3000 style 40A8C: write_memory 0xBF534156 size 4 value 0 virtual_protect 00A8C: write_memory 0x45504F size 3 value 0 virtual_protect 00A8C: write_memory 0x53 size 1 value 0 virtual_protect 0:3wait 0if  Player.Defined($PLAYER_CHAR)jf @40A8D: [email protected] = read_memory 9065456 size 4 virtual_protect 00A8D: [email protected] = read_memory 9065456 size 3 virtual_protect 00A8D: [email protected] = read_memory 9065456 size 1 virtual_protect 0if and04A4:  [email protected] == 0xBF474F54 //  @ ===== Any04A4:  [email protected] == 0x4F504F //  @ ===== Any04A4:  [email protected] == 0x53 //  @ ===== Anyjf @3:4select_interior [email protected]($PLAYER_ACTOR, [email protected], [email protected], [email protected])0860: link_actor $PLAYER_ACTOR to_interior [email protected]: show_text_styled GXT 'GOTO' time 3000 style 40A8C: write_memory 0xBF474F54 size 4 value 0 virtual_protect 00A8C: write_memory 0x4F504F size 3 value 0 virtual_protect 00A8C: write_memory 0x53 size 1 value 0 virtual_protect 0jump @1

 

Share this post


Link to post
Share on other sites
TheSiggi

 

0A8D: [email protected] = read_memory 9867536 size 3 virtual_protect 0

 

should be size 2 and I talked bullsh*t :S

 

I forgot the cheat pool is a stack :S

 

you have to read out the last letter first!

 

read out P, then Co, and then damn

and also the memory addresses have to be fixxed:

 

the last letter of your string is the last element of the pool, so it has to be a '0' instead of the '6' for reading out P

and the '6' in the line for the next to chars should be 2

 

think of it like this: you read out the pool from its end, to its start

Edited by The_Siggi

Share this post


Link to post
Share on other sites
Pie015

Why do it has to be size 2 and

04A4:  [email protected] == 0x53415645 //  SAVE

isnt backwards

Share this post


Link to post
Share on other sites
Silent

All that cheats mess started to confuse me, so I've started to test it with longstring checking. I'll post that soon smile.gif

Share this post


Link to post
Share on other sites
TheSiggi

the string itself won't be read out backwards, only the bits you want to read out. SAVE has 4 chars and fits into the structure; DAMNCOPS will be read like this:

 

P is the last letter passed to the cheat pool, so you have to read it out first!

CO is passed as a bit you want to read, and 2 chars also fit the structure, so you read it out like normal 8 think of it as the function reads out from right to left and as further it goes left the index will increase (thats related to the language GTAs engine is written in: C++)

DAMN = N is the first letter of that 'bit' and D the last, so its the first letter of your cheat

Share this post


Link to post
Share on other sites
Pie015

Sorry for the LONG reply but I got bored

 

But now Im trying to finish this user posted image

 

 

{$VERSION 3.1.0027}{$CLEO .cs}//-----------MAIN----------0000::MINUS1wait 00AA9:    is_game_version_originaljf @MINUS1:1wait 0if0256:   player $PLAYER_CHAR defined else_jump @20A8D: [email protected] = read_memory 0x969753 size 4 virtual_protect 0                    0A8D: [email protected] = read_memory 0x969745 size 4 virtual_protect 0if and05AE:   [email protected] == "VAS/" // @s == 'short'                                                        05AE:   [email protected] == "SOPE" // @s == 'short'  jf @1Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])077E: get_active_interior_to [email protected]: show_text_styled GXT 'SAVEIT' time 3000 style 40A8C: write_memory 0x969753 size 4 value 0x0 virtual_protect 0  :2wait 0if0256:   player $PLAYER_CHAR definedelse_jump @10A8D: [email protected] = read_memory 0x969110 size 4 virtual_protect 0                    0A8D: [email protected] = read_memory 0x969120 size 4 virtual_protect 0if and05AE:   [email protected] == "TOG/" // @s == 'short'                        05AE:   [email protected] == "SOPO" // @s == 'short' jf @2select_interior [email protected]($PLAYER_ACTOR, [email protected], [email protected], [email protected])0860: link_actor $PLAYER_ACTOR to_interior [email protected]: show_text_styled GXT 'GOTO' time 3000 style 40A8C: write_memory 0x969110 size 4 value 0x0 virtual_protect 0 jump @1  

 

 

I tried the backwards thing but it doesent work! Or atleast I'm not doing it properly

Edited by Pie015

Share this post


Link to post
Share on other sites
Silent

I'm afraid that / isn't supported in cheat pool.

 

I've documented pointer to chat in SA-MP 0.3a, and near that pool there was a typed commands log. Maybe it would be possible to read from it.

 

Also why are you reading

 

 

0A8D: [email protected] = read_memory 0x969753 size 4 virtual_protect 0                    0A8D: [email protected] = read_memory 0x969745 size 4 virtual_protect 0

 

 

You should read last 8 chars from the beginning of cheat pool, and that should be checked in one conditional.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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