Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {$CLEO .cs}
- 0000:
- REPEAT
- WAIT 0
- UNTIL 0AFA: is_samp_available
- 0AF8: samp add_message_to_chat "{C2A2DA}[Small NR Helper v1.0]{FFFFFF} was loaded. Use {C2A2DA}[/nrhelp]{FFFFFF} to see all available commands." -1
- 0B34: samp register_client_command "nrhelp" to_label @help_me
- 0B34: samp register_client_command "nw" to_label @news
- 0B34: samp register_client_command "lv" to_label @live
- 0B34: samp register_client_command "nw1" to_label @news_fm
- 0B34: samp register_client_command "nw2" to_label @news_sm
- 0B34: samp register_client_command "lv1" to_label @live_fm
- 0B34: samp register_client_command "lv2" to_label @live_sm
- 0B34: samp register_client_command "nwcheck" to_label @news_two_check
- 0B34: samp register_client_command "lvcheck" to_label @live_two_check
- 0B34: samp register_client_command "nwsend" to_label @news_two_send
- 0B34: samp register_client_command "lvsend" to_label @live_two_send
- IF
- 0AAB: file_exists "cleo\nr_help_news.ini"
- THEN
- 0B00: delete_file "cleo\nr_help_news.ini"
- END
- IF
- 0AAB: file_exists "cleo\nr_help_live.ini"
- THEN
- 0B00: delete_file "cleo\nr_help_live.ini"
- END
- 26@ = 0
- 27@ = 0
- 28@ = 0
- 29@ = 0
- :loop
- wait 0
- jump @loop
- :help_me
- free 17@
- 0AC6: 17@ = label @content offset
- SAMP.ShowDialog(7777, "{C2A2DA}[Small NR Helper]{FFFFFF} by {8DA5ED}[Gugustiuc]{FFFFFF} - comenzi disponibile", 17@, "{FFFFFF}Close", "", 0)
- 0B43: samp cmd_ret
- :content
- hex
- " "A
- " "A
- "{FFFFFF}Pentru {FFA500}[NEWS]{FFFFFF}"A
- " "A
- "{C2A2DA}[/nw <text>]{FFFFFF} - verifica numarul de caractere al textului introdus (minim 25, maxim 109), si trimite textul pe {FFA500}[NEWS]{FFFFFF}."A
- " "A
- "{C2A2DA}[/nw1 <text>]{FFFFFF} - salveaza 1/2 texte pentru a fi ulterior trimise amandoua pe {FFA500}[NEWS]{FFFFFF}."A
- "{C2A2DA}[/nw2 <text>]{FFFFFF} - salveaza 2/2 texte pentru a fi ulterior trimise amandoua pe {FFA500}[NEWS]{FFFFFF}."A
- "{C2A2DA}[/nwcheck]{FFFFFF} - afiseaza textele introduse prin comenzile {C2A2DA}[/nw1 <text>]{FFFFFF} si {C2A2DA}[/nw2 <text>]{FFFFFF}."A
- "{C2A2DA}[/nwsend]{FFFFFF} - trimite cele doua texte salvate anterior, pe {FFA500}[NEWS]{FFFFFF}."A
- " "A
- " "A
- "Pentru {9ACD32}[LIVE]{FFFFFF}"A
- " "A
- "{C2A2DA}[/lv <text>]{FFFFFF} - verifica numarul de caractere al textului introdus (minim 25, maxim 110), si trimite textul pe {9ACD32}[LIVE]{FFFFFF}."A
- " "A
- "{C2A2DA}[/lv1 <text>]{FFFFFF} - salveaza 1/2 texte pentru a fi ulterior trimise amandoua pe {9ACD32}[LIVE]{FFFFFF}."A
- "{C2A2DA}[/lv2 <text>]{FFFFFF} - salveaza 2/2 texte pentru a fi ulterior trimise amandoua pe {9ACD32}[LIVE]{FFFFFF}."A
- "{C2A2DA}[/lvcheck]{FFFFFF} - afiseaza textele introduse prin comenzile {C2A2DA}[/lv1 <text>]{FFFFFF} si {C2A2DA}[/lv2 <text>]{FFFFFF}."A
- "{C2A2DA}[/lvsend]{FFFFFF} - trimite cele doua texte salvate anterior, pe {9ACD32}[LIVE]{FFFFFF}."A
- " "00
- end
- :news
- SAMP.IsCommandTyped(5@)
- 0AB1: @strlen 1 string 5@ _returned: size 3@
- if
- 3@ >= 25
- then
- if
- 3@ <= 109
- then
- say " /news %s" 5@
- else
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
- end
- else
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
- end
- samp.CmdRet()
- :news_fm
- SAMP.IsCommandTyped(6@)
- 0AB1: @strlen 1 string 6@ _returned: size 3@
- if
- 3@ >= 25
- then
- if
- 3@ <= 109
- then
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Text #1 salvat (%d caractere)." -1 3@
- chatmsg "#1: [%s]" -1 6@
- 0AF5: write_string 6@ to_ini_file "cleo\nr_help_news.ini" section "NEWS" key "first"
- 26@ = 1
- else
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
- end
- else
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
- end
- samp.CmdRet()
- :news_sm
- SAMP.IsCommandTyped(16@)
- 0AB1: @strlen 1 string 16@ _returned: size 3@
- if
- 3@ >= 25
- then
- if
- 3@ <= 109
- then
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Text #2 salvat (%d caractere)." -1 3@
- // chatmsg "#2: [%s]" -1 16@
- 0AF5: write_string 16@ to_ini_file "cleo\nr_help_news.ini" section "NEWS" key "second"
- 27@ = 1
- else
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
- end
- else
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
- end
- samp.CmdRet()
- :news_two_check
- if and
- 26@ == 1
- 27@ == 1
- then
- alloc 6@ 600
- alloc 16@ 600
- 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "first"
- 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "second"
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Vizualizare texte introduse:" -1
- chatmsg "%s" -1 6@
- chatmsg "%s" -1 16@
- free 6@
- free 16@
- else
- if and
- not 26@ == 1
- not 27@ == 1
- then
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Introdu intai mesajele folosind [/n1] si [/n2]." -1
- else
- if
- not 26@ == 1
- then
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Primul text nu a fost introdus folosind comanda [/n1]." -1
- alloc 16@ 600
- 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "second"
- chatmsg "%s" -1 16@
- free 16@
- else
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Al doilea mesaj nu a fost introdus folosind comanda [/n2]." -1
- alloc 6@ 600
- 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "first"
- chatmsg "%s" -1 6@
- free 6@
- end
- end
- end
- samp.CmdRet()
- :news_two_send
- if and
- 26@ == 1
- 27@ == 1
- then
- alloc 6@ 600
- alloc 16@ 600
- 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "first"
- 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "second"
- say " /news %s" 6@
- say " /news %s" 16@
- free 6@
- free 16@
- 0B00: delete_file "cleo\nr_help_news.ini"
- 26@ = 0
- 27@ = 0
- else
- if and
- not 26@ == 1
- not 27@ == 1
- then
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Introdu intai mesajele folosind [/n1] si [/n2]." -1
- else
- if
- not 26@ == 1
- then
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Primul text nu a fost introdus folosind comanda [/n1]." -1
- alloc 16@ 600
- 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "second"
- chatmsg "%s" -1 16@
- free 16@
- else
- chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Al doilea mesaj nu a fost introdus folosind comanda [/n2]." -1
- alloc 6@ 600
- 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "first"
- chatmsg "%s" -1 6@
- free 6@
- end
- end
- end
- samp.CmdRet()
- :live
- SAMP.IsCommandTyped(5@)
- 0AB1: @strlen 1 string 5@ _returned: size 3@
- if
- 3@ >= 25
- then
- if
- 3@ <= 110
- then
- say " /l %s" 5@
- else
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Textul introdus are prea multe caractere (%d/109)." -1 3@
- end
- else
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Textul introdus trebuie sa aiba minim 25 de caractere (%d)." -1 3@
- end
- samp.CmdRet()
- :live_fm
- SAMP.IsCommandTyped(6@)
- 0AB1: @strlen 1 string 6@ _returned: size 3@
- if
- 3@ >= 25
- then
- if
- 3@ <= 109
- then
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Text #1 salvat (%d caractere)." -1 3@
- chatmsg "%s" -1 6@
- 0AF5: write_string 6@ to_ini_file "cleo\nr_help_live.ini" section "LIVE" key "first"
- 28@ = 1
- else
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
- end
- else
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
- end
- samp.CmdRet()
- :live_sm
- SAMP.IsCommandTyped(16@)
- 0AB1: @strlen 1 string 16@ _returned: size 3@
- if
- 3@ >= 25
- then
- if
- 3@ <= 109
- then
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Text #2 salvat (%d caractere)." -1 3@
- chatmsg "%s" -1 16@
- 0AF5: write_string 16@ to_ini_file "cleo\nr_help_live.ini" section "LIVE" key "second"
- 29@ = 1
- else
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
- end
- else
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
- end
- samp.CmdRet()
- :live_two_check
- if and
- 28@ == 1
- 29@ == 1
- then
- alloc 6@ 600
- alloc 16@ 600
- 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "first"
- 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "second"
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Vizualizare texte introduse:" -1
- chatmsg "%s" -1 6@
- chatmsg "%s" -1 16@
- free 6@
- free 16@
- else
- if and
- not 28@ == 1
- not 29@ == 1
- then
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Introdu intai mesajele folosind [/l1] si [/l2]." -1
- else
- if
- not 28@ == 1
- then
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Primul text nu a fost introdus folosind comanda [/l1]." -1
- alloc 16@ 600
- 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "second"
- chatmsg "%s" -1 16@
- free 16@
- else
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Al doilea text nu a fost introdus folosind comanda [/l2]." -1
- alloc 6@ 600
- 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "first"
- chatmsg "%s" -1 6@
- free 6@
- end
- end
- end
- samp.CmdRet()
- :live_two_send
- if and
- 28@ == 1
- 29@ == 1
- then
- alloc 6@ 600
- alloc 16@ 600
- 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "first"
- 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "second"
- say " /l %s" 6@
- say " /l %s" 16@
- free 6@
- free 16@
- 0B00: delete_file "cleo\nr_help_live.ini"
- 28@ = 0
- 29@ = 0
- else
- if and
- not 28@ == 1
- not 29@ == 1
- then
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Introdu intai mesajele folosind [/l1] si [/l2]." -1
- else
- if
- not 28@ == 1
- then
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Primul text nu a fost introdus folosind comanda [/l1]." -1
- alloc 16@ 600
- 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "second"
- chatmsg "%s" -1 16@
- free 16@
- else
- chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Al doilea text nu a fost introdus folosind comanda [/l2]." -1
- alloc 6@ 600
- 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "first"
- chatmsg "%s" -1 6@
- free 6@
- end
- end
- end
- samp.CmdRet()
- :strlen
- {
- Example: 0AB1: @strlen 1 string 1@ _returned: size 3@
- In: 0@ - text;
- Out: 1@ - size;
- }
- for 1@ = 0 to 1024
- 0A8D: 2@ = read_memory 0@ size 1 virtual_protect 0
- if not 2@ == 0
- jf break
- 0@ += 1
- end
- 0AB2: ret 1 1@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement