05.05.2010, 19:06
Quote:
Originally Posted by Naxix
It should prevent players from spawning.
|
Btw, I want that like it balances the team .. Too if your already playing
![confused](images/smilies/confused.gif)
E/: Whole OnPlayerRequestClass:
Quote:
public OnPlayerRequestClass(playerid,classid) { new Count1, Count2; for(new i = 0; i < GetMaxPlayers(); i++) { if(PlayerTeam[playerid] == 0) Count1++; else if (PlayerTeam[playerid] == 1) Count2++; } if ((Count1 > Count2) && PlayerTeam[playerid] == 1) { SendClientMessage(playerid,COLOR_RED, "Balancing teams. Choose Another Team"); return 0; } else if ((Count2 > Count1) && PlayerTeam[playerid] == 0) { SendClientMessage(playerid,COLOR_RED, "[BALANCER] Balancing teams. Choose Another Team"); return 0; } SetPlayerPos(playerid,299.9177,2741.7598,42.9127); SetPlayerFacingAngle(playerid,198.9686); SetPlayerCameraPos(playerid,306.3498,2727.6697,37. 0493); SetPlayerCameraLookAt(playerid,299.9177,2741.7598, 42.9127); if(classid == 0) { PlayerTeam[playerid] = 0; SetPlayerTeam(playerid,0); } else if(classid == 1) { PlayerTeam[playerid] = 1; SetPlayerTeam(playerid,1); } return 1; } |