Posts: 546
Threads: 22
Joined: Jul 2007
Reputation:
0
you have to do it in this order:
1. Create global values for ALL players reffering to their weapons and the ammo
F.E.: new gGun1, gAmmo1, ...;
2. Get players' weapons to those values. I suggest onplayercommandtext and like a /saveguns command
3. Save these values into a file named 'player_name.txt' or '... .ini' or whatnot. or you could use any other data storage method like mysql.
4. when player connects check if he has a file reffering to his name. if(fexists(filename)) ... and if there exists load the guns. I would create a script , but that would be against my principles!
EDIT: sorry, nt when player connects you give him the guns, but when he spawns. and you'd like to not make the /saveguns command because that woud make guns infinite sometimes. like he dies and reloads... well just check for guns every now and then with a timer or on a certai ncallback!