I need some help with peace of code please
#1

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
Reply


Messages In This Thread
I need some help with peace of code please - by DaneAMattie - 14.05.2010, 07:42
Re: I need some help with peace of code please - by 0ne - 14.05.2010, 07:52
Re: I need some help with peace of code please - by DaneAMattie - 14.05.2010, 07:58
Re: I need some help with peace of code please - by 0ne - 14.05.2010, 08:00
Re: I need some help with peace of code please - by DaneAMattie - 14.05.2010, 08:02
Re: I need some help with peace of code please - by DaneAMattie - 14.05.2010, 08:03
Re: I need some help with peace of code please - by 0ne - 14.05.2010, 08:05
Re: I need some help with peace of code please - by DaneAMattie - 14.05.2010, 08:07

Forum Jump:


Users browsing this thread: 9 Guest(s)