Jump to content

Hello


Wixeek
 Share

Recommended Posts

Does someone know why it keeps crashing when i launch the game?

 

{$CLEO .cs}
0000:
repeat
wait 50
until 0AFA: is_samp_structures_available

0B34: samp register_client_command "cspawner" @cspawner

0AF9: samp say_msg "/towcar"
wait 20000

if
0B4C:  samp is_dialog_active -1
then
0B49: samp set_current_dialog_list_item 15
0B47: samp close_current_dialog_with_button 1

end
:cspawner            
samp.CmdRet

Link to comment
Share on other sites

basic cleo mod structure, you need a repetitive structure in the mod for it to work.

while true / repeat / for / :jump @Jump

 

{$CLEO .cs}
0000:
repeat
wait 50
until 0AFA: is_samp_structures_available

0B34: samp register_client_command "cspawner" @cspawner



WHILE TRUE

wait 0



if 1@ == 1

then

say "/towcar"
wait 20000

if
0B4C:  samp is_dialog_active -1
then
0B49: samp set_current_dialog_list_item 15
0B47: samp close_current_dialog_with_button 1

1@ = 0

end

end



END


:cspawner      

1@ = 1 

chatmsg "on" -1
samp.CmdRet

 

Edited by Nic
Link to comment
Share on other sites

is there a way to make this script repeat itself in the background??



 

{$CLEO}
0000: NOP
repeat
wait 50
until 0AFA: is_samp_structures_available


if
0AAB:   file_exists "cleo\towcars.ini"
then
0AF0: 9@ = get_int_from_ini_file "cleo\towcars.ini" section "towcars" key "masini"
else
0AF1: write_int 2 to_ini_file "cleo\towcars.ini" section "towcars" key "masini"
9@ = 2
end

0B34: samp register_client_command "towcars" to_label @towcars
1@ = 0
4@ = 0
32@ = 60001

while true
wait 0
    if
    1@ == 1
    then
    32@ = 0
        if
        4@ == 0
        then
            if
            001D:   9@ > 12@
            then
            0AF9: samp say_msg "/towcar"
            4@ = 1
            else
            1@ = 0
            end
        else
            if
            0B4C:  samp is_dialog_active -1
            then
            0B49: samp set_current_dialog_list_item 12@
            0B47: samp close_current_dialog_with_button 1
            4@ = 0
            12@ += 1
           end
        end
    end

:towcars
if 32@ > 60000
then
32@ = 0
1@ = 1
12@ = 0
else
21@ = 60000
0062: 21@ -= 32@
21@ /= 1000
chatmsg "{26EBE1}Please wait %d seconds before you can use /towcars again" -1 21@
end
samp.CmdRet

Link to comment
Share on other sites

{$CLEO}
{$USE ini}
0000: NOP
repeat
wait 50
until 0AFA: is_samp_structures_available


if
0AAB:   file_exists "cleo\towcars.ini"
then
0AF0: 9@ = get_int_from_ini_file "cleo\towcars.ini" section "towcars" key "masini"
else
0AF1: write_int 2 to_ini_file "cleo\towcars.ini" section "towcars" key "masini"
9@ = 2
end

0B34: samp register_client_command "towcars" to_label @towcars
1@ = 0
4@ = 0

while true
wait 0
    if 5@ == 1
    then
        if
        1@ == 1
        then
            if
            4@ == 0
            then
                if
                001D:   9@ > 12@
                then
                    0AF9: samp say_msg "/towcar"
                    4@ = 1
                else
                    1@ = 0
                end
            else
                if
                    0B4C:  samp is_dialog_active -1
                then
                    0B49: samp set_current_dialog_list_item 12@
                    0B47: samp close_current_dialog_with_button 1
                    4@ = 0
                    12@ += 1
               end
            end
        end
        
        wait 60000
        1@ = 1
        12@ = 0
    
    end 
    
end

:towcars
if 5@ == 0
then
5@ = 1
chatmsg "on" -1
else
chatmsg "off" -1
5@ = 0
end
samp.CmdRet

 

Edited by Nic
Link to comment
Share on other sites

  • Nic locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.