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; } }
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);
}
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 |