Guest User

PCMDS 0.3e

a guest
Nov 2nd, 2012
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.14 KB | None | 0 0
  1. //---------------------------------------------------------------------------------------------//
  2. //PERSONAL COMMANDS FOR PLAYERS
  3.  
  4.  
  5. //© COPYRIGHT
  6.  
  7.  
  8.  
  9. // This is a comment
  10. // uncomment the line below if you want to write a filterscript
  11. //#define FILTERSCRIPT
  12.  
  13. #include <a_samp>
  14.  
  15.  
  16. #if defined FILTERSCRIPT
  17. #define LIGHTGREEN 0x38FF06FF
  18. #define LIGHTBLUE2 0xF6BB0AA
  19. #define LIGHTBLUE 0x0BBF6AA
  20. #define COLOR_GREEN 0x33AA33AA
  21. #define COLOR_PINK 0xFF66FFAA
  22. #define COLOR_BLUE 0x0000BBAA
  23. #define COLOR_PURPLE 0x800080AA
  24. #define COLOR_BLACK 0x000000AA
  25. #define COLOR_WHITE 0xFFFFFFAA
  26. #define COLOR_GREEN1 0x33AA33AA
  27. #define COLOR_BROWN 0xA52A2AAA
  28. #define blue 0x375FFFFF
  29. #define BlueMsg 0x0BBF6AA
  30. #define white 0xFFFFFFAA
  31. #define red 0xFF0000AA
  32. #define lightred 0xFB0000AA
  33. #define green 0x33FF33AA
  34. #define yellow 0xFFFF00AA
  35. #define grey 0xC0C0C0AA
  36. #define Green1 0x129E12FF
  37. #define Green2 0x53D212FF
  38. #define blue1 0x2641FEAA
  39. #define orange 0xFF9900AA
  40. #define black 0x2C2727AA
  41. public OnFilterScriptInit()
  42. {
  43. print("\n--------------------------------------");
  44. print(" pcmds");
  45. print("--------------------------------------\n");
  46. return 1;
  47. }
  48.  
  49. public OnFilterScriptExit()
  50. {
  51. return 1;
  52. }
  53.  
  54. #else
  55.  
  56. main()
  57. {
  58. print("\n----------------------------------");
  59. print(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  60. print(" pcmds");
  61. print(" Loading:Personal commands have loaded");
  62. print(" Ready:Peronal commands are ready for use!");
  63. print(" Weapons:Weapons are ready for use!");
  64. print(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  65. print("----------------------------------\n");
  66. }
  67.  
  68. #endif
  69.  
  70. public OnPlayerCommandText(playerid, cmdtext[])
  71. {
  72. if (strcmp("/midnight", cmdtext, true, 10) == 0)
  73. {
  74. SetPlayerTime(playerid,0,0);
  75. SendClientMessage(playerid, 0x375FFFFF, "{TIME}You have been changed your time to 00:00");
  76. return 1;
  77. }
  78.  
  79. if (strcmp("/noon", cmdtext, true, 10) == 0)
  80. {
  81. SetPlayerTime(playerid,12,0);
  82. SendClientMessage(playerid, 0x375FFFFF, "{TIME}You have been changed your time to 12:00");
  83. return 1;
  84. }
  85. if (strcmp("/pcmds", cmdtext, true, 10) == 0)
  86. {
  87. SendClientMessage(playerid, 0xFF9900AA, "{PCMDS HELP}The commands for the time are :/morning,/noon,/midnight");
  88. SendClientMessage(playerid, 0xFF9900AA, "{PCMDS HELP}The commands for the weapons are :/ak-47,/m4,/sniper,/baseball,/knife,/poolcue");
  89. SendClientMessage(playerid, 0xFF9900AA, "{PCMDS HELP}The commands for the weapons are :/9mm,/desert,/shotgun,/combat,/uzi,/mp5");
  90. SendClientMessage(playerid, 0xFF9900AA, "{PCMDS HELP}The commands for the weathers are :/bluesky,/stormy,/foggy,/sandstrom,/hot");
  91. SendClientMessage(playerid, 0xFF9900AA, "{PCMDS HELP}The commands for the health/armour are :/heal/kill/armour/halfarmour");
  92. SendClientMessage(playerid, 0xFF9900AA, "{PCMDS HELP}The commands for your colour name are :/red/black,/lightblue,/purple,/yellow");
  93. SendClientMessage(playerid, 0xFF9900AA, "{PCMDS HELP}The commands for skin are :/janitor/airportman,/beachman/bmxer,/warker,/mechanic,/biker 1/2,/pilot");
  94. return 1;
  95. }
  96. if (strcmp("/morning", cmdtext, true, 10) == 0)
  97. {
  98. SetPlayerTime(playerid,6,0);
  99. SendClientMessage(playerid, 0x375FFFFF, "{TIME}You have been changed your time to 6:00");
  100. return 1;
  101. }
  102. if (strcmp("/heal", cmdtext, true, 10) == 0)
  103. {
  104. SetPlayerHealth(playerid, 100);
  105. SendClientMessage(playerid, 0x375FFFFF, "{HEAL}You have been full healed and you lost 400$ for your treatment");
  106. GivePlayerMoney(playerid, -400);
  107. return 1;
  108. }
  109. if (strcmp("/kill", cmdtext, true, 10) == 0)
  110. {
  111. SetPlayerHealth(playerid, 0);
  112. SendClientMessage(playerid, 0x375FFFFF, "{KILL}You have been kill and you lost 400$ for your treatment");
  113. GivePlayerMoney(playerid, -400);
  114. return 1;
  115. }
  116. if (strcmp("/ak-47", cmdtext, true, 10) == 0)
  117. {
  118. SendClientMessage(playerid, 0xFF0000AA, "{WEAPON}This is your ak-47 and it coasts 400$");
  119. GivePlayerWeapon(playerid,30,10000);
  120. GivePlayerMoney(playerid, -400);
  121. return 1;
  122. }
  123. if (strcmp("/m4", cmdtext, true, 10) == 0)
  124. {
  125. SendClientMessage(playerid, 0xFF0000AA, "{WEAPON}This is your m4 and it coasts 500$");
  126. GivePlayerWeapon(playerid,31,10000);
  127. GivePlayerMoney(playerid, -500);
  128. return 1;
  129. }
  130. if (strcmp("/sniper", cmdtext, true, 10) == 0)
  131. {
  132. SendClientMessage(playerid, 0xFF0000AA, "{WEAPON}This is your sniper and it coasts 800$");
  133. GivePlayerWeapon(playerid,34,10000);
  134. GivePlayerMoney(playerid, -800);
  135. return 1;
  136. }
  137. if (strcmp("/baseball", cmdtext, true, 10) == 0)
  138. {
  139. SendClientMessage(playerid, 0xFF0000AA, "{WEAPON}This is your baseball and it coasts 50$");
  140. GivePlayerWeapon(playerid,5,10000);
  141. GivePlayerMoney(playerid, -50);
  142. return 1;
  143. }
  144. if (strcmp("/knife", cmdtext, true, 10) == 0)
  145. {
  146. SendClientMessage(playerid, 0xFF0000AA, "{WEAPON}This is your knife and it coasts 50$");
  147. GivePlayerWeapon(playerid,4,10000);
  148. GivePlayerMoney(playerid, -50);
  149. return 1;
  150. }
  151. if (strcmp("/poolcue", cmdtext, true, 10) == 0)
  152. {
  153. SendClientMessage(playerid, 0xFF0000AA, "{WEAPON}This is your poolcue and it coasts 80$");
  154. GivePlayerWeapon(playerid,7,10000);
  155. GivePlayerMoney(playerid, -80);
  156. return 1;
  157. }
  158. if (strcmp("/9mm", cmdtext, true, 10) == 0)
  159. {
  160. SendClientMessage(playerid, 0xFF0000AA, "{WEAPON}This is your 9mm and it coasts 200$");
  161. GivePlayerWeapon(playerid,22,10000);
  162. GivePlayerMoney(playerid, -200);
  163. return 1;
  164. }
  165. if (strcmp("/desert", cmdtext, true, 10) == 0)
  166. {
  167. SendClientMessage(playerid, 0xFF0000AA, "{WEAPON}This is your deserteagle and is coasts 200$");
  168. GivePlayerWeapon(playerid,24,10000);
  169. GivePlayerMoney(playerid, -200);
  170. return 1;
  171. }
  172. if (strcmp("/shotgun", cmdtext, true, 10) == 0)
  173. {
  174. SendClientMessage(playerid, 0xFF0000AA, "{WEAPON}This is your shotgun and it coasts 450$");
  175. GivePlayerWeapon(playerid,26,10000);
  176. GivePlayerMoney(playerid, -450);
  177. return 1;
  178. }
  179. if (strcmp("/combat", cmdtext, true, 10) == 0)
  180. {
  181. SendClientMessage(playerid, 0xFF0000AA, "{WEAPON}This is your combat shotgun and it coasts 550$");
  182. GivePlayerWeapon(playerid,27,10000);
  183. GivePlayerMoney(playerid, -550);
  184. return 1;
  185. }
  186. if (strcmp("/uzi", cmdtext, true, 10) == 0)
  187. {
  188. SendClientMessage(playerid, 0xFF0000AA, "{WEAPON}This is your uzi and it coasts 380$");
  189. GivePlayerWeapon(playerid,28,10000);
  190. GivePlayerMoney(playerid, -380);
  191. return 1;
  192. }
  193. if (strcmp("/mp5", cmdtext, true, 10) == 0)
  194. {
  195. SendClientMessage(playerid, 0xFF0000AA, "{WEAPON}This is your mp5 and it coasts 450$");
  196. GivePlayerWeapon(playerid,29,10000);
  197. GivePlayerMoney(playerid, -450);
  198. return 1;
  199. }
  200. if (strcmp("/bluesky", cmdtext, true, 10) == 0)
  201. {
  202. SendClientMessage(playerid, 0xA52A2AAA, "{WEATHER}Your weather have been changed to:Blue Sky!");
  203. SetPlayerWeather(playerid, 0);
  204. return 1;
  205. }
  206. if (strcmp("/stormy", cmdtext, true, 10) == 0)
  207. {
  208. SendClientMessage(playerid, 0xA52A2AAA, "{WEATHER}Your weather have been changed to:Stormy!");
  209. SetPlayerWeather(playerid, 08);
  210. return 1;
  211. }
  212. if (strcmp("/foggy", cmdtext, true, 10) == 0)
  213. {
  214. SendClientMessage(playerid, 0xA52A2AAA, "{WEATHER}Your weather have been changed to:Foggy!");
  215. SetPlayerWeather(playerid, 09);
  216. return 1;
  217. }
  218. if (strcmp("/sandstrom", cmdtext, true, 10) == 0)
  219. {
  220. SendClientMessage(playerid, 0xA52A2AAA, "{WEATHER}Your weather have been changed to:Sandstrom!");
  221. SetPlayerWeather(playerid, 19);
  222. return 1;
  223. }
  224. if (strcmp("/hot", cmdtext, true, 10) == 0)
  225. {
  226. SendClientMessage(playerid, 0xA52A2AAA, "{WEATHER}Your weather have been changed to:Hot!(Weather does have any cloud)");
  227. SetPlayerWeather(playerid, 17);
  228. return 1;
  229. }
  230. if (strcmp("/armour", cmdtext, true, 10) == 0)
  231. {
  232. SetPlayerArmour(playerid, 100);
  233. SendClientMessage(playerid, 0x375FFFFF, "{ARMOUR}You have set your armour at 100 and you lost 200$");
  234. GivePlayerMoney(playerid, -200);
  235. return 1;
  236. }
  237. if (strcmp("/halfarmour", cmdtext, true, 10) == 0)
  238. {
  239. SetPlayerArmour(playerid, 100);
  240. SendClientMessage(playerid, 0x375FFFFF, "{ARMOUR}You have set your armour at 50 and you lost 80$");
  241. GivePlayerMoney(playerid, -80);
  242. return 1;
  243. }
  244. if (strcmp("/red", cmdtext, true, 10) == 0)
  245. {
  246. SetPlayerColor(playerid, 3);
  247. SendClientMessage(playerid, 0x375FFFFF, "{COLOR}You have set your colour to:Red ");
  248. return 1;
  249. }
  250. if (strcmp("/black", cmdtext, true, 10) == 0)
  251. {
  252. SetPlayerColor(playerid, 0);
  253. SendClientMessage(playerid, 0x375FFFFF, "{COLOR}You have set your colour to:Black ");
  254. return 1;
  255. }
  256. if (strcmp("/lightblue", cmdtext, true, 10) == 0)
  257. {
  258. SetPlayerColor(playerid, 1);
  259. SendClientMessage(playerid, 0x375FFFFF, "{COLOR}You have set your colour to:Lightblue ");
  260. return 1;
  261. }
  262. if (strcmp("/purple", cmdtext, true, 10) == 0)
  263. {
  264. SetPlayerColor(playerid, 5);
  265. SendClientMessage(playerid, 0x375FFFFF, "{COLOR}You have set your colour to:Purple ");
  266. return 1;
  267. }
  268. if (strcmp("/yellow", cmdtext, true, 10) == 0)
  269. {
  270. SetPlayerColor(playerid, 6);
  271. SendClientMessage(playerid, 0x375FFFFF, "{COLOR}You have set your colour to:Yellow ");
  272. return 1;
  273. }
  274. if (strcmp("/janitor", cmdtext, true, 10) == 0)
  275. {
  276. SetPlayerSkin(playerid, 8);
  277. SendClientMessage(playerid, 0x375FFFFF, "{SKIN}You have set your skin janitor(id:8)");
  278. return 1;
  279. }
  280. if (strcmp("/airportman", cmdtext, true, 10) == 0)
  281. {
  282. SetPlayerSkin(playerid, 16);
  283. SendClientMessage(playerid, 0x375FFFFF, "{SKIN}You have set your skin airportman(id:16)");
  284. return 1;
  285. }
  286. if (strcmp("/beachman", cmdtext, true, 10) == 0)
  287. {
  288. SetPlayerSkin(playerid, 18);
  289. SendClientMessage(playerid, 0x375FFFFF, "{SKIN}You have set your skin beachman(id:18)");
  290. return 1;
  291. }
  292. if (strcmp("/bmxer", cmdtext, true, 10) == 0)
  293. {
  294. SetPlayerSkin(playerid, 23);
  295. SendClientMessage(playerid, 0x375FFFFF, "{SKIN}You have set your skin bmxer(id:23)");
  296. return 1;
  297. }
  298. if (strcmp("/warker", cmdtext, true, 10) == 0)
  299. {
  300. SetPlayerSkin(playerid, 27);
  301. SendClientMessage(playerid, 0x375FFFFF, "{SKIN}You have set your skin warker(id:27)");
  302. return 1;
  303. }
  304. if (strcmp("/mechanic", cmdtext, true, 10) == 0)
  305. {
  306. SetPlayerSkin(playerid, 50);
  307. SendClientMessage(playerid, 0x375FFFFF, "{SKIN}You have set your skin mechanic(id:50)");
  308. return 1;
  309. }
  310. if (strcmp("/biker 1", cmdtext, true, 10) == 0)
  311. {
  312. SetPlayerSkin(playerid, 51);
  313. SendClientMessage(playerid, 0x375FFFFF, "{SKIN}You have set your skin biker(id:51)");
  314. return 1;
  315. }
  316. if (strcmp("/biker 2", cmdtext, true, 10) == 0)
  317. {
  318. SetPlayerSkin(playerid, 52);
  319. SendClientMessage(playerid, 0x375FFFFF, "{SKIN}You have set your skin biker(id:52)");
  320. return 1;
  321. }
  322. if (strcmp("/pilot", cmdtext, true, 10) == 0)
  323. {
  324. SetPlayerSkin(playerid, 61);
  325. SendClientMessage(playerid, 0x375FFFFF, "{SKIN}You have set your skin pilot(id:61)");
  326. return 1;
  327. }
  328. return 0;
  329. }
Advertisement
Add Comment
Please, Sign In to add comment