CLEO Help How to make a command if SAMP server has it but with a DIALOG.

CLEO related
Status
Not open for further replies.

Wavve

Member
Joined
Dec 14, 2019
Messages
7
Reaction score
0
Location
Romania
Guys, so I wanna make a command that if server has it but with a dialog, the command I wanna make is to delete the dialog and just write the command in chat and that's it.

So i wanna make a command for clans, an uninvite command.

In the server i am playing, there is not such command like "/uninvite [name]" but you have to write "/clan", a dialog appears and you have to select it etc ( it takes a lot )

So i wanna do it without a dialog in CLEO, help me please, it would be much much appreciated!
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,115
Solutions
5
Reaction score
879
Location
Lithuania
Guys, so I wanna make a command that if server has it but with a dialog, the command I wanna make is to delete the dialog and just write the command in chat and that's it.

So i wanna make a command for clans, an uninvite command.

In the server i am playing, there is not such command like "/uninvite [name]" but you have to write "/clan", a dialog appears and you have to select it etc ( it takes a lot )

So i wanna do it without a dialog in CLEO, help me please, it would be much much appreciated!
Possible , you can ignore dialog and write text in chat with some snippets.
But first you need get snippets xD
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,115
Solutions
5
Reaction score
879
Location
Lithuania
Guys, so I wanna make a command that if server has it but with a dialog, the command I wanna make is to delete the dialog and just write the command in chat and that's it.

So i wanna make a command for clans, an uninvite command.

In the server i am playing, there is not such command like "/uninvite [name]" but you have to write "/clan", a dialog appears and you have to select it etc ( it takes a lot )

So i wanna do it without a dialog in CLEO, help me please, it would be much much appreciated!
We need pic from you clan dialog, etc , how you add clan members, etc..

Show /clan picture
 
Last edited:

KamikazeSripterul

Well-known member
Joined
Jun 30, 2019
Messages
353
Reaction score
23
Here you go @Parazitas [
]. The problem I have faced doing this is, the player has a [TAG]. So you must remove that [TAG] first. The thing is, the user must put the [TAG] first in an .ini file or something to know exactly what to remove from the name. This is how the [TAG] of my clan look like. [ ].
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,115
Solutions
5
Reaction score
879
Location
Lithuania
BETA
PHP:
{$CLEO .cs}

0000: NOP

wait 10000

while true   
wait 0

if
0B4C:  samp is_dialog_active -1 // any dialog
then  
    0AC8: 0@ = allocate_memory_size 260
    0BD8: samp get_dialog_caption 0@ /// Get dialot caption
    if or
    0C29: $NOT_USED = stristr string1 0@ string2 "Dark Legends" // You need put here dialog caption from first dialog
    0C29: $NOT_USED = stristr string1 2@ string2 "Members" // You need put here dialog caption from second dialog
    0C29: $NOT_USED = stristr string1 0@ string2 "Manage user" // You need put here dialog caption from third dialog
    then  // reikalauja end
        0B54: samp 1@ = listbox_items_count
        1@ -= 1 
        for 0@ = 0 to 1@
            alloc 2@ = 256
            0B5B: samp get_listbox_item 0@ text_to 2@
            chatmsg "ID: %d Text: %s" -1 0@ 2@ 
            
            if // part of auto select and enter to clan members
            0C29: $NOT_USED = stristr string1 2@ string2 "Clan Members" // Get dialog list item number that text 
            then
                0B49: samp set_current_dialog_list_item 0@
                0B47: samp close_current_dialog_with_button 1
            end
            
            if // part of auto select and enter to clan members
            0C29: $NOT_USED = stristr string1 2@ string2 "Nova" // Get dialog list item number that user  
            then
                0B49: samp set_current_dialog_list_item 0@
                0B47: samp close_current_dialog_with_button 1
            end
            
            if // part of auto select and enter to clan members
            0C29: $NOT_USED = stristr string1 2@ string2 "Uninvite from clan" // Get dialog list item number that text 
            then
                0B49: samp set_current_dialog_list_item 0@
                0B47: samp close_current_dialog_with_button 1
            end
            
            free 2@
        end
    end
end

end
 
Status
Not open for further replies.
Top