Advertisement
gugustiuc

Untitled

Jul 5th, 2021
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.02 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}[Small NR Helper v1.0]{FFFFFF} was loaded. Use {C2A2DA}[/nrhelp]{FFFFFF} to see all available commands." -1
  9.  
  10.  
  11. 0B34: samp register_client_command "nrhelp" to_label @help_me
  12. 0B34: samp register_client_command "nw" to_label @news
  13. 0B34: samp register_client_command "lv" to_label @live
  14. 0B34: samp register_client_command "nw1" to_label @news_fm
  15. 0B34: samp register_client_command "nw2" to_label @news_sm
  16. 0B34: samp register_client_command "lv1" to_label @live_fm
  17. 0B34: samp register_client_command "lv2" to_label @live_sm
  18. 0B34: samp register_client_command "nwcheck" to_label @news_two_check
  19. 0B34: samp register_client_command "lvcheck" to_label @live_two_check
  20. 0B34: samp register_client_command "nwsend" to_label @news_two_send
  21. 0B34: samp register_client_command "lvsend" to_label @live_two_send
  22.  
  23.  
  24. IF
  25. 0AAB: file_exists "cleo\nr_help_news.ini"
  26. THEN
  27. 0B00: delete_file "cleo\nr_help_news.ini"
  28. END
  29.  
  30.  
  31. IF
  32. 0AAB: file_exists "cleo\nr_help_live.ini"
  33. THEN
  34. 0B00: delete_file "cleo\nr_help_live.ini"
  35. END
  36.  
  37.  
  38. 26@ = 0
  39. 27@ = 0
  40. 28@ = 0
  41. 29@ = 0
  42.  
  43.  
  44. :loop
  45. wait 0
  46. jump @loop
  47.  
  48.  
  49. :help_me
  50. free 17@
  51. 0AC6: 17@ = label @content offset
  52. SAMP.ShowDialog(7777, "{C2A2DA}[Small NR Helper]{FFFFFF} by {8DA5ED}[Gugustiuc]{FFFFFF} - comenzi disponibile", 17@, "{FFFFFF}Close", "", 0)
  53. 0B43: samp cmd_ret
  54.  
  55.  
  56. :content
  57. hex
  58. " "A
  59. " "A
  60. "{FFFFFF}Pentru {FFA500}[NEWS]{FFFFFF}"A
  61. " "A
  62. "{C2A2DA}[/nw <text>]{FFFFFF} - verifica numarul de caractere al textului introdus (minim 25, maxim 109), si trimite textul pe {FFA500}[NEWS]{FFFFFF}."A
  63. " "A
  64. "{C2A2DA}[/nw1 <text>]{FFFFFF} - salveaza 1/2 texte pentru a fi ulterior trimise amandoua pe {FFA500}[NEWS]{FFFFFF}."A
  65. "{C2A2DA}[/nw2 <text>]{FFFFFF} - salveaza 2/2 texte pentru a fi ulterior trimise amandoua pe {FFA500}[NEWS]{FFFFFF}."A
  66. "{C2A2DA}[/nwcheck]{FFFFFF} - afiseaza textele introduse prin comenzile {C2A2DA}[/nw1 <text>]{FFFFFF} si {C2A2DA}[/nw2 <text>]{FFFFFF}."A
  67. "{C2A2DA}[/nwsend]{FFFFFF} - trimite cele doua texte salvate anterior, pe {FFA500}[NEWS]{FFFFFF}."A
  68. " "A
  69. " "A
  70. "Pentru {9ACD32}[LIVE]{FFFFFF}"A
  71. " "A
  72. "{C2A2DA}[/lv <text>]{FFFFFF} - verifica numarul de caractere al textului introdus (minim 25, maxim 110), si trimite textul pe {9ACD32}[LIVE]{FFFFFF}."A
  73. " "A
  74. "{C2A2DA}[/lv1 <text>]{FFFFFF} - salveaza 1/2 texte pentru a fi ulterior trimise amandoua pe {9ACD32}[LIVE]{FFFFFF}."A
  75. "{C2A2DA}[/lv2 <text>]{FFFFFF} - salveaza 2/2 texte pentru a fi ulterior trimise amandoua pe {9ACD32}[LIVE]{FFFFFF}."A
  76. "{C2A2DA}[/lvcheck]{FFFFFF} - afiseaza textele introduse prin comenzile {C2A2DA}[/lv1 <text>]{FFFFFF} si {C2A2DA}[/lv2 <text>]{FFFFFF}."A
  77. "{C2A2DA}[/lvsend]{FFFFFF} - trimite cele doua texte salvate anterior, pe {9ACD32}[LIVE]{FFFFFF}."A
  78. " "00
  79. end
  80.  
  81. :news
  82. SAMP.IsCommandTyped(5@)
  83. 0AB1: @strlen 1 string 5@ _returned: size 3@
  84. if
  85. 3@ >= 25
  86. then
  87. if
  88. 3@ <= 109
  89. then
  90. say " /news %s" 5@
  91. else
  92. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
  93. end
  94. else
  95. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
  96. end
  97. samp.CmdRet()
  98.  
  99. :news_fm
  100. SAMP.IsCommandTyped(6@)
  101. 0AB1: @strlen 1 string 6@ _returned: size 3@
  102. if
  103. 3@ >= 25
  104. then
  105. if
  106. 3@ <= 109
  107. then
  108. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Text #1 salvat (%d caractere)." -1 3@
  109. chatmsg "#1: [%s]" -1 6@
  110. 0AF5: write_string 6@ to_ini_file "cleo\nr_help_news.ini" section "NEWS" key "first"
  111. 26@ = 1
  112. else
  113. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
  114. end
  115. else
  116. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
  117. end
  118. samp.CmdRet()
  119.  
  120. :news_sm
  121. SAMP.IsCommandTyped(16@)
  122. 0AB1: @strlen 1 string 16@ _returned: size 3@
  123. if
  124. 3@ >= 25
  125. then
  126. if
  127. 3@ <= 109
  128. then
  129. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Text #2 salvat (%d caractere)." -1 3@
  130. // chatmsg "#2: [%s]" -1 16@
  131. 0AF5: write_string 16@ to_ini_file "cleo\nr_help_news.ini" section "NEWS" key "second"
  132. 27@ = 1
  133. else
  134. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
  135. end
  136. else
  137. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
  138. end
  139. samp.CmdRet()
  140.  
  141.  
  142. :news_two_check
  143. if and
  144. 26@ == 1
  145. 27@ == 1
  146. then
  147. alloc 6@ 600
  148. alloc 16@ 600
  149. 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "first"
  150. 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "second"
  151. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Vizualizare texte introduse:" -1
  152. chatmsg "%s" -1 6@
  153. chatmsg "%s" -1 16@
  154. free 6@
  155. free 16@
  156. else
  157. if and
  158. not 26@ == 1
  159. not 27@ == 1
  160. then
  161. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Introdu intai mesajele folosind [/n1] si [/n2]." -1
  162. else
  163. if
  164. not 26@ == 1
  165. then
  166. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Primul text nu a fost introdus folosind comanda [/n1]." -1
  167. alloc 16@ 600
  168. 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "second"
  169. chatmsg "%s" -1 16@
  170. free 16@
  171. else
  172. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Al doilea mesaj nu a fost introdus folosind comanda [/n2]." -1
  173. alloc 6@ 600
  174. 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "first"
  175. chatmsg "%s" -1 6@
  176. free 6@
  177. end
  178. end
  179. end
  180. samp.CmdRet()
  181.  
  182.  
  183. :news_two_send
  184. if and
  185. 26@ == 1
  186. 27@ == 1
  187. then
  188. alloc 6@ 600
  189. alloc 16@ 600
  190. 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "first"
  191. 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "second"
  192. say " /news %s" 6@
  193. say " /news %s" 16@
  194. free 6@
  195. free 16@
  196. 0B00: delete_file "cleo\nr_help_news.ini"
  197. 26@ = 0
  198. 27@ = 0
  199. else
  200. if and
  201. not 26@ == 1
  202. not 27@ == 1
  203. then
  204. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Introdu intai mesajele folosind [/n1] si [/n2]." -1
  205. else
  206. if
  207. not 26@ == 1
  208. then
  209. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Primul text nu a fost introdus folosind comanda [/n1]." -1
  210. alloc 16@ 600
  211. 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "second"
  212. chatmsg "%s" -1 16@
  213. free 16@
  214. else
  215. chatmsg "{C2A2DA}[Small NR Helper]{FFA500} [NEWS]{FFFFFF} Al doilea mesaj nu a fost introdus folosind comanda [/n2]." -1
  216. alloc 6@ 600
  217. 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_news.ini" section "NEWS" key "first"
  218. chatmsg "%s" -1 6@
  219. free 6@
  220. end
  221. end
  222. end
  223. samp.CmdRet()
  224.  
  225.  
  226. :live
  227. SAMP.IsCommandTyped(5@)
  228. 0AB1: @strlen 1 string 5@ _returned: size 3@
  229. if
  230. 3@ >= 25
  231. then
  232. if
  233. 3@ <= 110
  234. then
  235. say " /l %s" 5@
  236. else
  237. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Textul introdus are prea multe caractere (%d/109)." -1 3@
  238. end
  239. else
  240. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Textul introdus trebuie sa aiba minim 25 de caractere (%d)." -1 3@
  241. end
  242. samp.CmdRet()
  243.  
  244.  
  245. :live_fm
  246. SAMP.IsCommandTyped(6@)
  247. 0AB1: @strlen 1 string 6@ _returned: size 3@
  248. if
  249. 3@ >= 25
  250. then
  251. if
  252. 3@ <= 109
  253. then
  254. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Text #1 salvat (%d caractere)." -1 3@
  255. chatmsg "%s" -1 6@
  256. 0AF5: write_string 6@ to_ini_file "cleo\nr_help_live.ini" section "LIVE" key "first"
  257. 28@ = 1
  258. else
  259. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
  260. end
  261. else
  262. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
  263. end
  264. samp.CmdRet()
  265.  
  266.  
  267. :live_sm
  268. SAMP.IsCommandTyped(16@)
  269. 0AB1: @strlen 1 string 16@ _returned: size 3@
  270. if
  271. 3@ >= 25
  272. then
  273. if
  274. 3@ <= 109
  275. then
  276. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Text #2 salvat (%d caractere)." -1 3@
  277. chatmsg "%s" -1 16@
  278. 0AF5: write_string 16@ to_ini_file "cleo\nr_help_live.ini" section "LIVE" key "second"
  279. 29@ = 1
  280. else
  281. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Textul are prea multe caractere (%d/109)." -1 3@
  282. end
  283. else
  284. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Textul trebuie sa aiba minim 25 de caractere (%d)." -1 3@
  285. end
  286. samp.CmdRet()
  287.  
  288.  
  289. :live_two_check
  290. if and
  291. 28@ == 1
  292. 29@ == 1
  293. then
  294. alloc 6@ 600
  295. alloc 16@ 600
  296. 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "first"
  297. 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "second"
  298. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Vizualizare texte introduse:" -1
  299. chatmsg "%s" -1 6@
  300. chatmsg "%s" -1 16@
  301. free 6@
  302. free 16@
  303. else
  304. if and
  305. not 28@ == 1
  306. not 29@ == 1
  307. then
  308. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Introdu intai mesajele folosind [/l1] si [/l2]." -1
  309. else
  310. if
  311. not 28@ == 1
  312. then
  313. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Primul text nu a fost introdus folosind comanda [/l1]." -1
  314. alloc 16@ 600
  315. 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "second"
  316. chatmsg "%s" -1 16@
  317. free 16@
  318. else
  319. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Al doilea text nu a fost introdus folosind comanda [/l2]." -1
  320. alloc 6@ 600
  321. 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "first"
  322. chatmsg "%s" -1 6@
  323. free 6@
  324. end
  325. end
  326. end
  327. samp.CmdRet()
  328.  
  329.  
  330. :live_two_send
  331. if and
  332. 28@ == 1
  333. 29@ == 1
  334. then
  335. alloc 6@ 600
  336. alloc 16@ 600
  337. 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "first"
  338. 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "second"
  339. say " /l %s" 6@
  340. say " /l %s" 16@
  341. free 6@
  342. free 16@
  343. 0B00: delete_file "cleo\nr_help_live.ini"
  344. 28@ = 0
  345. 29@ = 0
  346. else
  347. if and
  348. not 28@ == 1
  349. not 29@ == 1
  350. then
  351. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Introdu intai mesajele folosind [/l1] si [/l2]." -1
  352. else
  353. if
  354. not 28@ == 1
  355. then
  356. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Primul text nu a fost introdus folosind comanda [/l1]." -1
  357. alloc 16@ 600
  358. 0AF4: 16@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "second"
  359. chatmsg "%s" -1 16@
  360. free 16@
  361. else
  362. chatmsg "{C2A2DA}[Small NR Helper]{9ACD32} [LIVE]{FFFFFF} Al doilea text nu a fost introdus folosind comanda [/l2]." -1
  363. alloc 6@ 600
  364. 0AF4: 6@ = read_string_from_ini_file "cleo\nr_help_live.ini" section "LIVE" key "first"
  365. chatmsg "%s" -1 6@
  366. free 6@
  367. end
  368. end
  369. end
  370. samp.CmdRet()
  371.  
  372.  
  373. :strlen
  374. {
  375. Example: 0AB1: @strlen 1 string 1@ _returned: size 3@
  376. In: 0@ - text;
  377. Out: 1@ - size;
  378. }
  379. for 1@ = 0 to 1024
  380. 0A8D: 2@ = read_memory 0@ size 1 virtual_protect 0
  381. if not 2@ == 0
  382. jf break
  383. 0@ += 1
  384. end
  385. 0AB2: ret 1 1@
  386.  
  387.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement