CLEO Help [CLEO] Sending message to chat

CLEO related
Status
Not open for further replies.

m1zg4rd_PL

Well-known member
Joined
Jul 19, 2013
Messages
222
Reaction score
0
Why this script is sending "Script loaded :3", but don't want to load messages from .ini file?

Code:
{$VERSION 3.1.1000}
{$CLEO .cs}

//-------------MAIN---------------
thread 'SENDING' 
wait 3000 
if 
0AF7: 	get_samp_base_to 0@ 
else_jump @SENDING_32 

:SENDING_32
wait 400 
0AFA: 	is_samp_structures_available 
else_jump @SENDING_32 

:SENDING_46
wait 50 
if 
0AAB:   file_exists "CLEO\SENDING.INI" 
else_jump @SENDING_145 
wait 5 
0AF8: samp add_message_to_chat "SCRIPT LOADED :3" 16777215  
jump @SENDING_197 

:SENDING_145
wait 10 
0AF1: write_int 0 to_ini_file "CLEO\SENDING.INI" section "MAIN" key "TO_SEND" 
jump @SENDING_46 

:SENDING_197
wait 250 
06D2: 2@v = "0" // @v = string 
0AF4: 1@v = read_string_from_ini_file "CLEO\SENDING.INI" section "MAIN" key "TO_SEND" 
if 
0C14: strcmp string1 1@v string2 2@v 
else_jump @SENDING_283 
wait 750 
jump @SENDING_197 

:SENDING_283
wait 250 
0AF8: samp add_message_to_chat 1@v 16777215  
06D2: 1@v = "0" // @v = string 
0AF1: write_int 0 to_ini_file "CLEO\SENDING.INI" section "MAIN" key "TO_SEND" 
jump @SENDING_197

My SENDING.INI file:

Code:
[MAIN]
TO_SEND=TEST

0 value is to inform external program that script added message succesfully.
 

m1zg4rd_PL

Well-known member
Joined
Jul 19, 2013
Messages
222
Reaction score
0
So what is wrong in it? I try to add message from ini file (key "TOSEND" in section "MAIN") to chat, but only client-side.

EDIT: Problem solved, to insert variable string to chat:

Code:
0AA2: 0@ = load_library "SAMP.DLL" // IF and SET   //getting SAMP base without SAMPFUNCS

0085: 1@ = 0@ // (int) 
1@ += 2173548 
0A8D: 3@ = read_memory 1@ size 4 virtual_protect 1 
0085: 2@ = 0@ // (int) 
2@ += 500976 
0AA6: call_method 2@ 3@ num_params 5 pop 0 0 -1 0 30@v 8  //30@v is desired string
 
Status
Not open for further replies.
Top