28.03.2014, 23:29
Quote:
If you have teams set and plan on using teams you will need to make some function hooks and modify how SetPlayerTeam() / GetPlayerTeam() operate so that they set the players to the same team with the native functions but save the team in your script let me know if you need help with that it's pretty easy to do.
|
Код:
#define BLUE_TEAM 1 #define RED_TEAM 2
Код:
public OnPlayerRequestClass(playerid, classid) { //.... switch(classid) { case 0,1,2,3: { //... SetPlayerTeam(playerid,BLUE_TEAM); } case 4,5,6,7: { //... SetPlayerTeam(playerid,RED_TEAM); } } return 1; }
Код:
static gTeam[MAX_PLAYERS];
Код:
public OnPlayerRequestClass(playerid, classid) { //.... switch(classid) { case 0,1,2,3: { //... SetPlayerTeam(playerid,BLUE_TEAM); gTeam[playerid] = BLUE_TEAM; } case 4,5,6,7: { //... SetPlayerTeam(playerid,RED_TEAM); gTeam[playerid] = RED_TEAM; } } return 1; }