26.05.2013, 07:18
Alright, when the minutes / seconds are @0 the code is supposed to re-spawn everyone and show them the class selection, and announce the winner but it just goes to 0:00 and nothing happens, here is the public function.
pawn Код:
public TeamWinning(playerid)
{
if(Seconds == 0 && Minutes == 0)
{
if(cKills > tKills)
{
GameTextForAll("~r~~h~Terrorists win!", 5000, 6);
cKills = 0;
tKills = 0;
for(new i=0;i<MAX_PLAYERS;i++)
{
ForceClassSelection(playerid);
}
}
else if(cKills < tKills)
{
if(Seconds == 0 && Minutes == 0)
{
GameTextForAll("~b~~h~Counter terrorists win!", 5000, 6);
cKills = 0;
tKills = 0;
for(new i=0;i<MAX_PLAYERS;i++)
{
ForceClassSelection(playerid);
}
}
}
else if(cKills == tKills)
{
if(Seconds == 0 && Minutes == 0)
{
GameTextForAll("~w~~h~None won the match!",4000,6);
cKills = 0;
tKills = 0;
for(new i=0;i<MAX_PLAYERS;i++)
{
ForceClassSelection(playerid);
}
}
}
}
return 1;
}