How to add props in array

Started by Banaqs, Nov 18, 2014, 07:21 PM

Previous topic - Next topic

Banaqs

How to add props in array like a this Kills <- array ( GetMaxPlayers() , 0 );
I need a good example

Thijn

Props?

Do you mean something like this:
class PlayerInfo {
Kills = 0;
Deaths = 0;
}

pInfo <- array( GetMaxPlayers(), null );

function onPlayerJoin( pPlayer ) {
pInfo[ pPlayer.ID ] = PlayerInfo();

print( "Kills: " + pInfo[ pPlayer.ID ].Kills );
}

Untested, but should give an idea.