CLEO Help SAMPFuncs OPCode 'Add_message_to_chat'

CLEO related
Status
Not open for further replies.

Protential

Active member
Joined
Jun 8, 2013
Messages
61
Reaction score
0
Hello, I've been attempting to use an opcode from sampfuncs to render text in the samp chat-box and I've crashed every time I tried to use it.
The opcode I've tried to use is this one.
Code:
//0AF8: samp add_message_to_chat "hello." color 0xFF61B 0@
Here's the quick script I made to test it.
Code:
{$CLEO .cs}
//{$include includesRakNetDefines.txt}
THREAD "TextTest"
:KeyTest
wait 0
if
0AB0: key_pressed 88//x
jf @KeyTest
//0AF9: samp say_msg "hi guys7"
0AF8: samp add_message_to_chat "hello." color 0xFF61B 0@
jump @KeyTest
Every time I attempt to press the toggle key which is x, I crash.
 

David_Holan

Active member
Joined
Apr 28, 2013
Messages
145
Reaction score
0
Code:
{$CLEO .cs}
THREAD "TextTest"
:KeyTest
wait 0
if
0AB0: key_pressed 88
jf @KeyTest
0AF9: samp say_msg "Sup' everyone~"
0AF8: samp add_message_to_chat "Hello." 16740096 
jump @KeyTest
Try this
 

Protential

Active member
Joined
Jun 8, 2013
Messages
61
Reaction score
0
Are you sure your sampfunc is 2.4?
Definitely, I've tried using someone else's script that they can confirm working and I guess it's something to do with my sampfuncs/cleo.
I'll look into it later and probably reinstall it all, but thanks anyway :).
 

Z0DY

Well-known member
Joined
Feb 20, 2013
Messages
225
Reaction score
0
Try this only put into your cleo folder but delete your own .cs from the addmessagetochat test
 

Attachments

  • pepe.rar
    158 bytes · Views: 69

Protential

Active member
Joined
Jun 8, 2013
Messages
61
Reaction score
0
Got the crashing issue fixed thanks to Anilture.
For this OPCode
Code:
0AF8: samp add_message_to_chat "Hello." 16740096
How do you form the 16740096?
 

Z0DY

Well-known member
Joined
Feb 20, 2013
Messages
225
Reaction score
0
Got the crashing issue fixed thanks to Anilture.
For this OPCode
Code:
0AF8: samp add_message_to_chat "Hello." 16740096
How do you form the 16740096?
This is just the non hex code from 0xFF6F00 :) :):)
 

Protential

Active member
Joined
Jun 8, 2013
Messages
61
Reaction score
0
[quote author="Protential"]Got the crashing issue fixed thanks to Anilture.
For this OPCode
Code:
0AF8: samp add_message_to_chat "Hello." 16740096
How do you form the 16740096?
This is just the non hex code from 0xFF6F00 :) :):) [/quote]
Oh cool, thanks!
Any idea how to make the lower case characters? or also using multiple colors in one line?
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,488
Reaction score
231
Location
( ͡° ͜ʖ ͡°)
Hi also load up sampfuncs like i did ^^


{$CLEO .cs}
THREAD "TextTest"

if
8AF7: get_samp_base_to 29@
then
0A93: end_custom_thread
end
repeat
wait 400
until 0AFA: is_samp_structures_available

:KeyTest
wait 0
if
0AB0: key_pressed 88//x
jf @KeyTest
//0AF9: samp say_msg "hi guys7"
0AF8: samp add_message_to_chat "hello." color 0xFF61B 0@
jump @KeyTest
 

Protential

Active member
Joined
Jun 8, 2013
Messages
61
Reaction score
0
Hi also load up sampfuncs like i did ^^


{$CLEO .cs}
THREAD "TextTest"

if
8AF7: get_samp_base_to 29@
then
0A93: end_custom_thread
end
repeat
wait 400
until 0AFA: is_samp_structures_available

:KeyTest
wait 0
if
0AB0: key_pressed 88//x
jf @KeyTest
//0AF9: samp say_msg "hi guys7"
0AF8: samp add_message_to_chat "hello." color 0xFF61B 0@
jump @KeyTest
Wouldn't this give the same result?
Code:
:sampCheck
wait 0
if
SAMP.Available(1)
jf @sampCheck
 
Status
Not open for further replies.
Top