CLEO Help Question...

CLEO related
Status
Not open for further replies.

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
i have this

0AF0: 2@ = get_int_from_ini_file "cleo\adasdasda.ini" section "sasa" key "say"

and i want to say here what i have in the .inim in section sasa, key say

0AF9: samp say_msg "2@"

But in game say 2@, not what i have in .ini

Maybe hard to explain... :(
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
springfield link said:
Use 0AF4 with long variables.
Springfield you can tell how to do this, i don't understand this...

0AF4: 0@v = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "stringKey"
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
What don't you understand exactly?

0AF4: 2@v = get_string_from_ini_file "cleo\adasdasda.ini" section "sasa" key "TEXT"
0AF9: samp_say "%s" 2@v
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
springfield link said:
What don't you understand exactly?

0AF4: 2@v = get_string_from_ini_file "cleo\adasdasda.ini" section "sasa" key "TEXT"
0AF9: samp_say "%s" 2@v

Ok, now i get random letters, and if i move change that letters to other random...
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Code:
{$CLEO .cs}
 
//-------------MAIN---------------
0000: NOP
 
:Noname_2
wait 400
   SAMP.Available
else_jump @Noname_2
0000: NOP
 
:Noname_18
0AF0: 0@ = get_int_from_ini_file "cleo\cleo.ini" section "Activation" key "KEY"
0AF0: 1@ = get_int_from_ini_file "cleo\cleo.ini" section "Activation" key "KEY2"
0AF4: 10@v = get_string_from_ini_file "cleo\cleo.ini" section "Activation" key "SAY"
wait 0
if and
key_down 0@
key_down 1@
else_jump @Noname_221
gosub @Noname_228
0ADE: 15@v = text_by_GXT_entry s$93
0ADE: 20@v = text_by_GXT_entry s$95
0AF9: samp say_msg "%s %s, %s!" 10@v 15@v 20@v
wait 200
jump @Noname_221
 
:Noname_221
jump @Noname_18
 
:Noname_228
wait 0
gosub @Noname_354
gosub @Noname_384
if or
05AD:   s$93 == 'la' // s$ == short
05AD:   s$93 == 'sf' // s$ == short
05AD:   s$93 == 've' // s$ == short
else_jump @Noname_313
05A9: s$93 = 'ct' // s$
 
:Noname_313
if
05AD:   s$93 == 'san_and' // s$ == short
else_jump @Noname_352
05A9: s$93 = 'cn' // s$
 
:Noname_352
return
 
:Noname_354
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
0843: get_zone_at 1@ 2@ 3@ nameA_to s$93 // 8-byte string
return
 
:Noname_384
gosub @Noname_677
if
  7@ == 0
else_jump @Noname_423
05A9: s$95 = 'cs' // s$
 
:Noname_423
if
  7@ == 1
else_jump @Noname_455
05A9: s$95 = 'la' // s$
 
:Noname_455
if
  7@ == 2
else_jump @Noname_487
05A9: s$95 = 'sf' // s$
 
:Noname_487
if
  7@ == 3
else_jump @Noname_519
05A9: s$95 = 've' // s$
 
:Noname_519
if
05AD:   s$93 == 'san_and' // s$ == short
else_jump @Noname_558
05A9: s$95 = 'san_and' // s$
 
:Noname_558
if
05AD:   s$93 == 'la' // s$ == short
else_jump @Noname_597
05A9: s$95 = 'la' // s$
 
:Noname_597
if
05AD:   s$93 == 'sf' // s$ == short
else_jump @Noname_636
05A9: s$95 = 'sf' // s$
 
:Noname_636
if
05AD:   s$93 == 've' // s$ == short
else_jump @Noname_675
05A9: s$95 = 've' // s$
 
:Noname_675
return
 
:Noname_677
0842: 7@ = player $PLAYER_CHAR town_number
return

.ini file should look like this

Code:
[Activation]
KEY=18 //alt
KEY2=49 //1
SAY=i need a blowjob
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
Thanks now works, but i have a little question, this is normal? There's a max letters to put or idk

INI:
e084a7636236ae688e35972994114dda.png

GAME:
dd58fd5b360e4a10f4db5d249d282801.png


Look the b doesn't show in game, and same with all other words
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
@v = 4x@ = 4bytes x 4 = 16 bytes. 1 letter = 1byte, so maxim 16 letter(space = 1letter)

If you want bigger use 0AC8: 10@ = 128
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
springfield link said:
@v = 4x@ = 4bytes x 4 = 16 bytes. 1 letter = 1byte, so maxim 16 letter(space = 1letter)

If you want bigger use 0AC8: 10@ = 128
Springfield, one question, you can do this for me please? seriously, i don't know where to start to put this :(
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Code:
{$CLEO .cs}
 
//-------------MAIN---------------
0000: NOP
 
:Noname_2
wait 400
   SAMP.Available
else_jump @Noname_2
0000: NOP
 
:Noname_18
0AF0: 0@ = get_int_from_ini_file "cleo\cleo.ini" section "Activation" key "KEY"
0AF0: 1@ = get_int_from_ini_file "cleo\cleo.ini" section "Activation" key "KEY2"
0AC8: 10@ = 260
0AF4: 10@ = get_string_from_ini_file "cleo\cleo.ini" section "Activation" key "SAY"
wait 0
if and
key_down 0@
key_down 1@
else_jump @Noname_221
gosub @Noname_228
0ADE: 15@v = text_by_GXT_entry s$93
0ADE: 20@v = text_by_GXT_entry s$95
0AF9: samp say_msg "%s %s, %s!" 10@ 15@v 20@v
wait 200
jump @Noname_221
 
:Noname_221
0AC9: 10@
jump @Noname_18
 
:Noname_228
wait 0
gosub @Noname_354
gosub @Noname_384
if or
05AD:   s$93 == 'la' // s$ == short
05AD:   s$93 == 'sf' // s$ == short
05AD:   s$93 == 've' // s$ == short
else_jump @Noname_313
05A9: s$93 = 'ct' // s$
 
:Noname_313
if
05AD:   s$93 == 'san_and' // s$ == short
else_jump @Noname_352
05A9: s$93 = 'cn' // s$
 
:Noname_352
return
 
:Noname_354
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
0843: get_zone_at 1@ 2@ 3@ nameA_to s$93 // 8-byte string
return
 
:Noname_384
gosub @Noname_677
if
  7@ == 0
else_jump @Noname_423
05A9: s$95 = 'cs' // s$
 
:Noname_423
if
  7@ == 1
else_jump @Noname_455
05A9: s$95 = 'la' // s$
 
:Noname_455
if
  7@ == 2
else_jump @Noname_487
05A9: s$95 = 'sf' // s$
 
:Noname_487
if
  7@ == 3
else_jump @Noname_519
05A9: s$95 = 've' // s$
 
:Noname_519
if
05AD:   s$93 == 'san_and' // s$ == short
else_jump @Noname_558
05A9: s$95 = 'san_and' // s$
 
:Noname_558
if
05AD:   s$93 == 'la' // s$ == short
else_jump @Noname_597
05A9: s$95 = 'la' // s$
 
:Noname_597
if
05AD:   s$93 == 'sf' // s$ == short
else_jump @Noname_636
05A9: s$95 = 'sf' // s$
 
:Noname_636
if
05AD:   s$93 == 've' // s$ == short
else_jump @Noname_675
05A9: s$95 = 've' // s$
 
:Noname_675
return
 
:Noname_677
0842: 7@ = player $PLAYER_CHAR town_number
return
 
Status
Not open for further replies.
Top