CLEO Help Raknet Info [Springfield]

CLEO related
Status
Not open for further replies.

Grubitsh

Active member
Joined
Jul 28, 2014
Messages
104
Reaction score
0
Hi there.

I would like to know if their is any documentation about the Raknet motion.

I mean, for example, Springfield built this code about the Onplayertakedamage

Code:
3@ = BitStream.Read(0@, 1)   //0 = give, 1 = take
    4@ = BitStream.Read(0@, 2)   //playerid
    5@ = BitStream.Read(0@, 4)   //ammount

Here we can see that we check parameters 1 2 and 4.

How did you know that 1 was give/take, 2 was playerid and 4 was ammount ? What other parameters are for ? Is their a list ?

Does it work similar to the GTA address ? http://www.gtamodding.com/?title=Memory_Addresses_%28SA%29

Where can I get initiate to Raknet ?
 

0x_

Wtf I'm not new....
Administrator
Joined
Feb 18, 2013
Messages
1,118
Reaction score
166
well, you can't theres no simple documentation it's reverse work / trying / analysing the incoming data.
probably theres some site but meh.
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
1, 2 and 4 aren't parameters, that's the data type. Bitstream is what it sound, a stream of bits. Look in the SF file that came with SAMPFUNCS.

Code:
BS_TYPE_BYTE = 0
BS_TYPE_BOOL = 1
BS_TYPE_SHORT = 2
BS_TYPE_INT = 3
BS_TYPE_FLOAT = 4
BS_TYPE_ARRAY = 5
BS_TYPE_BITSTREAM = 6

Afaik, there's not list for RPCs, for packets structure you can look in s0beit source.
 

Grubitsh

Active member
Joined
Jul 28, 2014
Messages
104
Reaction score
0
Ok. I think I understood a little how to READ this, but not really how to WRITE a bitstream, so.

for example, in the SF file their is

Code:
RPC_SCRSETPLAYERHEALTH = 14

How do I manage to heal me 100HP with that information ? (could you give a sample of code with that ?) So that I could understand a little bit of the mecanics.
 

0x_

Wtf I'm not new....
Administrator
Joined
Feb 18, 2013
Messages
1,118
Reaction score
166
The Server sends (you) that RPC to set (your) health, you can send that rpc to your self but that's pointless as you can set your health by yourself.

anyway, that rpc would require a BS_TYPE_FLOAT with the health, you see just guess work most times.
 

Grubitsh

Active member
Joined
Jul 28, 2014
Messages
104
Reaction score
0
Ok...

I would like some help also to the give damage to player (sending fake packet with damage)

I founded this: http://ugbase.eu/request-archive/%28how-to-use%29-cleo-damage-giver-729%28yep-i-found-one%29/5/?PHPSESSID=m5gbu2sj24jrmqou4glqek0rr7;wap2

I change the code a little to make it work.

But their is a important point to understand:

Code:
:givedamag 
0B3D: 4@ = RakNet new_bit_stream 
0B40: RakNet bit_stream 4@ 0 type 1 size 1   // 0=give damage // 1 = take damage
0B40: raknet bit_stream 4@ 0@ type 3 size 4   // player id
0B40: raknet bit_stream 4@  1@ type 4 size 4   // ammount of damage
0B40: raknet bit_stream 4@  2@ type 3 size 4   // weapon id
0B40: raknet bit_stream 4@  3@ type 3 size 4   // body part
0B8A: raknet send_rpc 115 bit_stream 4@ 
0B3E: RakNet delete_bit_stream 4@ 
ret 0

I am a bit fuck with the logic. You can understand it in 2 way:
1) I force me to send damage
2) I force the target to take damage

1 info: 0 or 1 (depends on the logic you want it to work) ?
2 info: 0@ is the target player_id ? Actor handle ? Actor Struct ?
3 info: 1@ is 50 (int), that I converted into a float
4 info: 2@ = My Current weapon
5 info: 3@ = 3 (body part)


Any solution to make it work ?
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
You can't force damage on others with this unless the server uses some sort of server sided hp and only checks onPlayerGiveDamage callback.
The rest is pretty straight forward;

1 info: 0 or 1 //0 = you give damage, 1 = you take damage
2 info: 0@ //player id from tab or your id
3 info: 1@ //ammount in float, ex; 23.4123131
4 info: 2@ //weapon id (your own if 0, other player gun if 1)
5 info: 3@ //body part 3-9
 
Status
Not open for further replies.
Top