change player team
#1

hi all
i would like t know how could i check if all the players online are in the same team
some think like
Quote:

if ((theplayersonline) && (team = 2))
{
if (playerid == 2 || playerid == 6 || playerid == 8|| playerid == 9 || playerid == 11 )
{
team[playerid] = 1;
SetPlayerTeam (playerid, 1);
SetPlayerHealth(playerid, 0);
}
}

Reply
#2

Код:
if(IsPlayerConnected(i))
To see if thier online or something like that.
Reply
#3

but isplayercontecd is not gonna chek if all the player WHO are conected are in the same team
Reply
#4

Код:
if(IsPlayerConnected(i) && team[playerid] == 1)
Something like that.
Reply
#5

no that will check if the player(only 1) is conected & is in team 1
i'm searching how to check if all the player WHO ARE CONECTED(all the players )! is all of them are in team 1 !
hop that you understand (my english sucks)
Reply
#6

lol i think he mean how can i check that like /team 1 how much players is in team 1 and /team 2 how muchh players is online in team 2 am i Right?
Reply
#7

Код:
if(IsPlayerConnected(i) && team[playerid] == 1)
{
    //do something
}
if(IsPlayerConnected(i) && team[playerid] == 2)
{
    //do something
}
Ect..

Something like that.
Reply
#8

Quote:
Originally Posted by Roomeo
Посмотреть сообщение
lol i think he mean how can i check that like /team 1 how much players is in team 1 and /team 2 how muchh players is online in team 2 am i Right?
some think likй that !
caus i want to :
if all the players in the server are in team 1 ! 2 player are gonna change to team 2 !
Reply
#9

Oh I Got It Someone will help you Now
Reply
#10

ok i'm waiting ! (thnks )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)