CLEO Help help

CLEO related
Status
Not open for further replies.

davidel

Well-known member
Joined
Jan 17, 2020
Messages
207
Reaction score
7
Location
Germania
Code:
:blackjack
WAIT 0
SAMP.IsCommandTyped(20@)
    for 3@ = 0 to 2304
        if 0C5D: samp textdraw 3@ is_exists
        then
              alloc 2@ = 1024
              0C5A: samp textdraw 3@ get_string_to 2@
              IF 0C29: $NOT_USED = stristr string1 2@ string2 "Blackjack"
              then
              0AF1: write_int 3@ to_ini_file "cleo\blackjack.ini" section "BLACKJACK TEXTDRAWS" key "Blackjack font"
              end
              free 2@
              end
              end
              SAMP.CmdRet()

when i try to use 0C8F: samp process_chat_input "/save" in the current script the game will crash why? i cant use it while in a SAMP.ISCOMMANDTYPED or?
for example this will crash
Code:
:blackjack
WAIT 0
SAMP.IsCommandTyped(20@)
    for 3@ = 0 to 2304
        if 0C5D: samp textdraw 3@ is_exists
        then
        wait 100
        0C8F: samp process_chat_input "/save"
              alloc 2@ = 1024
              0C5A: samp textdraw 3@ get_string_to 2@
              IF 0C29: $NOT_USED = stristr string1 2@ string2 "Blackjack"
              then
              0AF1: write_int 3@ to_ini_file "cleo\blackjack.ini" section "BLACKJACK TEXTDRAWS" key "Blackjack font"
              end
              free 2@
              end
              end
              SAMP.CmdRet()
 

davidel

Well-known member
Joined
Jan 17, 2020
Messages
207
Reaction score
7
Location
Germania
works, thanks

Code:
IF 24@ == TRUE
            then
            chatmsg "24@ = true" -1
            0AF0: 3@ = get_int_from_ini_file "cleo\blackjack.ini" section "BLACKJACK TEXTDRAWS" key "PLAYER score"
            chatmsg "got player score" -1
                IF     0C5D: samp textdraw 2305 is_exists
then
chatmsg "sss" -1
end
end

it is working until line IF 0C5D: samp textdraw 2305 is_exists. Why?

//fixed, the textdraw id was not correct
 
Last edited:
Status
Not open for further replies.
Top