09.01.2011, 15:30
Nobody will do the animation when this get's called.. and only id 0 will be spectating
Hope someone can help me
Hope someone can help me
pawn Код:
EndTheGame(WinID)
{
PlaySoundForAll(1183);
if(WinID == team1)
{
GameTextForAll("~b~team1 win the game!",5000, 5);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[i] == team1)
{
ApplyAnimation(i, "DANCING", "dance_loop", 4.0, 1, 0, 0, 0, 0);
}
else if(gTeam[i] == team2)
{
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
}
}
}
else if(WinID == team2)
{
GameTextForAll("~r~team 2 win the game!",5000, 5);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[i] == team2)
{
ApplyAnimation(i, "DANCING", "dance_loop", 4.0, 1, 0, 0, 0, 0);
}
else if(gTeam[i] == team1)
{
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
}
}
}
SetTimer("Spectate",10000, false);
}
pawn Код:
public Spectate()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TogglePlayerSpectating(i, true);
}
}
}
}