CLEO Help Help with a mod

CLEO related

Derrekgamer

Active member
Joined
Oct 26, 2020
Messages
93
Reaction score
1
Location
Grecee
Here is my code

Code:
{$CLEO}
                  
0662: "get" //Ruby.Nephrite.RO
thread "all players"
wait 2500


0B34: samp register_client_command "getplayers" to_label @toggle

 
    WHILE TRUE
        WAIT 0
        if 30@ == 1 //if you type that command it will change variable to 1
        then
           0C8A: samp 1@ = get_max_player_id streamed_only 0
            FOR 0@ = 0 TO 1@
            IF
            0B23:  samp is_player_connected 0@
            THEN
                0AF9: "/id %d" 0@
                WAIT 1000 // DELAY
                END
            END
        END
        end

:toggle //command
0B12: 30@ = 30@ XOR 1
if 30@ == 0
then
print "~r~>off" 2000
else
print "~r~>on" 2000
end
SAMP.CmdRet()

Now if i add the
0B65: samp 2@ = player 1@ score
If 2@ >= 20

it crashes at game start, why??

this is the code with that and it crash at server starting.. :

Code:
[CODE]{$CLEO}

                  

0662: "get" //Ruby.Nephrite.RO

thread "all players"

wait 2500





0B34: samp register_client_command "getplayers" to_label @toggle



 

    WHILE TRUE

        WAIT 0

        if 30@ == 1 //if you type that command it will change variable to 1

        then

           0C8A: samp 1@ = get_max_player_id streamed_only 0

            FOR 0@ = 0 TO 1@

            IF
            0B23:  samp is_player_connected 0@
            THEN
            0B65: samp 2@ = player 0@ score
            If 2@ >= 20
            Then

                0AF9: "/id %d" 0@

                WAIT 1000 // DELAY

                END

            END

        END

        end



:toggle //command

0B12: 30@ = 30@ XOR 1

if 30@ == 0

then

print "~r~>off" 2000

else

print "~r~>on" 2000

end

SAMP.CmdRet()
[/CODE]

Why ifi add that feature to get player level the game crash?..
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,112
Solutions
5
Reaction score
878
Location
Lithuania
Here is my code

Code:
{$CLEO}
                 
0662: "get" //Ruby.Nephrite.RO
thread "all players"
wait 2500


0B34: samp register_client_command "getplayers" to_label @toggle


    WHILE TRUE
        WAIT 0
        if 30@ == 1 //if you type that command it will change variable to 1
        then
           0C8A: samp 1@ = get_max_player_id streamed_only 0
            FOR 0@ = 0 TO 1@
            IF
            0B23:  samp is_player_connected 0@
            THEN
                0AF9: "/id %d" 0@
                WAIT 1000 // DELAY
                END
            END
        END
        end

:toggle //command
0B12: 30@ = 30@ XOR 1
if 30@ == 0
then
print "~r~>off" 2000
else
print "~r~>on" 2000
end
SAMP.CmdRet()

Now if i add the
0B65: samp 2@ = player 1@ score
If 2@ >= 20

Why if add that feature to get player level the game crash?..
On this source i can see you missing one END
 

blvck0v

Active member
Joined
Feb 23, 2019
Messages
97
Reaction score
51
Location
ugbase.eu
PHP:
{$CLEO}
0000: NOP
wait 8500

0B34: samp register_client_command "getplayers" to_label @toggle

while true
wait 0
    if 30@ == 1 //if you type that command it will change variable to 1
    then
        0C8A: samp 1@ = get_max_player_id streamed_only 0
        for 0@ = 0 TO 1@
            if 0B23: samp is_player_connected 0@
            then
                0B65: samp 2@ = player 0@ score
                if 2@ >= 20
                then
                    0AF9: "/id %d" 0@
                    wait 1000 // DELAY
                end
            end
        end
    end
end

:toggle //command
0B12: 30@ = 30@ XOR 1
if 30@ == 0
then
    print "~r~>off" 2000
else
    print "~r~>on" 2000
end
SAMP.CmdRet()
Try this man, and please convert code this way when posting here, it makes it way easier to get help.
 

Derrekgamer

Active member
Joined
Oct 26, 2020
Messages
93
Reaction score
1
Location
Grecee
PHP:
{$CLEO}
0000: NOP
wait 8500

0B34: samp register_client_command "getplayers" to_label @toggle

while true
wait 0
    if 30@ == 1 //if you type that command it will change variable to 1
    then
        0C8A: samp 1@ = get_max_player_id streamed_only 0
        for 0@ = 0 TO 1@
            if 0B23: samp is_player_connected 0@
            then
                0B65: samp 2@ = player 0@ score
                if 2@ >= 20
                then
                    0AF9: "/id %d" 0@
                    wait 1000 // DELAY
                end
            end
        end
    end
end

:toggle //command
0B12: 30@ = 30@ XOR 1
if 30@ == 0
then
    print "~r~>off" 2000
else
    print "~r~>on" 2000
end
SAMP.CmdRet()
Try this man, and please convert code this way when posting here, it makes it way easier to get help.

hmm it works but when i use the command getplayers, it activates, and when i use the command /getplayers it won't dexactivate.. so on off not working can u fix that?
 

blvck0v

Active member
Joined
Feb 23, 2019
Messages
97
Reaction score
51
Location
ugbase.eu
hmm it works but when i use the command getplayers, it activates, and when i use the command /getplayers it won't dexactivate.. so on off not working can u fix that?

This should fix all you problems

PHP:
{$CLEO}
0000: NOP
wait 8500

30@ = 0
0B34: samp register_client_command "getplayers" to_label @getplayers

while true
wait 0
    if 30@ == 1 //if you type that command it will change variable to 1
    then
        0C8A: samp 1@ = get_max_player_id streamed_only 0
        for 0@ = 0 TO 1@
            if 0B23: samp is_player_connected 0@
            then
                0B65: samp 2@ = player 0@ score
                if 2@ >= 20
                then
                    0AF9: "/id %d" 0@
                    wait 1000 // DELAY
                end
            end
        end
        30@ = 0
    end
end

:getplayers
30@ = 1
SAMP.CmdRet()
 

JaggerJam

Active member
Joined
Sep 14, 2017
Messages
97
Reaction score
21
This should fix all you problems

PHP:
{$CLEO}
0000: NOP
wait 8500

30@ = 0
0B34: samp register_client_command "getplayers" to_label @getplayers

while true
wait 0
    if 30@ == 1 //if you type that command it will change variable to 1
    then
        0C8A: samp 1@ = get_max_player_id streamed_only 0
        for 0@ = 0 TO 1@
            if 0B23: samp is_player_connected 0@
            then
                0B65: samp 2@ = player 0@ score
                if 2@ >= 20
                then
                    0AF9: "/id %d" 0@
                    wait 1000 // DELAY
                end
            end
        end
        30@ = 0
    end
end

:getplayers
30@ = 1
SAMP.CmdRet()
Now he will ask to make with ON/OFF command
 
Last edited:
Top