CLEO Help Disable Command

CLEO related
Status
Not open for further replies.

3weditos

New member
Joined
Oct 3, 2020
Messages
1
Reaction score
0
Location
Localhost
Hello guys
i need to learn how to disable commands with cleo
like "/dicebet"


i have this code already but it crash my game and i didn't found any fix , i think the problem on this line "UNTIL 0AFA:"


Code:
{$CLEO .cs}

0000: NOP

REPEAT
wait 0
UNTIL 0AFA:

chatmsg "{FFFFFF}NoMoreDice  -  {0085ff}[Credit: Robinson]"

0B34: samp register_client_command "dicebet" to_label @dicing
0B34: samp register_client_command "accept" to_label @accepting

while true
wait 0
    0AB4: 1@ = var 23
    if
        1@ == 1887
    then
        0A93: end_custom_thread
    end
end

:dicing
chatmsg "{0085ff}Robinson{FFFFFF} has disallowed you from dicebeting!" -1
samp.CmdRet()

:accepting
0AC8: 0@ = allocate_memory_size 260
0B35: 0@ = get_last_command_params
if
    0AD4: $NOT_USED = scan_string 0@ format "%s" $NOT_USED
then
    alloc 4@ 32
    format 4@ "%s" 0@
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "dicebet"
    then
        wait 100
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Sex"
    then
        say "/accept sex"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Mats"
    then
        say "/accept mats"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Crack"
    then
        say "/accept crack"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Pot"
    then
        say "/accept pot"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Weapon"
    then
        say "/accept weapon"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Craft"
    then
        say "/accept craft"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Repair"
    then
        say "/accept repair"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Bodyguard"
    then
        say "/accept bodyguard"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Vest"
    then
        say "/accept bodyguard"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Divorce"
    then
        say "/accept divorce"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Frisk"
    then
        say "/accept frisk"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Marriage"
    then
        say "/accept marriage"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Faction"
    then
        say "/accept faction"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Family"
    then
        say "/accept family"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Taxi"
    then
        say "/accept taxi"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Bus"
    then
        say "/accept bus"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Boxing"
    then
        say "/accept boxing"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Medic"
    then
        say "/accept medic"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Mechanic"
    then
        say "/accept mechanic"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Ticket"
    then
        say "/accept ticket"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Car"
    then
        say "/accept car"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Death"
    then
        say "/accept death"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Live"
    then
        say "/accept live"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Defense"
    then
        say "/accept defense"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "Paintball"
    then
        say "/accept paintball"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "invite"
    then
        say "/accept invite"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "handshake"
    then
        say "/accept handshake"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "witness"
    then
        say "/accept witness"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "contract"
    then
        say "/accept contract"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "drink"
    then
        say "/accept drink"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "house"
    then
        say "/accept house"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "job"
    then
        say "/accept job"
        2@ = true
    end
    if
        0C29: $NOT_USED = stristr string1 4@ string2 "business"
    then
        say "/accept business"
        2@ = true
    end
    if 2@ == false
    then
        0AF8: samp add_message_to_chat "USAGE: /accept [name]" 0xFFFFFFFF
        0AF8: samp add_message_to_chat "Available names: Sex, Mats, Crack, Pot, Weapon, Craft, Repair, Bodyguard, Divorce, Frisk, Marriage, Dicebet" 0xFFAFAFAA
        0AF8: samp add_message_to_chat "Available names: Faction, Family, Taxi, Bus, Boxing, Medic, Mechanic, Ticket, Car, Death, Live, Defense, Paintball" 0xFFAFAFAA
    end
    2@ = false
    free 4@
ELSE
    0AF8: samp add_message_to_chat "USAGE: /accept [name]" 0xFFFFFFFF
    0AF8: samp add_message_to_chat "Available names: Sex, Mats, Crack, Pot, Weapon, Craft, Repair, Bodyguard, Divorce, Frisk, Marriage, Dicebet" 0xFFAFAFAA
    0AF8: samp add_message_to_chat "Available names: Faction, Family, Taxi, Bus, Boxing, Medic, Mechanic, Ticket, Car, Death, Live, Defense, Paintball" 0xFFAFAFAA
END
0AC9: free_allocated_memory 0@
samp.CmdRet()
 
Status
Not open for further replies.
Top