how to make a player variable?

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


[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;


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:

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

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


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