[FilterScript] [MINIGAME] Find Star
#1

Find Star Minigame



I did the second filescript on today and is called Instant Star

In this minigame are spread out in a building and you have 2 minutes to find the star, who found the star score is 500!








You can get it here

Код:
#if defined Star

	                            ++++++++++++++++++++++++++++
										 Find Star
										 2013 v1
											by
									   G3n1uS
								++++++++++++++++++++++++++++
								Thank's for download
www.sa-mp.com

#endif
								
#include <a_samp>
#include <zcmd>
#include <sscanf2>
//+++++++++++++++++++
new
star,
star1,
star2,
star3,
star4,
star5;
//++++++++++++++++++++
new
time[MAX_PLAYERS];

public OnGameModeInit()
{
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    star = CreatePickup(1247, 2, 351.9480,216.4252,1008.3828, -1);
    star1 = CreatePickup(1247, 2, 359.0064,204.2957,1008.3828, -1);
    star2 = CreatePickup(1247, 2, 359.0064,204.2957,1008.3828, -1);
    star3 = CreatePickup(1247, 2, 340.8525,193.4400,1014.1875, -1);
    star4 = CreatePickup(1247, 2, 325.6719,164.1794,1014.1797, -1);
    star5 = CreatePickup(1247, 2, 347.5160,162.2492,1014.1875, -1);
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	return 1;
}

CMD:star(playerid,params[])
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,384.808624,173.804992,1008.382812);
SetTimerEx("times", 2000, 0, "d", playerid);
SetTimerEx("stop", 200000, 0, "d", playerid);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if (pickupid == star)
	{
		SendClientMessage(playerid, 0xFF0000FF, "{F81414}[!]{C3C3C3}Wrong star");
	}
	if (pickupid == star1)
	{
		SendClientMessage(playerid, 0xFF0000FF, "{F81414}[!]{C3C3C3}Wrong star");
	}
	if (pickupid == star2)
	{
		SendClientMessage(playerid, 0xFF0000FF, "{F81414}[!]{C3C3C3}Wrong star");
	}
	if (pickupid == star3)
	{
		SendClientMessage(playerid, 0xFF0000FF, "{F81414}[!]{C3C3C3}Wrong star");
	}
	if (pickupid == star4)
	{
		SendClientMessage(playerid, 0xFF0000FF, "{F81414}[!]{C3C3C3}Wrong star");
	}
	if (pickupid == star5)
	{
           new name[MAX_PLAYER_NAME], string[128];
	   GetPlayerName( playerid, name, MAX_PLAYER_NAME );
 	   format(string, 128, "~w~%s ~b~has winner find star",name);
	   GameTextForAll( string, 2000, 1 );
	   SetPlayerScore(playerid,500);
	   DestroyPickup(star);
	   DestroyPickup(star1);
	   DestroyPickup(star2);
	   DestroyPickup(star3);
	   DestroyPickup(star4);
	   DestroyPickup(star5);
	}
	return 1;
}

//+++++++++++++++++++++
forward times(playerid);
public times(playerid)
{
   time[playerid]=1;
   SendClientMessage(playerid, 0xFF0000FF, "{C3C3C3}You have {F81414}2 {C3C3C3}minutes to find the star available");
   return 1;
}
forward stop(playerid);
public stop(playerid)
{
   time[playerid]=0;
   SendClientMessage(playerid, 0xFF0000FF, "{F81414}[!]{C3C3C3}Time Out");
   SetPlayerHealth(playerid,0);
   return 1;
}
I'm new to scripting
Reply
#2

Well its only the same but nice
Reply
#3

Thank's
Reply
#4

Nice
Reply
#5

Nice job, maybe in future, start using Arrays.
Reply
#6

It's always the same pickup...it's an easy minigame and it only can be used once because players will remember the location from the last time they played.
Quote:

format(string, 128, "~w~%s ~b~has winner find star",name);

Ingrish pls.
Reply
#7

Quote:
Originally Posted by BlauPunKT
Посмотреть сообщение
It's always the same pickup...it's an easy minigame and it only can be used once because players will remember the location from the last time they played.

Ingrish pls.
I did this test and the player were tangled in location even if they knew that there are many stars and every star goes to her believing that if you go in there will appear another star .. smart player only so they will remember ..
Reply
#8

there could be small improvements in the optimization in all areas of the code

good
Reply
#9

Very Nice
Reply
#10

Quote:
Originally Posted by fiter12
Посмотреть сообщение
Very Nice
Thanks I appreciate it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)