CLEO INCLUDE SF 0000 thread boxpars repeat wait until Samp Available c

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{$CLEO}
{$INCLUDE SF}
0000:
thread "boxpars"
repeat
wait 0
until Samp.Available()
const
SCRCREATEOBJECT = 44
end
0BE3: raknet setup_incoming_rpc_hook @incomingRPC
while true
wait 0
end
:incomingRPC
0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
0BE5: raknet 2@ = get_hook_param PARAM_PACKETID
0BEF: raknet 6@ = bit_stream 0@ get_number_of_bytes_used
if
2@ == SCRCREATEOBJECT
then
0BE7: raknet 10@ = bit_stream_read 1@ type BS_TYPE_SHORT // ID
0BE7: raknet 11@ = bit_stream_read 1@ type BS_TYPE_INT // model
0BE7: raknet 12@ = bit_stream_read 1@ type BS_TYPE_FLOAT // X
0BE7: raknet 13@ = bit_stream_read 1@ type BS_TYPE_FLOAT // Y
0BE7: raknet 14@ = bit_stream_read 1@ type BS_TYPE_FLOAT // Z */
if or
11@ == 19054
11@ == 19055
11@ == 19056
11@ == 19057
11@ == 19058
then
msg "{FF0000}Подарок найден! {FFFFFF}ID: %d | X: %.2f | Y: %.2f | Z: %.2f" -1 10@ 12@ 13@ 14@
end
//msg "ID: %d | MODEL: %d | X: %.2f | Y: %.2f | Z: %.2f" -1 10@ 11@ 12@ 13@ 14@
end
0BE0: raknet hook_ret true
{
bsData.Read(shortObjectID);
bsData.Read(iModel);
bsData.Read(vecPos.X);
bsData.Read(vecPos.Y);
bsData.Read(vecPos.Z);
short, int, float, float, float
}