11.08.2011, 12:20
hey guys i got this code:
oh yeah it works great.
And i have no errors.
and whenever i start war it puts me only one team - attacker team
actually i mean that it will put in attacker or defender team but it always put me in one team.
and problem with my code?
help me please.
thanks.
davz!
pawn Код:
public Dday(playerid)
{
for( new teams; teams < 23; teams++ )
{
if( teams == gTeam[ playerid ] ) continue;
}
for(new i = 0; i < MAX_PLAYERS; i++)
if(WarJoin[i])
{
SetPlayerTeam(i, 0);
SetPlayerColor(i, 0xFF0000FF); // Red
SetPlayerVirtualWorld(i, 3);
ResetPlayerWeapons(i);
GivePlayerWeapon(i, 32, 200);
GivePlayerWeapon(i, 26, 200);
GameTextForPlayer(i,"You're ~r~Attacker. ~g~Go Attack them..",2000,3);
SetPlayerPos(i, -143.5201,2462.7905,16.5642);
}
else
{
SetPlayerTeam(i, 1);
SetPlayerColor(i, 0x00FF00FF); // Green
SetPlayerVirtualWorld(i, 3);
ResetPlayerWeapons(i);
GivePlayerWeapon(i, 32, 200);
GivePlayerWeapon(i, 26, 200);
GameTextForPlayer(i,"You're ~g~Defender. ~g~Go Defend them..",2000,3);
SetPlayerPos(i, -39.8148,2367.1724,23.9401);
}
for(new i = 0; i < MAX_PLAYERS; i++)
WarStarted[i] = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
WarJoin[i] = 0;
return 1;
}
And i have no errors.
and whenever i start war it puts me only one team - attacker team
actually i mean that it will put in attacker or defender team but it always put me in one team.
and problem with my code?
help me please.
thanks.
davz!