Quote:
Originally Posted by S4t3K
Use an enumerator + an array, then put all the vars about the gangs inside, such as
PHP код:
enum 1gangInfo
{
gangID,
gangLeader,
gangMembers,
gangName[],
};
new infoGang[MAX_GANGS][1gangInfo];
Then, when you create a gang with an InGame command, use a for loop to check if a gang id is free (start your gangs id from 1), and if it is, use it !
PHP код:
new g;
for(g = 0; g < MAX_GANGS; g++)
{
if(infoGang[g][gangID] == 0) break;
}
infoGang[g][gangID] = g;
// etc
if you need more explainations, then just ask.
|
The first part is okay , but explain the 2nd part please, Thankyou for your very fast reply
Quote:
Originally Posted by Rittik
Take a global variable
Код:
new gangid;//insert this at the top of your gamemode
When player registers/creates a gang ,create an increment to the variable like this
|
That might be a bit hard