Raised This Month: $ Target: $400
 0% 

get weapon max clip size and set cur weap ammo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Owyn
Veteran Member
Join Date: Nov 2007
Old 01-27-2010 , 10:50   get weapon max clip size and set cur weap ammo
Reply With Quote #1

hi, i've been wondering if it possible to get users current weapon maxclip size? maybe with an offset?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.

Last edited by Owyn; 01-31-2010 at 10:51.
Owyn is offline
Send a message via ICQ to Owyn
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-27-2010 , 11:58   Re: get weapon max clip size and set cur weap ammo
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=82093
Code:
getMaxClipAmmo(iWeaponID) {     if( !(0 <= iWeaponID <= CSW_P90) ) {         return -1;     }     stock const g_iDftMaxClip[CSW_P90+1] = {         -1,  13, -1, 10,  1,  7,    1, 30, 30,  1,  30,         20, 25, 30, 35, 25,   12, 20, 10, 30, 100,         8 , 30, 30, 20,  2,    7, 30, 30, -1,  50     };     return g_iDftMaxClip[iWeaponID]; }
If you are running that plugin then you would need something different.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 01-27-2010 , 12:04   Re: get weapon max clip size and set cur weap ammo
Reply With Quote #3

this is simular to my function giving hardcoded values depending on provided weaponid. i ment something really getting maxclip from the game, or would it be just a waste?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-27-2010 , 12:08   Re: get weapon max clip size and set cur weap ammo
Reply With Quote #4

http://wiki.amxmodx.org/CBasePlayerAmmo_(CS)
http://wiki.amxmodx.org/CBasePlayerItem_(CS)
http://wiki.amxmodx.org/CBasePlayerWeapon_(CS)
http://wiki.amxmodx.org/CWeaponBox_(CS)

Have a look and see if you find any.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 01-27-2010 at 12:24.
Exolent[jNr] is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 01-27-2010 , 12:23   Re: get weapon max clip size and set cur weap ammo
Reply With Quote #5

m_iDefaultAmmo ?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-27-2010 , 12:25   Re: get weapon max clip size and set cur weap ammo
Reply With Quote #6

Code:
m_iDefaultAmmo 	 56 	 60 	 +4 	 int 	 How much ammo you get when you pick up this weapon as placed by a level designer.
That isn't what you want.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 01-27-2010 , 12:27   Re: get weapon max clip size and set cur weap ammo
Reply With Quote #7

don't we get as much ammo when we pick something as we have maximum per clip?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-27-2010 , 12:46   Re: get weapon max clip size and set cur weap ammo
Reply With Quote #8

There is no offset found yet, but with orpheu you could get the value easily.
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

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 07:22.


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