CLEO Help Correct name

CLEO related
Status
Not open for further replies.

KazoVan

Member
Joined
Feb 8, 2017
Messages
11
Reaction score
0
Hello , i need simple code to read in ini file ( have name player in ini file ) cleo will check if correct name player in ini file then script will next if not correct script will not working
 

attic

Active member
Joined
Jan 13, 2017
Messages
40
Reaction score
0
Download Cleos with such feature and check opcodes for .ini files then do it by yourself
This site is for helping people not making whole scripta for them
 

KazoVan

Member
Joined
Feb 8, 2017
Messages
11
Reaction score
0
attic said:
Download Cleos with such feature and check opcodes for .ini files then do it by yourself
This site is for helping people not making whole scripta for them

You know script with such feature?? give me name
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
660
Reaction score
50
[CLEO]

 [shcode=cpp]
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------

:check
wait 1000 
if and
    0AFA:  is_samp_available
    0256:   player $PLAYER_CHAR defined
then
    0AC8: 0@ = allocate_memory_size 260
    0AF4: 0@ = read_string_from_ini_file "cleo\nickname.ini" section "Nicknames" key "Nickname"
    0B2B: samp 2@ = get_player_id_by_actor_handle $PLAYER_ACTOR
    0B36: samp 3@ = get_player_nickname 2@
        if
            0C14: strcmp string1 0@ string2 3@
            then
                0AF8: samp add_message_to_chat "You are in the list" color -1
            else
                0AF8: samp add_message_to_chat "You are not in the list" color -1
        end
end
0A93: end_custom_thread
[/shcode]

[INI] 
[shcode=cpp]
[Nicknames]

Nickname=test
[/shcode]

PD: Springfield helped me, fml.
 

KazoVan

Member
Joined
Feb 8, 2017
Messages
11
Reaction score
0
Hidend said:
[CLEO]

 [shcode=cpp]
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------

:check
wait 1000 
if and
    0AFA:  is_samp_available
    0256:   player $PLAYER_CHAR defined
then
    0AC8: 0@ = allocate_memory_size 260
    0AF4: 0@ = read_string_from_ini_file "cleo\nickname.ini" section "Nicknames" key "Nickname"
    0B2B: samp 2@ = get_player_id_by_actor_handle $PLAYER_ACTOR
    0B36: samp 3@ = get_player_nickname 2@
        if
            0C14: strcmp string1 0@ string2 3@
            then
                0AF8: samp add_message_to_chat "You are in the list" color -1
            else
                0AF8: samp add_message_to_chat "You are not in the list" color -1
        end
end
0A93: end_custom_thread
[/shcode]

[INI] 
[shcode=cpp]
[Nicknames]

Nickname=test
[/shcode]

PD: Springfield helped me, fml.
Ok i got it thanks you
 
Status
Not open for further replies.
Top