Help Samp Memory Help

Olcay

Active Member
Joined
Dec 1, 2014
Messages
31
Likes
0
Points
6
5
#1
Hey There!

I need help about cleo scripting offset or memory (whatever i don't know those). What are the meaning of these. I see these functions in every cleo script(e.g: alloc_memory and offset). 

Code:
[email protected] = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR) 
[email protected] = SAMP.GetPlayerStruct([email protected]) 
[email protected] += 170
0AC8: [email protected] = allocate_memory_size 63 
0C10: memcpy destination [email protected] source [email protected] size 63 
0C0D: struct [email protected] offset 24 size 4 = [email protected] 
0C0D: struct [email protected] offset 28 size 4 = [email protected] 
0C0D: struct [email protected] offset 32 size 4 = [email protected] 
0B3D: raknet [email protected] = new_bit_stream 
RakNet.Write([email protected], 200, BS_TYPE_BYTE, 1) 
RakNet.Write([email protected], [email protected], BS_TYPE_ARRAY, 63) 
0B8B: raknet send bit_stream [email protected]                 
0B3E: raknet delete_bit_stream [email protected] 
0AC9: [email protected] 
0AB2: ret 0
Code:
SAMP.SetGameKeyState(17, 255)
Actor.StorePos([email protected], [email protected], [email protected], [email protected])
0470: [email protected] = actor $PLAYER_ACTOR current_weapon 
0087: [email protected] = [email protected] // (float) 
[email protected] += 0.5 
[email protected] = SAMP.GetSAMPPlayerIDByActorHandle([email protected])
alloc [email protected] 40 
0C0D: struct [email protected] offset 0 size 1 = 1 
0C0D: struct [email protected] offset 1 size 2 = [email protected] 
0C0D: struct [email protected] offset 3 size 4 = [email protected] 
0C0D: struct [email protected] offset 7 size 4 = [email protected] 
0C0D: struct [email protected] offset 11 size 4 = [email protected] 
0C0D: struct [email protected] offset 15 size 4 = [email protected] 
0C0D: struct [email protected] offset 19 size 4 = [email protected] 
0C0D: struct [email protected] offset 23 size 4 = [email protected] 
0C0D: struct [email protected] offset 39 size 1 = [email protected] 
0C0D: struct [email protected] offset 27 size 4 = 0.0 
0C0D: struct [email protected] offset 31 size 4 = 0.0 
0C0D: struct [email protected] offset 35 size 4 = 0.5 
[email protected] = RakNet.NewBitStream()
BitStream.Write([email protected], 206, BS_TYPE_BYTE, 1)
BitStream.Write([email protected], [email protected], BS_TYPE_ARRAY, 40)
RakNet.LiteSend([email protected])
RakNet.DeleteBitStream([email protected])
free [email protected] 
SAMP.SetGameKeyState(17, 0)
So, please can someone explain detailed these to me, or is there any tutorial about that? I wonder how can i use alloc memory, struct and offset like above samples? Thank You!
 
Top