Raised This Month: $7 Target: $400
 1% 

CSGO Items API


Post New Thread Reply   
 
Thread Tools Display Modes
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 08-11-2016 , 21:33   Re: CSGO Items API
Reply With Quote #21

Quote:
Originally Posted by Mitchell View Post
will this ever support reading weapon's spread values etc?
Done.

PHP Code:
native float CSGOItems_GetWeaponSpreadByDefIndex(int iDefIndex);
native float CSGOItems_GetWeaponSpreadByClassName(const char[] chClassName);
native float CSGOItems_GetWeaponSpreadByWeaponNum(int iWeaponNum); 
If there is anything else people would like then please let me know.
SM9 is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-11-2016 , 21:43   Re: CSGO Items API
Reply With Quote #22

Quote:
Originally Posted by xCoderx View Post
Compiles fine on my end, are you sure you have the include file in the right directory?
yes....
__________________
8guawong is offline
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 08-11-2016 , 21:49   Re: CSGO Items API
Reply With Quote #23

Quote:
Originally Posted by 8guawong View Post
yes....
I honestly can't help you then in that case

Last edited by SM9; 08-11-2016 at 21:49.
SM9 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-11-2016 , 21:51   Re: CSGO Items API
Reply With Quote #24

Quote:
Originally Posted by xCoderx View Post
Done.

PHP Code:
native float CSGOItems_GetWeaponSpreadByDefIndex(int iDefIndex);
native float CSGOItems_GetWeaponSpreadByClassName(const char[] chClassName);
native float CSGOItems_GetWeaponSpreadByWeaponNum(int iWeaponNum); 
If there is anything else people would like then please let me know.
cycle time (also known as the time it takes to shoot again (firerate))

also if there is a way to get how long a weapon takes to reload that would be awesome.
Mitchell is offline
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 08-11-2016 , 22:33   Re: CSGO Items API
Reply With Quote #25

Quote:
Originally Posted by Mitchell View Post
cycle time (also known as the time it takes to shoot again (firerate
PHP Code:
native float CSGOItems_GetWeaponCycleTimeByDefIndex(int iDefIndex);
native float CSGOItems_GetWeaponCycleTimeByClassName(const char[] chClassName);
native float CSGOItems_GetWeaponCycleTimeByWeaponNum(int iWeaponNum); 
Quote:
Originally Posted by Mitchell View Post
also if there is a way to get how long a weapon takes to reload that would be awesome.
Hmm, I can't find anything for this atm, Maybe its a netprop?
SM9 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-12-2016 , 10:25   Re: CSGO Items API
Reply With Quote #26

Quote:
Originally Posted by xCoderx View Post
PHP Code:
native float CSGOItems_GetWeaponCycleTimeByDefIndex(int iDefIndex);
native float CSGOItems_GetWeaponCycleTimeByClassName(const char[] chClassName);
native float CSGOItems_GetWeaponCycleTimeByWeaponNum(int iWeaponNum); 
Hmm, I can't find anything for this atm, Maybe its a netprop?
I think it is determined by the weapon's animation, however i'm not entirely sure.
Mitchell is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 08-12-2016 , 19:48   Re: CSGO Items API
Reply With Quote #27

It's in the weapon scripts as "CycleTime"

There are also spreads:

PHP Code:
    // accuracy model parameters
    
"Spread"                0.60
    
"InaccuracyCrouch"            7.39
    
"InaccuracyStand"            9.85
    
"InaccuracyJump"            0.685
    
"InaccuracyLand"            0.205
    
"InaccuracyLadder"            118.716
    
"InaccuracyFire"            6.70
    
"InaccuracyMove"            99.34 
__________________

Last edited by Neuro Toxin; 08-12-2016 at 19:51. Reason: // accuracy model parameters "Spread" 0.60 "InaccuracyCrouch" 7.39 "InaccuracyStand" 9.85 "InaccuracyJump" 0.68
Neuro Toxin is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-13-2016 , 02:24   Re: CSGO Items API
Reply With Quote #28

Quote:
Originally Posted by Neuro Toxin View Post
It's in the weapon scripts as "CycleTime"

There are also spreads:

PHP Code:
    // accuracy model parameters
    
"Spread"                0.60
    
"InaccuracyCrouch"            7.39
    
"InaccuracyStand"            9.85
    
"InaccuracyJump"            0.685
    
"InaccuracyLand"            0.205
    
"InaccuracyLadder"            118.716
    
"InaccuracyFire"            6.70
    
"InaccuracyMove"            99.34 
Cycle time isn't the reload time. He already added cycle time and the spread to the code.
Mitchell is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 01-16-2018 , 06:27   Re: CSGO Items API
Reply With Quote #29

I have the following errors on the console:
Quote:
L 01/16/2018 - 01:55:48: [SM] Exception reported: Array index is out of bounds
L 01/16/2018 - 01:55:48: [SM] Blaming: CSGO_Items.smx
L 01/16/2018 - 01:55:48: [SM] Call stack trace:
L 01/16/2018 - 01:55:48: [SM] [1] Line 1210, C:\Users\Michael\OneDrive\Documents\Developme nt\PAWN\Projects\CSGO-Items\addons\sourcemod\scripting\CSGO_Items.s p::SyncItemData
L 01/16/2018 - 01:55:48: [SM] [2] Line 1016, C:\Users\Michael\OneDrive\Documents\Developme nt\PAWN\Projects\CSGO-Items\addons\sourcemod\scripting\CSGO_Items.s p::Timer_SyncSchema
L 01/16/2018 - 01:55:50: [SM] Exception reported: Array index is out of bounds
L 01/16/2018 - 01:55:50: [SM] Blaming: CSGO_Items.smx
L 01/16/2018 - 01:55:50: [SM] Call stack trace:
L 01/16/2018 - 01:55:50: [SM] [1] Line 1210, C:\Users\Michael\OneDrive\Documents\Developme nt\PAWN\Projects\CSGO-Items\addons\sourcemod\scripting\CSGO_Items.s p::SyncItemData
L 01/16/2018 - 01:55:50: [SM] [2] Line 1016, C:\Users\Michael\OneDrive\Documents\Developme nt\PAWN\Projects\CSGO-Items\addons\sourcemod\scripting\CSGO_Items.s p::Timer_SyncSchema
L 01/16/2018 - 01:55:51: [SM] Exception reported: Array index is out of bounds
I got the latest version here: https://bitbucket.org/SM91337/csgo-items/src
paulo_crash is offline
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 01-24-2018 , 15:44   Re: CSGO Items API
Reply With Quote #30

Quote:
Originally Posted by paulo_crash View Post
I have the following errors on the console:

I got the latest version here: https://bitbucket.org/SM91337/csgo-items/src
Should be fixed now, please download the latest version again thanks.
SM9 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 01:19.


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