23.01.2010, 19:24
I'm trying to put a player in a random team OnPlayerConnect.
So I have this:
But this gives me the warning not used TEAMS: and it always gives me team 0
How can I fix this?
Thanks!
So I have this:
pawn Код:
// On top of script
new gTeam[MAX_PLAYERS];
new Float: TEAMS[2] = {
{0},
{1}
};
pawn Код:
public OnPlayerConnect(playerid)
{
new rand = random(sizeof(TEAMS));
gTeam[playerid] = rand;
new stringy[10];
format(stringy, sizeof(stringy), "Team: %d", stringy, rand);
GameTextForPlayer(playerid, stringy, 5000, 3);
return 1;
}
How can I fix this?
Thanks!