Jump to content

Advent Calendar a început, detalii aici

Recrutăm designeri audio și video. Puteți aplica aici

 

Sign in to follow this  
Wixeek

Hello

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

Share this post


Link to post
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

Share this post


Link to post
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: [email protected] = 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"
[email protected] = 2
end

0B34: samp register_client_command "towcars" to_label @towcars
[email protected] = 0
[email protected] = 0
[email protected] = 60001

while true
wait 0
    if
    [email protected] == 1
    then
    [email protected] = 0
        if
        [email protected] == 0
        then
            if
            001D:   [email protected] > [email protected]
            then
            0AF9: samp say_msg "/towcar"
            [email protected] = 1
            else
            [email protected] = 0
            end
        else
            if
            0B4C:  samp is_dialog_active -1
            then
            0B49: samp set_current_dialog_list_item [email protected]
            0B47: samp close_current_dialog_with_button 1
            [email protected] = 0
            [email protected] += 1
           end
        end
    end

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

If you need any more help open another topic.

:topic_closed:

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×

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.