Guest User

Star_Minigame

a guest
Apr 13th, 2011
2,185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. /*
  2. +++++++++++++++++++++++++++++++++++++++++++++++++++++
  3. # SSSSS SS SS SSSS SSSS SSSSSS SS SS #
  4. # SS SS SS SS SS SS SS SS SS SS SS SS #
  5. # SS SS SS SS SS SS SS SS SS SS SS #
  6. # SS SSSSSS SS SS SS SS SSSS SSSS #
  7. # SSSSSS SS SS SS SS SS SS SS SS SS #
  8. # SS SS SS SS SS SS SS SS SS SS #
  9. # SS SS SS SS SS SS SS SS SS SS SS #
  10. # SSSSS SS SS SSSS SSSS SSSSS SSSS #
  11. #:::::::::::::::::::::::::::::::::::::::::::::::::::#
  12. +++++++++++++++++++++++++++++++++++++++++++++++++++++
  13.  
  14. Star Minigame by ShOoBy.
  15. Don't change any Credits.
  16. ShOoBy's Scripts™ © 2011
  17.  
  18. */
  19.  
  20. #define FILTERSCRIPT//remember...this is a filterscript!!!
  21.  
  22. #include <a_samp>//you must have these include!
  23.  
  24. #if defined FILTERSCRIPT
  25.  
  26. #define COLOR_RED 0xAA3333AA//need to define this color for the STAR command
  27. #define COLOR_BLUE 0x3A47DEFF//and this one for the dialog response negative
  28.  
  29. new Star;//names our pickup
  30.  
  31. public OnFilterScriptInit()
  32. {
  33. print("\n--------------------------------------");
  34. print(" Find The Star - by ShOoBy ");//dont change theese
  35. print("--------------------------------------\n");
  36. return 1;
  37. }
  38.  
  39.  
  40. public OnFilterScriptExit()
  41. {
  42. print("\n <<<< Unloaded Star Minigame >>>> \n");//the FilterScript was unloaded
  43. return 1;
  44. }
  45.  
  46.  
  47. public OnPlayerCommandText(playerid, cmdtext[])
  48. {
  49. if (strcmp("/star", cmdtext, true, 10) == 0)
  50. {
  51. if(IsPlayerAdmin(playerid)) {//veryfies if our player is an rcon admin
  52. ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"{FA0C0C}Star Command Panel", "{070FEF}Do you want to place a hidden {E8EF07}STAR{070FEF}\nhere for the event?", "Yes", "No");//the dialog
  53. } else {
  54. SendClientMessage(playerid, COLOR_RED, "Only an Admin can use this command.");//says to a normal player that just a rcon can use this commands
  55. }
  56. return 1;
  57. }
  58. if (strcmp("/scredits", cmdtext, true, 10) == 0)
  59. {
  60. ShowPlayerDialog(playerid,33,DIALOG_STYLE_MSGBOX, "{F5ED06}Star{06F5DD} Minigame Credits", "{0639F5}Made by {06F50D}ShOoBy","Ok","");//dont remove this line!!!!!!!!!!!!!!!!
  61. return 1;
  62. }
  63. return 0;
  64. }
  65.  
  66.  
  67. public OnPlayerPickUpPickup(playerid, pickupid)//when player enters pickup
  68. {
  69. if(pickupid == Star){
  70. DestroyPickup(Star);//destroys the pickup
  71. new str[128];
  72. GetPlayerName(playerid, str, sizeof(str));//we get the winner name
  73. format(str, sizeof(str), "~R~ %s ~B~has found the ~N~hidden ~Y~Star", str);
  74. GameTextForAll(str,3000,1);//announce all who the winner is
  75. print("\n------------Star Minigame Ended----------\n");
  76. }
  77. return 1;
  78. }
  79.  
  80.  
  81. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])//response to the dialg of /star
  82. {
  83. if(dialogid == 10)
  84. {
  85. new Float:x, Float:y, Float:z;//defines our coordonates
  86. if(response)
  87. {
  88. GetPlayerPos(playerid, x, y, z);//takes the coordonates
  89. Star = CreatePickup(1247, 23, x+2, y, z);//places the pickup
  90. SendClientMessage(playerid, COLOR_BLUE, "Pickup have been placed");//announcement
  91. } else {
  92. SendClientMessage(playerid, COLOR_BLUE, "Pickup haven't been placed");//announcement
  93. }
  94. }
  95. return 1;
  96. }
  97.  
  98. #endif
  99.  
  100. //-----------------------------------------------THE END-----------------------------------------------//
Advertisement
Add Comment
Please, Sign In to add comment