09.04.2013, 16:16
pawn Code:
enum arenaDB
{
HitRec[35],
HitRecName[35]
};
enum arenaDB
{
HitRec[35],
HitRecName[35]
};
enum arenaDB // name the enum
{
HitRec, // add a variable to store weapon ID's (numerical values)
HitRecName[MAX_PLAYER_NAME] // add a string var to store a player's name
};
new arenaInfo[MAX_PLAYERS][arenaDB]; // create the variable you can use the enum with
// so, you can use it by doing arenaInfo[playerid][HitRec] or arenaInfo[playerid][HitRecName]
Im storing the records made by players of specific arena's which are declared as ID'S. In each arena you can make a Hit record with a weapon which I do HitRec[35], 35 is the 0-34 weapon id's. And I want to store the name for the record. Storing the name like this: HitRecName[MAX_PLAYER_NAME] won't do, because each weapon id will have a different record holder.
|
ArenaInfo[arena_id][weaponid] = "Player_Name";
Arena[arena_id][HitRecordName] = Player_Name;
Arena[arena_id(same as above)][HitRecordWeaponID] = weapon_id
I want to store the name for the record. Storing the name like this: HitRecName[MAX_PLAYER_NAME] won't do, because each weapon id will have a different record holder. |