Raised This Month: $ Target: $400
 0% 

Getting all of a user's weapon data.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 03-06-2006 , 22:04   Getting all of a user's weapon data.
Reply With Quote #1

I've been looking around and still am having problems coding certain things.

For instance, this below, Doesn't collect but one gun, because I bet it only has time to do only one "invnext" command before it exits.

Is there another way to collect all of a users weapons, and their ammo, clip, and flags?

Code:
public weaponsave(id) {     new query[256]     new Sql:dbc = remorp_get_sqldatabase()         new oldgunid     for(new i=1;i<=35;i++)     {         client_cmd(id,"invnext")         new ammo, clip, mode, extra         new gunid = ts_getuserwpn(id,ammo,clip,mode,extra)                 if(gunid == oldgunid) {             return PLUGIN_HANDLED         }         oldgunid = gunid                         if(gunid >= 1 && gunid <= 35) {             new authid[32]             get_user_authid(id,authid,31)                         format(query,256,"INSERT INTO user_weapons (SteamID,GunID,Clip,Ammo,Flags) VALUES('%s','%i','%i','%i','%i')", authid,gunid,ammo,clip,extra)             dbi_query(dbc,"%s",query)         }             }     return PLUGIN_HANDLED }
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
 



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 20:28.


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