14.05.2010, 07:42
Hello,
I found this peace of code somewhere on the internet:
ReturnPlayersInTeam(teamid)
{
new t;
for(new a;a<MAX_PLAYERS,IsPlayerConnected(a);a++)if(gTeam[a]==teamid)t++;
return t;
}
Now what this do, it will return a value with the amount of people in a team
but my problem is it also detects NPC's so i want to bypass them using this:
if(IsPlayerNPC(playerid))
{
return 1;
}
but i have no idea how to put this code into that for(new a; etc.) code
I hope you guys respond fast with some answers
Thanks,
ikbenhet
I found this peace of code somewhere on the internet:
ReturnPlayersInTeam(teamid)
{
new t;
for(new a;a<MAX_PLAYERS,IsPlayerConnected(a);a++)if(gTeam[a]==teamid)t++;
return t;
}
Now what this do, it will return a value with the amount of people in a team
but my problem is it also detects NPC's so i want to bypass them using this:
if(IsPlayerNPC(playerid))
{
return 1;
}
but i have no idea how to put this code into that for(new a; etc.) code
I hope you guys respond fast with some answers
Thanks,
ikbenhet