Bomb cp
#2

Quote:
Originally Posted by Face9000
Посмотреть сообщение
Can someone tell me why if i enter the checkpoint i get the message: "Someone is already planting the bomb" but i can plant it however?

Код:
public OnPlayerEnterCheckpoint(playerid)
{
	if(gTeam[playerid] == TEAM_DEFENDERS)
	{
	    GameTextForPlayer(playerid,"~w~Defend this bomb checkpoint from ~b~terrorists!",5000,4);
	}
	else if(gTeam[playerid] == TEAM_TERRORISTS)
	{
		if(AlreadyPlanting[playerid] == 1)
		{
	    SendClientMessage(playerid, -1, "* Someone is already planting the {F2C80C}bomb, {FFFFFF}please wait.");
	    return 0;
		}
		if(Planted[playerid] == 1)
		{
	    SendClientMessage(playerid, -1, "* The {F2C80C}bomb {FFFFFF}has been planted already and it will explode soon.");
	    return 0;
		}
 		new name[MAX_PLAYER_NAME], string[128];
    	GetPlayerName(playerid, name, sizeof(name));
    	format(string, sizeof(string), "~r~%s ~w~will plant the ~r~bomb ~w~in 15 seconds!",name);
    	GameTextForAll(string,5000,4);
		BombTimer = SetTimer("Explode",15000,false);
		AlreadyPlanting[playerid] = 1;
    }
	return 1;
}
Thanks.
You checked after planting the bomb.


You might want to check the AlreadyPlanting[playerid] == 1 and loop through all players and check if they're planting.
Reply


Messages In This Thread
Bomb cp - by Face9000 - 27.09.2015, 10:17
Re: Bomb cp - by J0sh... - 27.09.2015, 10:52
Re: Bomb cp - by Face9000 - 27.09.2015, 20:07
Re: Bomb cp - by J0sh... - 27.09.2015, 20:21

Forum Jump:


Users browsing this thread: 1 Guest(s)