Advertisement
gugustiuc

Untitled

Jul 2nd, 2021
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.23 KB | None | 0 0
  1. {$CLEO .cs}
  2. 0000:
  3.  
  4. REPEAT
  5. WAIT 0
  6. UNTIL 0AFA: is_samp_available
  7.  
  8. 0AF8: samp add_message_to_chat "{C2A2DA}[NR Help]{FFFFFF} by {8DA5ED}[Gugustiuc]{FFFFFF} was loaded." -1
  9.  
  10. 0B34: samp register_client_command "sendnews" to_label @news
  11. 0B34: samp register_client_command "sendlive" to_label @live
  12. 0B34: samp register_client_command "nwone" to_label @news_fm
  13. 0B34: samp register_client_command "nwtwo" to_label @news_sm
  14. 0B34: samp register_client_command "lvone" to_label @live_fm
  15. 0B34: samp register_client_command "lvtwo" to_label @live_sm
  16. 0B34: samp register_client_command "nwview" to_label @news_two_view
  17. 0B34: samp register_client_command "lvview" to_label @live_two_view
  18.  
  19.  
  20. :loop
  21. wait 0
  22. jump @loop
  23.  
  24. :news
  25. SAMP.IsCommandTyped(5@)
  26. chatmsg "Text: [%s]" -1 5@
  27. 0AB1: @strlen 1 string 5@ _returned: size 3@
  28. chatmsg "Text size: %d characters." -1 3@
  29. if
  30. 3@ > 25
  31. then
  32. if
  33. 3@ <= 109
  34. then
  35. say "%s" 5@
  36. else
  37. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
  38. end
  39. else
  40. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
  41. end
  42. samp.CmdRet()
  43.  
  44. :news_fm
  45. SAMP.IsCommandTyped(10@)
  46. chatmsg "Text: [%s]" -1 10@
  47. 0AB1: @strlen 1 string 10@ _returned: size 3@
  48. chatmsg "Text size: %d characters." -1 3@
  49. if
  50. 3@ > 24
  51. then
  52. if
  53. 3@ <= 109
  54. then
  55. 15@ = 1
  56. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Text #1 salvat (%d caractere)." -1 3@
  57. say "%s" 10@
  58. else
  59. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
  60. end
  61. else
  62. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
  63. end
  64. samp.CmdRet()
  65.  
  66. :news_sm
  67. SAMP.IsCommandTyped(15@)
  68. chatmsg "Text: [%s]" -1 15@
  69. 0AB1: @strlen 1 string 15@ _returned: size 3@
  70. chatmsg "Text size: %d characters." -1 3@
  71. if
  72. 3@ > 24
  73. then
  74. if
  75. 3@ <= 109
  76. then
  77. 16@ = 1
  78. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Text #2 salvat (%d caractere)." -1 3@
  79. say "%s" 15@
  80. else
  81. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
  82. end
  83. else
  84. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
  85. end
  86. samp.CmdRet()
  87.  
  88.  
  89. :news_two_view
  90. if and
  91. 15@ == 1
  92. 16@ == 1
  93. then
  94. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Vizualizare texte introduse:" -1
  95. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} 1: [%s]" -1 10@
  96. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} 2: [%s]" -1 15@
  97. else
  98. if and
  99. not 15@ == 1
  100. not 16@ == 1
  101. then
  102. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Introdu intai mesajele folosind [/nwone] si [/nwtwo]." -1
  103. else
  104. if
  105. not 15@ == 1
  106. then
  107. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Primul mesaj nu a fost introdus folosind comanda [/nwone]." -1
  108. else
  109. chatmsg "{C2A2DA}[NR Help]{FFA500} [NEWS]{FFFFFF} Al doilea mesaj nu a fost introdus folosind comanda [/nwtwo]." -1
  110. end
  111. end
  112. end
  113. samp.CmdRet()
  114.  
  115.  
  116. :live
  117. SAMP.IsCommandTyped(5@)
  118. chatmsg "Text: [%s]" -1 5@
  119. 0AB1: @strlen 1 string 5@ _returned: size 3@
  120. chatmsg "Text size: %d characters." -1 3@
  121. if
  122. 3@ > 25
  123. then
  124. if
  125. 3@ <= 110
  126. then
  127. say "%s" 5@
  128. else
  129. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Textul introdus are prea multe caractere (%d/109)." -1 3@
  130. end
  131. else
  132. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Textul introdus trebuie sa aiba minim 25 de caractere (%d)." -1 3@
  133. end
  134. samp.CmdRet()
  135.  
  136.  
  137. :live_fm
  138. SAMP.IsCommandTyped(20@)
  139. chatmsg "Text: [%s]" -1 20@
  140. 0AB1: @strlen 1 string 20@ _returned: size 3@
  141. chatmsg "Text size: %d characters." -1 3@
  142. if
  143. 3@ > 25
  144. then
  145. if
  146. 3@ <= 109
  147. then
  148. 17@ = 1
  149. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Text #1 salvat (%d caractere)." -1 3@
  150. say "%s" 20@
  151. else
  152. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
  153. end
  154. else
  155. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
  156. end
  157. samp.CmdRet()
  158.  
  159.  
  160. :live_sm
  161. SAMP.IsCommandTyped(25@)
  162. chatmsg "Text: [%s]" -1 25@
  163. 0AB1: @strlen 1 string 25@ _returned: size 3@
  164. chatmsg "Text size: %d characters." -1 3@
  165. if
  166. 3@ > 25
  167. then
  168. if
  169. 3@ <= 109
  170. then
  171. 18@ = 1
  172. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Text #2 salvat (%d caractere)." -1 3@
  173. say "%s" 25@
  174. else
  175. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
  176. end
  177. else
  178. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
  179. end
  180. samp.CmdRet()
  181.  
  182.  
  183. :live_two_view
  184. if and
  185. 17@ == 1
  186. 18@ == 1
  187. then
  188. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Vizualizare texte introduse:" -1
  189. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} 1: [%s]" -1 20@
  190. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} 2: [%s]" -1 25@
  191. else
  192. if and
  193. not 17@ == 1
  194. not 18@ == 1
  195. then
  196. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Introdu intai mesajele folosind [/lvone] si [/lvtwo]." -1
  197. else
  198. if
  199. not 17@ == 1
  200. then
  201. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Primul text nu a fost introdus folosind comanda [/lvwone]." -1
  202. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Text #2: [%s]" -1 25@
  203. else
  204. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Al doilea text nu a fost introdus folosind comanda [/lvtwo]." -1
  205. chatmsg "{C2A2DA}[NR Help]{9ACD32} [LIVE]{FFFFFF} Text #1: [%s]" -1 20@
  206. end
  207. end
  208. end
  209. samp.CmdRet()
  210.  
  211.  
  212.  
  213.  
  214.  
  215. :strlen
  216. {
  217. Example: 0AB1: @strlen 1 string 1@ _returned: size 3@
  218. In: 0@ - text;
  219. Out: 1@ - size;
  220. }
  221. for 1@ = 0 to 1024
  222. 0A8D: 2@ = read_memory 0@ size 1 virtual_protect 0
  223. if not 2@ == 0
  224. jf break
  225. 0@ += 1
  226. end
  227. 0AB2: ret 1 1@
  228.  
  229.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement