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}[NR Help]{FFFFFF} by {8DA5ED}[Gugustiuc]{FFFFFF} was loaded." -1
- 0B34: samp register_client_command "sendnews" to_label @news
- 0B34: samp register_client_command "sendlive" to_label @live
- 0B34: samp register_client_command "nwone" to_label @news_fm
- 0B34: samp register_client_command "nwtwo" to_label @news_sm
- 0B34: samp register_client_command "lvone" to_label @live_fm
- 0B34: samp register_client_command "lvtwo" to_label @live_sm
- 0B34: samp register_client_command "nwview" to_label @news_two_view
- 0B34: samp register_client_command "lvview" to_label @live_two_view
- :loop
- wait 0
- jump @loop
- :news
- SAMP.IsCommandTyped(5@)
- chatmsg "Text: [%s]" -1 5@
- 0AB1: @strlen 1 string 5@ _returned: size 3@
- chatmsg "Text size: %d characters." -1 3@
- if
- 3@ > 25
- then
- if
- 3@ <= 109
- then
- say "%s" 5@
- else
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
- end
- else
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
- end
- samp.CmdRet()
- :news_fm
- SAMP.IsCommandTyped(10@)
- chatmsg "Text: [%s]" -1 10@
- 0AB1: @strlen 1 string 10@ _returned: size 3@
- chatmsg "Text size: %d characters." -1 3@
- if
- 3@ > 24
- then
- if
- 3@ <= 109
- then
- 15@ = 1
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Text #1 salvat (%d caractere)." -1 3@
- say "%s" 10@
- else
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
- end
- else
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
- end
- samp.CmdRet()
- :news_sm
- SAMP.IsCommandTyped(15@)
- chatmsg "Text: [%s]" -1 15@
- 0AB1: @strlen 1 string 15@ _returned: size 3@
- chatmsg "Text size: %d characters." -1 3@
- if
- 3@ > 24
- then
- if
- 3@ <= 109
- then
- 16@ = 1
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Text #2 salvat (%d caractere)." -1 3@
- say "%s" 15@
- else
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
- end
- else
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
- end
- samp.CmdRet()
- :news_two_view
- if and
- 15@ == 1
- 16@ == 1
- then
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Vizualizare texte introduse:" -1
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} 1: [%s]" -1 10@
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} 2: [%s]" -1 15@
- else
- if and
- not 15@ == 1
- not 16@ == 1
- then
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Introdu intai mesajele folosind [/nwone] si [/nwtwo]." -1
- else
- if
- not 15@ == 1
- then
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Primul mesaj nu a fost introdus folosind comanda [/nwone]." -1
- else
- chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Al doilea mesaj nu a fost introdus folosind comanda [/nwtwo]." -1
- end
- end
- end
- samp.CmdRet()
- :live
- SAMP.IsCommandTyped(5@)
- chatmsg "Text: [%s]" -1 5@
- 0AB1: @strlen 1 string 5@ _returned: size 3@
- chatmsg "Text size: %d characters." -1 3@
- if
- 3@ > 25
- then
- if
- 3@ <= 110
- then
- say "%s" 5@
- else
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Textul introdus are prea multe caractere (%d/109)." -1 3@
- end
- else
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Textul introdus trebuie sa aiba minim 25 de caractere (%d)." -1 3@
- end
- samp.CmdRet()
- :live_fm
- SAMP.IsCommandTyped(20@)
- chatmsg "Text: [%s]" -1 20@
- 0AB1: @strlen 1 string 20@ _returned: size 3@
- chatmsg "Text size: %d characters." -1 3@
- if
- 3@ > 25
- then
- if
- 3@ <= 109
- then
- 17@ = 1
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Text #1 salvat (%d caractere)." -1 3@
- say "%s" 20@
- else
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
- end
- else
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
- end
- samp.CmdRet()
- :live_sm
- SAMP.IsCommandTyped(25@)
- chatmsg "Text: [%s]" -1 25@
- 0AB1: @strlen 1 string 25@ _returned: size 3@
- chatmsg "Text size: %d characters." -1 3@
- if
- 3@ > 25
- then
- if
- 3@ <= 109
- then
- 18@ = 1
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Text #2 salvat (%d caractere)." -1 3@
- say "%s" 25@
- else
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
- end
- else
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
- end
- samp.CmdRet()
- :live_two_view
- if and
- 17@ == 1
- 18@ == 1
- then
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Vizualizare texte introduse:" -1
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} 1: [%s]" -1 20@
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} 2: [%s]" -1 25@
- else
- if and
- not 17@ == 1
- not 18@ == 1
- then
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Introdu intai mesajele folosind [/lvone] si [/lvtwo]." -1
- else
- if
- not 17@ == 1
- then
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Primul text nu a fost introdus folosind comanda [/lvwone]." -1
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Text #2: [%s]" -1 25@
- else
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Al doilea text nu a fost introdus folosind comanda [/lvtwo]." -1
- chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Text #1: [%s]" -1 20@
- 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