11.04.2013, 19:00
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
I'm new to scripting
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;
}


