Quote:
Originally Posted by Chaosxk
Should be in the scripting section.
As for your question, array will be fine. Using an array with enum will make it easier to work with. Something like this.
Code:
enum userData
{
userid = 0,
team,
class,
bot
};
int userArray[MAXPLAYERS + 1][userData]; //Creates an array for each client with enums
public void OnClientPostAdminCheck(int client)
{
userArray[client][userid] = GetClientUserId(client); //Gets the user id and set the array
userArray[client][bot] = IsFakeClient(client) ? 2 : 1; //If client is a bot set array to 2 otherwise 1
}
|
That was really helpful, thank you.
But how can i get the userid of a player who has, for example, value 1 on class, value 3 on team and value 2 on bot?
And also, i don't understand very well the point of enum: what's the difference between array and enum in this case?