SA-MP Forums Archive
Forgot something.... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Forgot something.... (/showthread.php?tid=155909)



Forgot something.... - Lorenc_ - 20.06.2010

okk i havnt been that active on samp and so i forgot something..

If i add 1 team, how do i add like 3 classes in that one team through gTeams?

Lorenc..


Re: Forgot something.... - ViruZZzZ_ChiLLL - 20.06.2010

you mean like this :
pawn Код:
#define Grove 0
new gTeam[MAX_PLAYERID];

public OnPlayerRequestClass(playerid, classid)
{
 if(classid == 0)
 {
 gTeam[playerid] = Grove;
 }
 return 1;
}



Re: Forgot something.... - DJDhan - 20.06.2010

Код:
AddPlayerClass(................); //this classid 0
AddPlayerClass(................); // this is 1
AddPlayerClass(................); // this is 2
Then under OnPlayerRequestClass
Код:
SetPlayerTeamFromClass(playerid,classid);
Код:
SetPlayerTeamFromClass(playerid, classid)
{
	 if(classid == 0 || classid == 1 || classid == 2) 
	 {
	  gTeam[playerid] = TEAM_ONE;
	 }
       return 1;
}



Re: Forgot something.... - Lorenc_ - 20.06.2010

Quote:
Originally Posted by DJDhan
Код:
AddPlayerClass(................); //this classid 0
AddPlayerClass(................); // this is 1
AddPlayerClass(................); // this is 2
Then under OnPlayerRequestClass
Код:
SetPlayerTeamFromClass(playerid,classid);
Код:
SetPlayerTeamFromClass(playerid, classid)
{
	 if(classid == 0 || classid == 1 || classid == 2) 
	 {
	  gTeam[playerid] = TEAM_ONE;
	 }
       return 1;
}
Thats the ONE!!!!!!!!!!!! thanks