17.02.2013, 16:23
Oh, then you'd have to make a loop, here:
pawn Code:
public OnPlayerEnterCheckpoint(playerid)
{
if(gTeam[playerid] == TEAM_RED) {
bomb = SetTimer("bomb2", 10000, false);
SendClientMessageToAll(0xDEEE20FF, "The bomb is being planted, it will take 10 seconds to activate it");
}
else if(gTeam[playerid] == TEAM_BLUE) {
GameTextForPlayer(playerid,
"Don't let the terrorists plant a bomb here",
6000,5);
}
return 1;
}
public bomb2()
{
for(new i = 0; i < MAX_PLAYERS; i++)//This loop through all players.
{
SendClientMessageToAll(0xDEEE20FF, "The bomb has been planted, you have 10 seconds to run away");
CreateObject(1654,2636.1999512,-2094.5000000,12.6000004,272.8234863,314.9780273,134.0114746); //object(dynamite) (1)
CreateObject(1654,2636.1999512,-2095.1000977,12.6000004,272.8234863,314.9780273,17.2614746); //object(dynamite) (2)
CreateObject(1654,2636.3000488,-2094.8000488,12.6000004,272.8234863,314.9780273,285.0114746); //object(dynamite) (3)
DisablePlayerCheckpoint(i);
SetTimer("exp",10000,false);
SetTimer("exp2",12000,false);
SetTimer("exp3",15000,false);
}
}