help me
#1

hey guys i got this code:

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;
}
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!
Reply
#2

hm could you explain in a detailed way what you want to happen on this callback?
You are using incredibly many loops whereas 1 could cover them all..
Also could you show where the "WarJoin" player's variable is assigned to a value?
Reply
#3

What's the purpose of the first loop that goes through all the teams? It doesn't do anything.
Reply
#4

Alright, better than explaining is that come to my server ip is: 94.23.146.149:9100

Please.
Reply
#5

you want a random team?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)