Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- +++++++++++++++++++++++++++++++++++++++++++++++++++++
- # SSSSS SS SS SSSS SSSS SSSSSS SS SS #
- # SS SS SS SS SS SS SS SS SS SS SS SS #
- # SS SS SS SS SS SS SS SS SS SS SS #
- # SS SSSSSS SS SS SS SS SSSS SSSS #
- # SSSSSS SS SS SS SS SS SS SS SS SS #
- # SS SS SS SS SS SS SS SS SS SS #
- # SS SS SS SS SS SS SS SS SS SS SS #
- # SSSSS SS SS SSSS SSSS SSSSS SSSS #
- #:::::::::::::::::::::::::::::::::::::::::::::::::::#
- +++++++++++++++++++++++++++++++++++++++++++++++++++++
- Star Minigame by ShOoBy.
- Don't change any Credits.
- ShOoBy's Scripts™ © 2011
- */
- #define FILTERSCRIPT//remember...this is a filterscript!!!
- #include <a_samp>//you must have these include!
- #if defined FILTERSCRIPT
- #define COLOR_RED 0xAA3333AA//need to define this color for the STAR command
- #define COLOR_BLUE 0x3A47DEFF//and this one for the dialog response negative
- new Star;//names our pickup
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Find The Star - by ShOoBy ");//dont change theese
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n <<<< Unloaded Star Minigame >>>> \n");//the FilterScript was unloaded
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/star", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid)) {//veryfies if our player is an rcon admin
- 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
- } else {
- SendClientMessage(playerid, COLOR_RED, "Only an Admin can use this command.");//says to a normal player that just a rcon can use this commands
- }
- return 1;
- }
- if (strcmp("/scredits", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid,33,DIALOG_STYLE_MSGBOX, "{F5ED06}Star{06F5DD} Minigame Credits", "{0639F5}Made by {06F50D}ShOoBy","Ok","");//dont remove this line!!!!!!!!!!!!!!!!
- return 1;
- }
- return 0;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)//when player enters pickup
- {
- if(pickupid == Star){
- DestroyPickup(Star);//destroys the pickup
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));//we get the winner name
- format(str, sizeof(str), "~R~ %s ~B~has found the ~N~hidden ~Y~Star", str);
- GameTextForAll(str,3000,1);//announce all who the winner is
- print("\n------------Star Minigame Ended----------\n");
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])//response to the dialg of /star
- {
- if(dialogid == 10)
- {
- new Float:x, Float:y, Float:z;//defines our coordonates
- if(response)
- {
- GetPlayerPos(playerid, x, y, z);//takes the coordonates
- Star = CreatePickup(1247, 23, x+2, y, z);//places the pickup
- SendClientMessage(playerid, COLOR_BLUE, "Pickup have been placed");//announcement
- } else {
- SendClientMessage(playerid, COLOR_BLUE, "Pickup haven't been placed");//announcement
- }
- }
- return 1;
- }
- #endif
- //-----------------------------------------------THE END-----------------------------------------------//
Advertisement
Add Comment
Please, Sign In to add comment