how to make a player variable?

how do i make a variable for every players that join?, like “Ply.stones = 0”

//Thanks

[editline]24th October 2010[/editline]

im made a thread like this before, but i cant check my posted threads.

[lua]hook.Add(“PlayerInitialSpawn”, “PlayerInitialSpawnVar”, function( ply )
ply.stones = 0;
end);[/lua]

**[Gamemode.PlayerInitialSpawn

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.PlayerInitialSpawn)**

im lost, what i want is to create a variable for every player that joins, like darkrp it makes the money variable for new players

So use what thejjokerr posted.

it works i think, but how do i transfer variables from serverside to clientside?

Using these things: http://wiki.garrysmod.com/?title=Usermessages

[lua] – Server side:
hook.Add(“PlayerInitialSpawn”, “PlayerInitialSpawnVar”, function( ply )
ply.stones = 0;

 umsg.Start( ply, "StoneHim" )
      umsg.Long( ply.stones )
 umsg.End();

end);

– Client side:
usermessage.Hook(“StoneHim”, function( um )
print(“The server threw " … um:ReadLong() … " stones at me”);
end);[/lua]