How to set a team limit on my faction
#10

sure but it might still be a bit complicated:
add this to the top of your script below the #includes:
new TEAM_ARMY_COUNT;

add this under OnPlayerSpawn:
if(gTeam[playerid] == TEAM_ARMY) TEAM_ARMY_COUNT++;

now add this to OnPlayerRequestClass:
if(TEAM_ARMY_COUNT >= 5) return SendClientMessage(playerid, COLOR_RED, "The army team is full! (5 Players)");

this could be the complicated part,
if you have OnPlayerDisconnect in your gamemode script, add this:
if(gTeam[playerid] == TEAM_ARMY) TEAM_ARMY_COUNT--;

if not add this under a callback in the script:
public OnPlayerDisconnect();
{

then add the line above
Reply


Messages In This Thread
How to set a team limit on my faction - by ruckfules99 - 17.02.2010, 00:59
Re: How to set a team limit on my faction - by ruckfules99 - 17.02.2010, 02:51
Re: How to set a team limit on my faction - by ruckfules99 - 17.02.2010, 19:22
Re: How to set a team limit on my faction - by woot - 17.02.2010, 22:03
Re: How to set a team limit on my faction - by ruckfules99 - 17.02.2010, 22:11
Re: How to set a team limit on my faction - by woot - 17.02.2010, 22:17
Re: How to set a team limit on my faction - by ruckfules99 - 17.02.2010, 22:29
Re: How to set a team limit on my faction - by WSD - 17.02.2010, 23:18
Re: How to set a team limit on my faction - by ruckfules99 - 17.02.2010, 23:27
Re: How to set a team limit on my faction - by WSD - 18.02.2010, 00:11

Forum Jump:


Users browsing this thread: 3 Guest(s)