Raised This Month: $ Target: $400
 0% 

[CS:GO] Weapon Attachment API


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mitchell
~lick~
Join Date: Mar 2010
Plugin ID:
5135
Plugin Version:
1.0.0
Plugin Category:
Technical/Development
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
    14 
    Plugin Description:
    Development tool to be able to get the weapon attachment positions easily.
    Old 04-13-2016 , 21:25   [CS:GO] Weapon Attachment API
    Reply With Quote #1

    Weapon Attachment API

    This plugin main function was to easily get the weapons' end position of the barrel (muzzle_flash) in CS:GO. However there are some other uses to it also.


    Natives
    Inside WeaponAttachmentAPI.inc:
    Code:
    /**
     * Gets the attachment postion of the client's current weapon.
     *
     * @param client		Client index
     * @param attachment	The attachment point to look up
     * @return 				Returns false if the position could not be looked up
     * @error				Invalid client.
     */
    native bool WA_GetAttachmentPos(int client, char[] attachment, float pos[3]);
    Plugins
    WA Weapon Lasers - Simple plugin that shows lasers when ever you shoot.
    WA Laser Tag- More advanced version, that can act as a gamemode.


    Downloads
    Plugin
    Source
    Include File

    GitHub Link

    Last edited by Mitchell; 02-13-2017 at 13:48.
    Mitchell is offline
    nguyenbaodanh
    AlliedModders Donor
    Join Date: Jun 2007
    Location: HCMC, Vietnam
    Old 04-14-2016 , 06:43   Re: [ANY?] Weapon Attachment API
    Reply With Quote #2

    Quote:
    Plugins
    Weapon Lasers
    link not work
    __________________
    nguyenbaodanh is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 04-14-2016 , 08:44   Re: [ANY?] Weapon Attachment API
    Reply With Quote #3

    Quote:
    Originally Posted by nguyenbaodanh View Post
    link not work
    I havent posted it yet. It will be up later today.
    Mitchell is offline
    iGANGNAM
    AlliedModders Donor
    Join Date: Sep 2012
    Location: Lithuania
    Old 04-14-2016 , 09:57   Re: [ANY?] Weapon Attachment API
    Reply With Quote #4

    Is it possible to change muzzle flash color or effect?
    __________________

    Last edited by iGANGNAM; 04-14-2016 at 09:57.
    iGANGNAM is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 04-14-2016 , 10:14   Re: [ANY?] Weapon Attachment API
    Reply With Quote #5

    Quote:
    Originally Posted by iGANGNAM View Post
    Is it possible to change muzzle flash color or effect?
    Well there's a temp ent for Muzzle Flash, but im not sure, because you would need to prevent the old muzzle flash from appearing to clients.
    Mitchell is offline
    Addicted.
    AlliedModders Donor
    Join Date: Dec 2013
    Location: 0xA9D0DC
    Old 04-14-2016 , 10:15   Re: [ANY?] Weapon Attachment API
    Reply With Quote #6

    Nice share!

    I was working on this but didn't have any time lately, thanks!
    Addicted. is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 04-14-2016 , 10:25   Re: [ANY?] Weapon Attachment API
    Reply With Quote #7

    I have updated the thread to include WA Simple Weapon Lasers



    Later tonight i will look into other games that this supports (such as tf2/dod/cs:s)

    Last edited by Mitchell; 04-14-2016 at 11:02.
    Mitchell is offline
    xines
    Veteran Member
    Join Date: Aug 2013
    Location: Denmark
    Old 04-14-2016 , 11:11   Re: [ANY?] Weapon Attachment API
    Reply With Quote #8

    Quote:
    Originally Posted by Mitchell View Post
    I have updated the thread to include WA Simple Weapon Lasers

    Later tonight i will look into other games that this supports (such as tf2/dod/cs:s)
    Cool plugin good job !

    Just tested for CS:S and can confirm it arent working .

    Error:
    PHP Code:
    L 04/14/2016 15:52:29: [SMNative "GetEntPropEnt" reportedProperty "m_hWeaponWorldModel" not found (entity 76/weapon_usp)
    L 04/14/2016 15:52:29: [SMDisplaying call stack trace for plugin "WeaponAttachmentAPI.smx":
    L 04/14/2016 15:52:29: [SM]   [0]  Line 90WeaponAttachmentAPI.sp::GetAttachmentPosition()
    L 04/14/2016 15:52:29: [SM]   [1]  Line 55WeaponAttachmentAPI.sp::Native_GetAttachmentPos()
    L 04/14/2016 15:52:29: [SMNative "WA_GetAttachmentPos" reportedError encountered while processing a dynamic native
    L 04
    /14/2016 15:52:29: [SMDisplaying call stack trace for plugin "shootpoint.smx":
    L 04/14/2016 15:52:29: [SM]   [0]  Line 38shootpoint.sp::Timer_ShowBeam() 
    __________________
    xines is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 04-14-2016 , 11:16   Re: [ANY?] Weapon Attachment API
    Reply With Quote #9

    Quote:
    Originally Posted by xines View Post
    Cool plugin good job !

    Just tested for CS:S and can confirm it arent working .

    Error:
    PHP Code:
    L 04/14/2016 15:52:29: [SMNative "GetEntPropEnt" reportedProperty "m_hWeaponWorldModel" not found (entity 76/weapon_usp)
    L 04/14/2016 15:52:29: [SMDisplaying call stack trace for plugin "WeaponAttachmentAPI.smx":
    L 04/14/2016 15:52:29: [SM]   [0]  Line 90WeaponAttachmentAPI.sp::GetAttachmentPosition()
    L 04/14/2016 15:52:29: [SM]   [1]  Line 55WeaponAttachmentAPI.sp::Native_GetAttachmentPos()
    L 04/14/2016 15:52:29: [SMNative "WA_GetAttachmentPos" reportedError encountered while processing a dynamic native
    L 04
    /14/2016 15:52:29: [SMDisplaying call stack trace for plugin "shootpoint.smx":
    L 04/14/2016 15:52:29: [SM]   [0]  Line 38shootpoint.sp::Timer_ShowBeam() 
    Mind pm'ing me the netprops.txt? I dont have a srcds setup for cs:s or dod:s
    Mitchell is offline
    xines
    Veteran Member
    Join Date: Aug 2013
    Location: Denmark
    Old 04-14-2016 , 11:23   Re: [ANY?] Weapon Attachment API
    Reply With Quote #10

    Quote:
    Originally Posted by Mitchell View Post
    Mind pm'ing me the netprops.txt? I dont have a srcds setup for cs:s or dod:s
    Sure
    __________________
    xines 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 18:19.


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