#define TEAM_BALLAS ( 0 ) #define TEAM_CJ ( 1 ) new PlayerTeam1[MAX_PLAYERS]; new PlayerTeam2[MAX_PLAYERS]; |
public OnPlayerSpawn(playerid) { if(loaded[playerid] == 0) { SetTimer("message", 1, false); SetPlayerInterior(playerid,0); TogglePlayerClock(playerid,0); return 1; } else if(PlayerTeam1[playerid] == 1) { SetPlayerPos(playerid, 2266.7214,1399.0728,42.8203); return 1; } else if(PlayerTeam2[playerid] == 1) { SetPlayerPos(playerid, 2307.9016,1503.1066,10.8234); return 1; } return 1; }
public OnPlayerRequestClass( playerid, classid ) { switch ( classid ) { case 0: { GameTextForPlayer( playerid, "~r~Army Force", 300, 3 ); SetPlayerCameraPos(playerid,1828.1793,2781.1021,10.8359); SetPlayerCameraLookAt(playerid, 1821.8132,2780.6013,10.8359); SetPlayerPos(playerid, 1821.8132,2780.6013,10.8359); SetPlayerTeam( playerid, TEAM_BALLAS ); PlayerTeam1[playerid] = 1; } case 1: { GameTextForPlayer( playerid, "~g~Attackers", 300, 3 ); SetPlayerTeam( playerid, TEAM_CJ ); PlayerTeam2[playerid] = 1; } case 2: { GameTextForPlayer( playerid, "~g~Attackers", 300, 3 ); SetPlayerTeam( playerid, TEAM_CJ ); // Sets the player's team to TEAM_CJ PlayerTeam2[playerid] = 1; } } return 1; }
PlayerTeam1[playerid] = 0; |
PlayerTeam2[playerid] = 0; |