SA-MP Forums Archive
Help !!! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help !!! (/showthread.php?tid=239726)



Help !!! - wheelman_WM - 14.03.2011

Код:
CMD:mg2(playerid, params[])
{
	SetPlayerInterior(playerid, 1);
	GameTextForPlayer(playerid, "~W~Minigame 2", 3000, 5);
	{
		if(IsPlayerInAnyVehicle(playerid) == 1)
		{
			SendClientMessage(playerid, COLOR_GREEN, "[Error]: You cant goto /mg2 while in a car!");
		}
		else
		{
			SetPlayerPos(playerid, 2219.5205,1553.9661,1004.7187 + 1);
			SetPlayerPos(playerid, 2229.7585,1575.4252,999.9707 + 1);
			SetPlayerPos(playerid, 2170.3325,1591.1240,999.9724 + 1);
			SetPlayerHealth(playerid, 100);
			SetPlayerArmour(playerid, 100);
			SendClientMessage(playerid, COLOR_GREEN, "To leave /mg2 type /leave");
			GivePlayerWeapon(playerid, 38, 9999);
		}
		return 1;
	}
}
Hey i want that this minigame will start in 25 seconds so player can join and after 20 seconds there should be a countdown of starting minigame.


Re: Help !!! - ricardo178 - 14.03.2011

Set timers


Re: Help !!! - XFlawless - 14.03.2011

pawn Код:
forward MG2(playerid);
CMD:mg2(playerid, params[])
{
    SetPlayerInterior(playerid, 1);
    GameTextForPlayer(playerid, "~W~Minigame 2", 3000, 5);
    {
        if(IsPlayerInAnyVehicle(playerid) == 1)
        {
            SendClientMessage(playerid, COLOR_GREEN, "[Error]: You cant goto /mg2 while in a car!");
        }
        else
        {
           
                   SetTimerEx("MG2",25000,0,"d",playerid);
        }
        return 1;
    }
}

public MG2(playerid)
{
       SetPlayerPos(playerid, 2219.5205,1553.9661,1004.7187 + 1);
            SetPlayerPos(playerid, 2229.7585,1575.4252,999.9707 + 1);
            SetPlayerPos(playerid, 2170.3325,1591.1240,999.9724 + 1);
            SetPlayerHealth(playerid, 100);
            SetPlayerArmour(playerid, 100);
            SendClientMessage(playerid, COLOR_GREEN, "To leave /mg2 type /leave");
            GivePlayerWeapon(playerid, 38, 9999);
}
Not tested.


Re: Help !!! - wheelman_WM - 14.03.2011

hey one more thing add
after 25 secs when the players who joined it and teleported no players can join it until the minigame ends and it will announce the person wins


Re: Help !!! - XFlawless - 14.03.2011

Quote:
Originally Posted by wheelman_WM
Посмотреть сообщение
hey one more thing add
after 25 secs when the players who joined it and teleported no players can join it until the minigame ends and it will announce the person wins
Do it yourself using arrays .