MrKakashi

Kakashi Simple Command

Aug 14th, 2011
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.59 KB | None | 0 0
  1. // Simple Commands By Mr.Kakashi
  2. // Script By Mr.Kakashi
  3. // Copyright 2011
  4. // Great for Beginners
  5. //
  6.  
  7. //Dont Remove Credits!
  8.  
  9. #include <a_samp>
  10.  
  11. //Define Colors
  12.  
  13. #define COLOR_LIGHTBLUE 0x33CCFFAA
  14. #define COLOR_RED 0xFF0000FF
  15. #define COLOR_GREY 0xAFAFAFAA
  16. #define COLOR_YELLOW 0xFFFF00AA
  17. #define COLOR_PINK 0xFF66FFAA
  18. #define COLOR_BLUE 0x0000BBAA
  19. #define COLOR_WHITE 0xFFFFFFAA
  20. #define COLOR_DARKRED 0x660000AA
  21. #define COLOR_ORANGE 0xFF9900AA
  22. #define COLOR_BRIGHTRED 0xFF0000AA
  23. #define COLOR_INDIGO 0x4B00B0AA
  24. #define COLOR_VIOLET 0x9955DEEE
  25. #define COLOR_LIGHTRED 0xFF99AADD
  26. #define COLOR_SEAGREEN 0x00EEADDF
  27. #define COLOR_GRAYWHITE 0xEEEEFFC4
  28. #define COLOR_LIGHTNEUTRALBLUE 0xabcdef66
  29. #define COLOR_GREENISHGOLD 0xCCFFDD56
  30. #define COLOR_LIGHTBLUEGREEN 0x0FFDD349
  31. #define COLOR_NEUTRALBLUE 0xABCDEF01
  32. #define COLOR_LIGHTCYAN 0xAAFFCC33
  33. #define COLOR_LEMON 0xDDDD2357
  34. #define COLOR_MEDIUMBLUE 0x63AFF00A
  35. #define COLOR_NEUTRAL 0xABCDEF97
  36. #define COLOR_BLACK 0x00000000
  37. #define COLOR_NEUTRALGREEN 0x81CFAB00
  38. #define COLOR_DARKGREEN 0x12900BBF
  39. #define COLOR_LIGHTGREEN 0x24FF0AB9
  40. #define COLOR_DARKBLUE 0x300FFAAB
  41. #define COLOR_BLUEGREEN 0x46BBAA00
  42. #define COLOR_PINK 0xFF66FFAA
  43. #define COLOR_LIGHTBLUE 0x33CCFFAA
  44. #define COLOR_DARKRED 0x660000AA
  45. #define COLOR_ORANGE 0xFF9900AA
  46. #define COLOR_PURPLE 0x800080AA
  47. #define COLOR_GRAD1 0xB4B5B7FF
  48. #define COLOR_GRAD2 0xBFC0C2FF
  49. #define COLOR_RED1 0xFF0000AA
  50. #define COLOR_GREY 0xAFAFAFAA
  51. #define COLOR_GREEN 0x33AA33AA
  52. #define COLOR_YELLOW 0xFFFF00AA
  53. #define COLOR_WHITE 0xFFFFFFAA
  54. #define COLOR_BROWN 0x993300AA
  55. #define COLOR_CYAN 0x99FFFFAA
  56. #define COLOR_TAN 0xFFFFCCAA
  57. #define COLOR_PINK 0xFF66FFAA
  58. #define COLOR_KHAKI 0x999900AA
  59. #define COLOR_LIME 0x99FF00AA
  60. #define COLOR_SYSTEM 0xEFEFF7AA
  61. #define COLOR_GRAD2 0xBFC0C2FF
  62. #define COLOR_GRAD4 0xD8D8D8FF
  63. #define COLOR_GRAD6 0xF0F0F0FF
  64. #define COLOR_GRAD2 0xBFC0C2FF
  65. #define COLOR_GRAD3 0xCBCCCEFF
  66. #define COLOR_GRAD5 0xE3E3E3FF
  67. #define COLOR_GRAD1 0xB4B5B7FF
  68.  
  69. #if defined FILTERSCRIPT
  70.  
  71. public OnFilterScriptInit()
  72. {
  73. print("\n--------------------------------------");
  74. print(" Simple Commands By Mr.Kakashi");
  75. print("--------------------------------------\n");
  76. return 1;
  77. }
  78.  
  79. public OnFilterScriptExit()
  80. {
  81. return 1;
  82. }
  83.  
  84. #else
  85. #endif
  86.  
  87. public OnPlayerCommandText(playerid, cmdtext[])
  88. {
  89. if(strcmp("/lol", cmdtext, true, 10) == 0)
  90. {
  91. new vehicleid = GetPlayerVehicleID(playerid);
  92. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"ERROR: You have to be in a vehicle");
  93. {
  94. RemovePlayerFromVehicle(playerid);
  95. SetVehicleHealth(vehicleid, 4.0);
  96. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  97. SendClientMessage(playerid, COLOR_RED, "OWNED!, Your Vehicle Has Been Destroy, You Have Been LOL Pranked");
  98. }
  99. return 1;
  100. }
  101.  
  102. if(strcmp("/parachute", cmdtext, true, 10) == 0)
  103. {
  104. GivePlayerWeapon(playerid, 46,100);
  105. SendClientMessage(playerid,COLOR_GREEN,"Enjoy with Your Parachute!");
  106. return 1;
  107. }
  108.  
  109. if(strcmp("/help", cmdtext, true, 10) == 0)
  110. {
  111. SendClientMessage(playerid,COLOR_WHITE,"Your Information Here!");
  112. return 1;
  113. }
  114.  
  115. if(strcmp(cmdtext, "/afk", true) == 0)
  116. {
  117. new pName[MAX_PLAYER_NAME];
  118. new string[128];
  119. GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  120. SendClientMessage(playerid, COLOR_WHITE,"You Are Now AFK");
  121. SendClientMessage(playerid, COLOR_WHITE,"Type /back when you are back to play");
  122. format(string, sizeof(string), "{FFFFFF}[SERVER]:{FAF623}%s is now AFK And Be Right Back",pName);
  123. SendClientMessageToAll(COLOR_YELLOW, string);
  124. TogglePlayerControllable(playerid, 0);
  125. SetPlayerHealth(playerid, 999999.999);
  126. return 1;
  127. }
  128.  
  129. if(strcmp(cmdtext, "/back", true) == 0)
  130. {
  131. new pName[MAX_PLAYER_NAME];
  132. new string[128];
  133. GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  134. SendClientMessage(playerid, COLOR_WHITE,"Welcome Back");
  135. format(string, sizeof(string), "{FFFFFF}[SERVER]:{FF002B}%s is back and able to play again",pName);
  136. SendClientMessageToAll(COLOR_RED, string);
  137. TogglePlayerControllable(playerid, 1);
  138. SetPlayerHealth(playerid, 100);
  139. return 1;
  140. }
  141.  
  142. if(!strcmp(cmdtext, "/me", true, 3))
  143. {
  144. new str[128];
  145. GetPlayerName(playerid, str, sizeof(str));
  146. format(str, sizeof(str), "%s %s", str, cmdtext[4]);
  147. SendClientMessageToAll(COLOR_YELLOW, str);
  148. return 1;
  149. }
  150.  
  151. if(strcmp("/kill", cmdtext, true, 10) == 0)
  152. {
  153. SetPlayerHealth(playerid, 0);
  154. return 1;
  155. }
  156. return 0;
  157. }
Advertisement
Add Comment
Please, Sign In to add comment