[SOLVED] Random
#1

I'm trying to put a player in a random team OnPlayerConnect.
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;
}
But this gives me the warning not used TEAMS: and it always gives me team 0
How can I fix this?
Thanks!
Reply


Messages In This Thread
[SOLVED] Random - by Rzzr - 23.01.2010, 19:24
Re: [NOT SOLVED] Random - by Rzzr - 24.01.2010, 12:46
Re: [NOT SOLVED] Random - by *ToM* - 24.01.2010, 12:49
Re: [NOT SOLVED] Random - by Rzzr - 24.01.2010, 12:50
Re: [NOT SOLVED] Random - by MadeMan - 24.01.2010, 13:29
Re: [NOT SOLVED] Random - by mansonh - 24.01.2010, 13:34
Re: [NOT SOLVED] Random - by MadeMan - 24.01.2010, 13:37
Re: [NOT SOLVED] Random - by mansonh - 24.01.2010, 13:38
Re: [NOT SOLVED] Random - by dice7 - 24.01.2010, 13:41
Re: [NOT SOLVED] Random - by Rzzr - 24.01.2010, 13:46

Forum Jump:


Users browsing this thread: 1 Guest(s)