Another question .... anyone can help me with a good team balancer .. ?
#1

I have 18 teams ... can anyone give me a team balancer ? and how to make it like ...
*BALANCER:This team is not avaliable for now , You will spawn as TEAM_LICKERS ...
CAn anyone help me ? cuz i realy need it ..
Reply
#2

Script Request Thread
Reply
#3

BUMP**
Reply
#4

pawn Код:
new example[MAX_PLAYERS];
new rank[MAX_PLAYERS];

enum playa_data{
rank, // Player Rank as example
example,/* Your Team Var as example */
ch_class // Player Class id
}
new player_data[MAX_PLAYERS][playa_data];


// OnGameModeInit ( Example )
AddPlayerClass(/* Your Data */); // Classid 0
AddPlayerClass(/* Your Data */); // Classid 1... and so on

// OnPlayerRequestSpawn
/* Check Classid */
if(player_data[playerid][ch_class] > 0 && player_data[playerid][ch_class] <= 2 && player_data[playerid][rank] < 2) // is Rank Less 2 not allowed...
{
    SendClientMessage(/* ya Message */);
    return 0; // Player Cant Spawn
}

// OnPlayerRequestClass

player_data[playerid][ch_class] = classid; // Check Classid if the Player want Spawn ( Look OnPlayerSpawn ^ )
dont forget this is an example so you must use your own Variables ^^
Reply
#5

i dont know how to do it ... can u help me ? pls pls .. i am new in scripting and ......... i realy need help ..
Reply
#6

Код:
paste this 2 on top of your script where you find the lines that start with new
new example[MAX_PLAYERS]; 
new rank[MAX_PLAYERS];

paste this under it on the enum section
enum playa_data{
rank, // Player Rank as example
example,/* Your Team Var as example */
ch_class // Player Class id
}
new player_data[MAX_PLAYERS][playa_data];

find public ongamemodeinit and paste this
// OnGameModeInit ( Example )
AddPlayerClass(/* Your Data */); // Classid 0
AddPlayerClass(/* Your Data */); // Classid 1... and so on

public onplayerrequestspawn and past this
// OnPlayerRequestSpawn
/* Check Classid */
if(player_data[playerid][ch_class] > 0 && player_data[playerid][ch_class] <= 2 && player_data[playerid][rank] < 2) // is Rank Less 2 not allowed...
{
SendClientMessage(/* ya Message */);
return 0; // Player Cant Spawn
}

public onplayerrequestclass and paste that 
// OnPlayerRequestClass

player_data[playerid][ch_class] = classid; // Check Classid if the Player want Spawn ( Look OnPlayerSpawn ^ )

use your variables thats the codes variables = Replace Some of the words by those u defined in ur script so u dont egt errors :D 

good luck
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)