HowEnCokkien
Well-known member
- Joined
- Jul 9, 2017
- Messages
- 307
- Reaction score
- 9
so how can i detect current pos?
Ninja FTW said:You can get Player position from:
00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@ // X position will be store in 1@, Y position will be in 2@, and Z in 3@
:Power
wait 0
if
Player.Defined($PLAYER_CHAR)
jf @Power
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
0AF3: write_float 1@ to_ini_file "cleo\config.ini" section "POS" key "X"
0AF3: write_float 2@ to_ini_file "cleo\config.ini" section "POS" key "Y"
0AF3: write_float 3@ to_ini_file "cleo\config.ini" section "POS" key "Z"
Ninja FTW said:Try this!PHP::Power wait 0 if Player.Defined($PLAYER_CHAR) jf @Power Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
Offtopic: If you're working on advance or like you want to read their coords in a file which often comes in coders brain. If this happens then:
PHP:Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@) 0AF3: write_float 1@ to_ini_file "cleo\config.ini" section "POS" key "X" 0AF3: write_float 2@ to_ini_file "cleo\config.ini" section "POS" key "Y" 0AF3: write_float 3@ to_ini_file "cleo\config.ini" section "POS" key "Z"
0@ = 0xB6F5F0 // Read Player Pointer
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
0A96: 0@ = actor $PLAYER_ACTOR struct // Player means actor so, we are doing process about actors
0@ += 0x14 // find and catach x,y,z position stuff
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0 // read pointer's memory of CPed XYZ position structure
0@ += 0x30
0A8D: 1@ = read_memory 0@ size 4 virtual_protect 0 // 1@ = x pos
0@ += 0x4
0A8D: 2@ = read_memory 0@ size 4 virtual_protect 0 // 2@ = y pos
0@ += 0x4
0A8D: 3@ = read_memory 0@ size 4 virtual_protect 0 // 3@ = z pos
Ninja FTW said:I don't know what exactly is your meaning by entering in building and other stuff.. but one thing i understand is that you do not need opcode.
Here:
PHP:0@ = 0xB6F5F0 // Read Player Pointer 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0 0A96: 0@ = actor $PLAYER_ACTOR struct // Player means actor so, we are doing process about actors 0@ += 0x14 // find and catach x,y,z position stuff 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0 // read pointer's memory of CPed XYZ position structure 0@ += 0x30 0A8D: 1@ = read_memory 0@ size 4 virtual_protect 0 // 1@ = x pos 0@ += 0x4 0A8D: 2@ = read_memory 0@ size 4 virtual_protect 0 // 2@ = y pos 0@ += 0x4 0A8D: 3@ = read_memory 0@ size 4 virtual_protect 0 // 3@ = z pos
ramez said:you can get playerpos if player in other world?by this way or by other way?
ramez said:HowEnCokkien said:ramez said:you can get playerpos if player in other world?by this way or by other way?
ofc you can get.
HowEnCokkien said:oh, sorry you cant find their pos if they're in another virtual world. theres nothing i can do since its a serverside thing :/