Getting ammo type (particularly grenades)
As CreateEntityByName has broken, this my way to get ammo type.
(Ammo type needs for me to check/give/remove grenades from player inventory) I use engine basic function for it CAmmoDef::Index(const char *). For call this function we need CAmmoDef object that we can get with GetAmmoDef() function. PHP Code:
Code:
"Games" |
Re: Getting ammo type (particularly grenades)
Why not just use gamedata to read the index's? Like 2 function calls for numbers that havent changed in forever seems a bit much. https://bitbucket.org/Drifter321/wea...#natives.sp-16
|
Re: Getting ammo type (particularly grenades)
@Dr!fter, Justly. But current situation is not good. If offsets changed (I remember 4 changes): Every plugin what used it must be rewriten by plugin creator and updated on all servers where it used by servers' heads.
Can we use cstrike extention gamedata for it somehow? Offsets changed -> autoupdater update game data for all plugin on all servers. Or use way 2 with offsets (without signatures)? P.S. Updated snippet: We can get AmmoDef only once and save it. |
Re: Getting ammo type (particularly grenades)
Thanks, it will be usefull!
|
Re: Getting ammo type (particularly grenades)
Quote:
|
Re: Getting ammo type (particularly grenades)
@Dr!fter, Probably less 4. According to github commits: 29 Dec 2014, 30 Jan 2015.
Don't know if will more because i changed system 4 Apr 2015 to auto getting prop from grenade entities. |
Re: Getting ammo type (particularly grenades)
L 08/22/2017 - 16:05:34: [SM] Error parsing gameconfig file "/home/csgo/27015/serverfiles/csgo/addons/sourcemod/gamedata/sm-cstrike.games/game.csgo.txt":
L 08/22/2017 - 16:05:34: [SM] Error 11 on line 12, col 9: A property was declared outside of a section |
Re: Getting ammo type (particularly grenades)
Kailo, who exactly edited the file and tossed these two lines of your gamedata?
|
Re: Getting ammo type (particularly grenades)
Michauux, what are you speaking about?
I didn't do anything other than this thread. |
Re: Getting ammo type (particularly grenades)
Put those files that are needed to the gamedata
|
All times are GMT -4. The time now is 13:03. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.