Raised This Month: $ Target: $400
 0% 

Weapon saver for TS


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
capndurk
Senior Member
Join Date: Feb 2006
Old 03-16-2006 , 15:48  
Reply With Quote #3

You'd probably have to store the weapon and ammo in a file with the player's steam id, because your code assumes that only the same 32 people keep the same player ids when they enter and leave the server, and that isn't true.

What you'd have to do is on client disconnect, you'd have to search the file for the player's steam id, and if it exists, overwrite the line with the new gun and ammo, and if it doesn't exist, create a new line.

On client connect, you'd read the file for the steam id, and if it wasn't there, you wouldn't do anything, but if it was, you'd get the weapon and ammo information from the file and then give it to him.

At least, that's the logic I'd follow if I were trying to make that. Good luck!
capndurk is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode