Another question .... anyone can help me with a good team balancer .. ?
#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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)