#1 25-02-2015 12:39

viv
Registered: 25-02-2015
Posts: 2

Simple text box cleo gta sa

Hello,I just want to make a simple text box which will always be shown in game .

I want to type something in that text box. Like a message " hello " and when I enter in game i just wanna se the text box on the bottom of the page.

How can I do that? Could I get some help from here?

Offline

#2 26-02-2015 00:03

Seemann
Registered: 07-08-2006
Posts: 2,050

Re: Simple text box cleo gta sa

The  CLEO 3 archive contains the text_example.cs script which uses a text_box to display a custom text. Download and learn how it works. It will be a good place to start.
http://cleo.li/download.html

Offline

#3 27-02-2015 09:10

viv
Registered: 25-02-2015
Posts: 2

Re: Simple text box cleo gta sa

Thank you. I will do it

Well I am having a problem

{$CLEO}

// this opcodes is used to make this thread to be executed once
0A95: enable_thread_saving

// calculates absolute address of the text (opcode 0900) in game memory
0A9F: 0@ = current_thread_pointer
0@ += 0x10
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
0@ -= @TEXT_PTR  // as all offsets are local (with negative values)

// skips 0900 and datatype bytes, 0@ points directly to the text
0@ += 4

// call ShowTextBox script
0A92: "ShowTextBox.s" 0@
0A93: end_custom_thread     

// custom text
:TEXT_PTR
0900: "if you see this message, CLEO 3 works normally!"

// just a null-terminator
0000: NOP




I cant see this message anywhere in game

Last edited by viv (27-02-2015 09:29)

Offline

Board footer

Powered by FluxBB