So, idk why but I have a weird bug, or I'm blind+dumb... My problem consist in a fucking variable which SOMEHOW re-writes it self from nothing when I'm using say keyword to execute a command. Here is a screenshot with this:
The variable 1@ contains the message from 27@ by using %n where contains the pointer to its' position within the text "offset of %n within the text + pointer to text begining = pointer to %n (the begining of 2nd parrameter" and in 0@ contains the ID.
So what is really happening is after say my 1@ is getting the last 2 digits from 0@ and formats it's self....... So I've tried every method possible (using 0ab1:; calculate manually position of the text, separate it from RPC in while loop, E.V.E.R.Y.T.H.I.N.G., using 0AD4:....)
Someone please help, I can't no more....fuck CLEO
The variable 1@ contains the message from 27@ by using %n where contains the pointer to its' position within the text "offset of %n within the text + pointer to text begining = pointer to %n (the begining of 2nd parrameter" and in 0@ contains the ID.
Java:
{$CLEO}
{$INCLUDE SF}
0000:
repeat
wait 0
until SAMP.Available()
0b34: "fmm" @reat
0BE1: raknet setup_outcoming_rpc_hook @out_phone
alloc 29@ 256
while true
wait 0
end
:reat
0A92: create_custom_thread "sms_test.cs"
0A93: end_custom_thread
SAMP.CmdRet()
:out_phone
0BE5: raknet 31@ = get_hook_param PARAM_PACKETID
if 31@ == RPC_SERVERCOMMAND
then
0C11: memset destination 29@ value 0 size 256
0BE5: raknet 31@ = get_hook_param PARAM_BITSTREAM
0BE7: raknet 30@ = bit_stream_read 31@ type BS_TYPE_INT
0BE8: raknet bit_stream 31@ read_array 29@ size 30@
0C1E: array 29@ element 30@ el_size 1 = 0
if 0C29: -1 = stristr string1 29@ string2 "/sms"
then
alloc 0@ 64
0AC7: 1@ = var 1@ offset
0AA5: call 0x8220AD num_params 4 pop 4 1@ 0@ "/sms %s %n" 29@
005a: 1@ += 29@
0C17: 2@ = strlen 1@
0C1E: array 1@ element 2@ el_size 1 = 0
chatmsg "ID: %s | Message: %s" -1 0@ 1@
say "/number %s" 0@
chatmsg "ID: %s | Message: %s" -1 0@ 1@
free 0@
0BE0: raknet hook_ret false
end
end
0BE0: raknet hook_ret true
So what is really happening is after say my 1@ is getting the last 2 digits from 0@ and formats it's self....... So I've tried every method possible (using 0ab1:; calculate manually position of the text, separate it from RPC in while loop, E.V.E.R.Y.T.H.I.N.G., using 0AD4:....)
Someone please help, I can't no more....