Advertisement
Guest User

Untitled

a guest
Jul 9th, 2013
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.71 KB | None | 0 0
  1. #include <a_samp>
  2. #include <ZCMD>
  3. #include <sscanf2>
  4.  
  5. #define COLOR_RED 0xFF4A4AFF
  6. #define COLOR_YELLOW 0xF8FF1FFF
  7. #define COLOR_GREY 0xCCC8C8FF
  8.  
  9. enum pInfo
  10. {
  11. pAdmin, // Admin enumation
  12. pMuted, // Mute animation
  13. pICAuthenticated // If he's allowed to say things IC'ly, meaning, the SCS won't check him.
  14. }
  15. new PlayerInfo[MAX_PLAYERS][pInfo];
  16. new pMoney;
  17.  
  18. main()
  19. {
  20. print("\n----------------------------------");
  21. print(" Smart Checker System V1.2");
  22. print("----------------------------------\n");
  23. }
  24.  
  25. public OnPlayerText(playerid, text[]) // Gets called when a player uses IC chat.
  26. {
  27. if(strcmp(text, "lol", true) ==0)
  28. {
  29. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  30. {
  31. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  32. {
  33. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  34. {
  35. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  36. new str[128];
  37. pMoney = GetPlayerMoney(playerid);
  38. GivePlayerMoney(playerid, pMoney-100);
  39. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  40. SendClientMessageToAll(COLOR_RED, str);
  41. }
  42. }
  43. }
  44. return 0;
  45. }
  46. else if(strcmp(text, "rofl", true)==0)
  47. {
  48. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  49. {
  50. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  51. {
  52. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  53. {
  54. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  55. new str[128];
  56. pMoney = GetPlayerMoney(playerid);
  57. GivePlayerMoney(playerid, pMoney-100);
  58. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  59. SendClientMessageToAll(COLOR_RED, str);
  60. }
  61. }
  62. }
  63. return 0;
  64. }
  65. else if(strcmp(text, "lmao", true)==0)
  66. {
  67. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  68. {
  69. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  70. {
  71. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  72. {
  73. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  74. new str[128];
  75. pMoney = GetPlayerMoney(playerid);
  76. GivePlayerMoney(playerid, pMoney-100);
  77. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  78. SendClientMessageToAll(COLOR_RED, str);
  79. }
  80. }
  81. }
  82. return 0;
  83. }
  84. else if(strcmp(text, "lmfao", true)==0)
  85. {
  86. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  87. {
  88. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  89. {
  90. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  91. {
  92. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  93. new str[128];
  94. pMoney = GetPlayerMoney(playerid);
  95. GivePlayerMoney(playerid, pMoney-100);
  96. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  97. SendClientMessageToAll(COLOR_RED, str);
  98. }
  99. }
  100. }
  101. return 0;
  102. }
  103. else if(strcmp(text, "xd", true)==0)
  104. {
  105. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  106. {
  107. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  108. {
  109. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  110. {
  111. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  112. new str[128];
  113. pMoney = GetPlayerMoney(playerid);
  114. GivePlayerMoney(playerid, pMoney-100);
  115. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  116. SendClientMessageToAll(COLOR_RED, str);
  117. }
  118. }
  119. }
  120. return 0;
  121. }
  122. else if(strcmp(text, "noob", true)==0)
  123. {
  124. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  125. {
  126. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  127. {
  128. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  129. {
  130. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  131. new str[128];
  132. pMoney = GetPlayerMoney(playerid);
  133. GivePlayerMoney(playerid, pMoney-100);
  134. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  135. SendClientMessageToAll(COLOR_RED, str);
  136. }
  137. }
  138. }
  139. return 0;
  140. }
  141. else if(strcmp(text, "((", true)==0)
  142. {
  143. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  144. {
  145. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  146. {
  147. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  148. {
  149. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  150. new str[128];
  151. pMoney = GetPlayerMoney(playerid);
  152. GivePlayerMoney(playerid, pMoney-100);
  153. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: attempting to use brackets in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  154. SendClientMessageToAll(COLOR_RED, str);
  155. }
  156. }
  157. }
  158. return 0;
  159. }
  160. else if(strcmp(text, "))", true)==0)
  161. {
  162. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  163. {
  164. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  165. {
  166. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  167. {
  168. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  169. new str[128];
  170. pMoney = GetPlayerMoney(playerid);
  171. GivePlayerMoney(playerid, pMoney-100);
  172. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: attempting to use brackets in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  173. SendClientMessageToAll(COLOR_RED, str);
  174. }
  175. }
  176. }
  177. return 0;
  178. }
  179. else if(strcmp(text, "fu", true)==0)
  180. {
  181. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  182. {
  183. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  184. {
  185. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  186. {
  187. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  188. new str[128];
  189. pMoney = GetPlayerMoney(playerid);
  190. GivePlayerMoney(playerid, pMoney-100);
  191. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  192. SendClientMessageToAll(COLOR_RED, str);
  193. }
  194. }
  195. }
  196. return 0;
  197. }
  198. else if(strcmp(text, "awk", true)==0) // I MADE THIS JUST FOR JOHN JENKINS LOL!
  199. {
  200. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  201. {
  202. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  203. {
  204. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  205. {
  206. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  207. new str[128];
  208. pMoney = GetPlayerMoney(playerid);
  209. GivePlayerMoney(playerid, pMoney-100);
  210. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  211. SendClientMessageToAll(COLOR_RED, str);
  212. }
  213. }
  214. }
  215. return 0;
  216. }
  217. else if(strcmp(text, "brb", true)==0)
  218. {
  219. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  220. {
  221. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  222. {
  223. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  224. {
  225. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  226. new str[128];
  227. pMoney = GetPlayerMoney(playerid);
  228. GivePlayerMoney(playerid, pMoney-100);
  229. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  230. SendClientMessageToAll(COLOR_RED, str);
  231. }
  232. }
  233. }
  234. return 0;
  235. }
  236. else if(strcmp(text, "afk", true)==0)
  237. {
  238. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  239. {
  240. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  241. {
  242. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  243. {
  244. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  245. new str[128];
  246. pMoney = GetPlayerMoney(playerid);
  247. GivePlayerMoney(playerid, pMoney-100);
  248. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  249. SendClientMessageToAll(COLOR_RED, str);
  250. }
  251. }
  252. }
  253. return 0;
  254. }
  255. else if(strcmp(text, "derp", true)==0)
  256. {
  257. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  258. {
  259. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  260. {
  261. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  262. {
  263. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  264. new str[128];
  265. pMoney = GetPlayerMoney(playerid);
  266. GivePlayerMoney(playerid, pMoney-100);
  267. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  268. SendClientMessageToAll(COLOR_RED, str);
  269. }
  270. }
  271. }
  272. return 0;
  273. }
  274. else if(strcmp(text, ":d", true)==0)
  275. {
  276. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  277. {
  278. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  279. {
  280. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  281. {
  282. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  283. new str[128];
  284. pMoney = GetPlayerMoney(playerid);
  285. GivePlayerMoney(playerid, pMoney-100);
  286. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  287. SendClientMessageToAll(COLOR_RED, str);
  288. }
  289. }
  290. }
  291. return 0;
  292. }
  293. else if(strcmp(text, "newfag", true)==0)
  294. {
  295. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  296. {
  297. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  298. {
  299. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  300. {
  301. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  302. new str[128];
  303. pMoney = GetPlayerMoney(playerid);
  304. GivePlayerMoney(playerid, pMoney-100);
  305. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  306. SendClientMessageToAll(COLOR_RED, str);
  307. }
  308. }
  309. }
  310. return 0;
  311. }
  312. else if(strcmp(text, "newfags", true)==0)
  313. {
  314. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  315. {
  316. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  317. {
  318. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  319. {
  320. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  321. new str[128];
  322. pMoney = GetPlayerMoney(playerid);
  323. GivePlayerMoney(playerid, pMoney-100);
  324. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  325. SendClientMessageToAll(COLOR_RED, str);
  326. }
  327. }
  328. }
  329. return 0;
  330. }
  331. else if(strcmp(text, "noobs", true)==0)
  332. {
  333. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  334. {
  335. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  336. {
  337. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  338. {
  339. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  340. new str[128];
  341. pMoney = GetPlayerMoney(playerid);
  342. GivePlayerMoney(playerid, pMoney-100);
  343. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  344. SendClientMessageToAll(COLOR_RED, str);
  345. }
  346. }
  347. }
  348. return 0;
  349. }
  350. else if(strcmp(text, "( (", true)==0)
  351. {
  352. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  353. {
  354. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  355. {
  356. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  357. {
  358. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  359. new str[128];
  360. pMoney = GetPlayerMoney(playerid);
  361. GivePlayerMoney(playerid, pMoney-100);
  362. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: attempting to use brackets in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  363. SendClientMessageToAll(COLOR_RED, str);
  364. }
  365. }
  366. }
  367. return 0;
  368. }
  369. else if(strcmp(text, ") )", true)==0)
  370. {
  371. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  372. {
  373. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  374. {
  375. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  376. {
  377. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  378. new str[128];
  379. pMoney = GetPlayerMoney(playerid);
  380. GivePlayerMoney(playerid, pMoney-1000);
  381. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: attempting to use brackets in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  382. SendClientMessageToAll(COLOR_RED, str);
  383. }
  384. }
  385. }
  386. return 0;
  387. }
  388. else if(strcmp(text, "DM", true)==0)
  389. {
  390. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  391. {
  392. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  393. {
  394. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  395. {
  396. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  397. new str[128];
  398. pMoney = GetPlayerMoney(playerid);
  399. GivePlayerMoney(playerid, pMoney-1000);
  400. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  401. SendClientMessageToAll(COLOR_RED, str);
  402. }
  403. }
  404. }
  405. return 0;
  406. }
  407. else if(strcmp(text, "DMer", true)==0)
  408. {
  409. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  410. {
  411. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  412. {
  413. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  414. {
  415. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  416. new str[128];
  417. pMoney = GetPlayerMoney(playerid);
  418. GivePlayerMoney(playerid, pMoney-1000);
  419. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  420. SendClientMessageToAll(COLOR_RED, str);
  421. }
  422. }
  423. }
  424. return 0;
  425. }
  426. else if(strcmp(text, "RP", true)==0)
  427. {
  428. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  429. {
  430. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  431. {
  432. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  433. {
  434. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  435. new str[128];
  436. pMoney = GetPlayerMoney(playerid);
  437. GivePlayerMoney(playerid, pMoney-1000);
  438. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  439. SendClientMessageToAll(COLOR_RED, str);
  440. }
  441. }
  442. }
  443. return 0;
  444. }
  445. else if(strcmp(text, "nonRP", true)==0)
  446. {
  447. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  448. {
  449. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  450. {
  451. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  452. {
  453. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  454. new str[128];
  455. pMoney = GetPlayerMoney(playerid);
  456. GivePlayerMoney(playerid, pMoney-1000);
  457. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: using non-Roleplay words in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  458. SendClientMessageToAll(COLOR_RED, str);
  459. }
  460. }
  461. }
  462. return 0;
  463. }
  464. else if(strcmp(text, "[[", true)==0)
  465. {
  466. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  467. {
  468. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  469. {
  470. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  471. {
  472. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  473. new str[128];
  474. pMoney = GetPlayerMoney(playerid);
  475. GivePlayerMoney(playerid, pMoney-1000);
  476. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: attempting to use brackets in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  477. SendClientMessageToAll(COLOR_RED, str);
  478. }
  479. }
  480. }
  481. return 0;
  482. }
  483. else if(strcmp(text, "]]", true)==0)
  484. {
  485. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  486. {
  487. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  488. {
  489. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  490. {
  491. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  492. new str[128];
  493. pMoney = GetPlayerMoney(playerid);
  494. GivePlayerMoney(playerid, pMoney-1000);
  495. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: attempting to use brackets in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  496. SendClientMessageToAll(COLOR_RED, str);
  497. }
  498. }
  499. }
  500. return 0;
  501. }
  502. else if(strcmp(text, "[ [", true)==0)
  503. {
  504. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  505. {
  506. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  507. {
  508. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  509. {
  510. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  511. new str[128];
  512. pMoney = GetPlayerMoney(playerid);
  513. GivePlayerMoney(playerid, pMoney-1000);
  514. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: attempting to use brackets in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  515. SendClientMessageToAll(COLOR_RED, str);
  516. }
  517. }
  518. }
  519. return 0;
  520. }
  521. else if(strcmp(text, "] ]", true)==0)
  522. {
  523. if(PlayerInfo[playerid][pAdmin] == 0) // If he ain't an administrator.
  524. {
  525. if(PlayerInfo[playerid][pMuted] == 0) // If he ain't muted.
  526. {
  527. if(PlayerInfo[playerid][pICAuthenticated] == 0) // if he ain't authenticated to use the word IC'ly.
  528. {
  529. SendClientMessage(playerid, COLOR_GREY, "You cannot use such words on IC chat!");
  530. new str[128];
  531. pMoney = GetPlayerMoney(playerid);
  532. GivePlayerMoney(playerid, pMoney-1000);
  533. format(str, sizeof(str), "AdmCmd: %s %s has been fined 1000$ by S.C.S, Reason: attempting to use brackets in IC chat.", GetPlayerFirstName(playerid), GetPlayerLastName(playerid));
  534. SendClientMessageToAll(COLOR_RED, str);
  535. }
  536. }
  537. }
  538. return 0;
  539. }
  540. return 1;
  541. }
  542. stock GetPlayerFirstName(playerid)
  543. {
  544. new
  545. namestring[2][MAX_PLAYER_NAME],
  546. name[MAX_PLAYER_NAME];
  547.  
  548. GetPlayerName(playerid,name,MAX_PLAYER_NAME);
  549. split(name, namestring, '_');
  550. return namestring[0];
  551. }
  552.  
  553. stock GetPlayerLastName(playerid)
  554. {
  555. new
  556. namestring[2][MAX_PLAYER_NAME],
  557. name[MAX_PLAYER_NAME];
  558.  
  559. GetPlayerName(playerid,name,MAX_PLAYER_NAME);
  560. split(name, namestring, '_');
  561. return namestring[1];
  562. }
  563.  
  564. stock split(const strsrc[], strdest[][], delimiter)
  565. {
  566. new i, li;
  567. new aNum;
  568. new len;
  569. while(i <= strlen(strsrc)){
  570. if(strsrc[i]==delimiter || i==strlen(strsrc)){
  571. len = strmid(strdest[aNum], strsrc, li, i, 128);
  572. strdest[aNum][len] = 0;
  573. li = i+1;
  574. aNum++;
  575. }
  576. i++;
  577. }
  578. return 1;
  579. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement