Guest User

Advanced Commands (Version 1.0)

a guest
Jan 1st, 2013
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. //----------------------------------------
  2. // Project Commands Advanced
  3. // Credits
  4. // - DJTunes
  5. // Information
  6. // - 4th of 5th Filterscript
  7. // - Going Deeper into the FS scripting game
  8. //----------------------------------------
  9. // Defines =
  10. #define FILTERSCRIPT
  11. #if defined FILTERSCRIPT
  12. //----------------------------------------
  13. // Includes =
  14. #include <a_samp>
  15. //----------------------------------------
  16. public OnFilterScriptInit()
  17. {
  18. print("\n--------------------------------------");
  19. print(" Advanced Commands Loading....... Load Complete!");
  20. print("--------------------------------------\n");
  21. return 1;
  22. }
  23. //----------------------------------------
  24. public OnFilterScriptExit()
  25. {
  26. print("\n--------------------------------------");
  27. print(" Advanced Commands Un-Loading....... Un-Load Complete!");
  28. print("--------------------------------------\n");
  29. return 1;
  30. }
  31. //----------------------------------------
  32. // Do not do anything with these:
  33. #else
  34. #endif
  35. //----------------------------------------
  36. // This section is what makes this filterscript work! :)
  37. public OnPlayerCommandText(playerid, cmdtext[])
  38. {
  39. if(strcmp(cmdtext, "/kickme", true) == 0)
  40. {
  41. //This command will kick the player who enters this command
  42. Kick(playerid);
  43. return 1;
  44. }
  45. if(strcmp("/killme", cmdtext, true))
  46. {
  47. //This command will kill the player who enters this command
  48. SetPlayerHealth(playerid, 0.0);
  49. return 1;
  50. }
  51. return 0;
  52. }
  53. //----------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment