Raised This Month: $68 Target: $400
 17% 

[CSS] Custom weapons models interface (Redux)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Plugin ID:
4286
Plugin Version:
v1.0.1
Plugin Category:
Technical/Development
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    5 
    Plugin Description:
    Add´s support for custom weapons models
    Old 07-25-2014 , 17:57   [CSS] Custom weapons models interface (Redux)
    Reply With Quote #1

    Description:

    Add custom weapons models with a easy API for developers.

    This plugin use this snippet

    Need SMLIB for compile this plugin


    Natives:

    Code:
    /**
     * Set a custom model to a weapon.
     *
     * @param weaponindex            Weapon index for set model.
     * @param modelindex          Model index to set.
     * @param client           Client owned of weapon (0 = no client).
     * 
     * @noreturn			       
     */
    native CWI_SetWeapon(weaponindex, modelindex, client=0);
    
    
    
    /**
     * Remove the custom model to a weapon.
     *
     * @param weaponindex            Weapon index for remove the custom model.
     * @param client           Client owned of weapon (0 = no client).
     * 
     * @noreturn			       
     */
    native CWI_DelWeapon(weaponindex, client=0);

    Donations (optional):

    If you apreciate my work, you can donate me via paypal or with a trade offer


    Download:

    Main repository
    Direct download
    Code changes
    __________________
    Veteran SourceMod Coder -> Activity channel
    I dont accept more paid request, here why. If you want my private help then you could get it for free, just ask me on steam

    You like my work? Drop a +Rep in my steam profile comments


    Last edited by Franc1sco; 12-20-2015 at 10:27.
    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 07-25-2014 , 17:58   Re: [CSS] Custom Weapons Interface
    Reply With Quote #2

    Plugins using this interface:

    New subplugin:

    Knuckles

    knife are knuckles.
    Attached Files
    File Type: zip CWI - knuckles.zip (407.0 KB, 1561 views)
    __________________
    Veteran SourceMod Coder -> Activity channel
    I dont accept more paid request, here why. If you want my private help then you could get it for free, just ask me on steam

    You like my work? Drop a +Rep in my steam profile comments


    Last edited by Franc1sco; 07-25-2014 at 18:00.
    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    zeroibis
    Veteran Member
    Join Date: Jun 2007
    Old 07-25-2014 , 19:07   Re: [CSS] Custom weapons models interface (Redux)
    Reply With Quote #3

    Errors:
    Code:
    L 07/25/2014 - 19:04:11: [SM] Native "GetEdictClassname" reported: Invalid edict (3745 - -2145939807)
    L 07/25/2014 - 19:04:11: [SM] Displaying call stack trace for plugin "weapons_api.smx":
    L 07/25/2014 - 19:04:11: [SM]   [0]  Line 328, G:\Pawn Studio\compiler\weapons_api.sp::OnEntityDestroyed()
    L 07/25/2014 - 19:04:12: Error log file session closed.
    __________________
    zeroibis is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 07-25-2014 , 19:13   Re: [CSS] Custom weapons models interface (Redux)
    Reply With Quote #4

    Quote:
    Originally Posted by zeroibis View Post
    Errors:
    Code:
    L 07/25/2014 - 19:04:11: [SM] Native "GetEdictClassname" reported: Invalid edict (3745 - -2145939807)
    L 07/25/2014 - 19:04:11: [SM] Displaying call stack trace for plugin "weapons_api.smx":
    L 07/25/2014 - 19:04:11: [SM]   [0]  Line 328, G:\Pawn Studio\compiler\weapons_api.sp::OnEntityDestroyed()
    L 07/25/2014 - 19:04:12: Error log file session closed.
    Fixed, download new version in the first post
    __________________
    Veteran SourceMod Coder -> Activity channel
    I dont accept more paid request, here why. If you want my private help then you could get it for free, just ask me on steam

    You like my work? Drop a +Rep in my steam profile comments

    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    zeroibis
    Veteran Member
    Join Date: Jun 2007
    Old 07-25-2014 , 19:32   Re: [CSS] Custom weapons models interface (Redux) v1.0.1
    Reply With Quote #5

    Confirmed fixed
    __________________
    zeroibis is offline
    zeroibis
    Veteran Member
    Join Date: Jun 2007
    Old 07-25-2014 , 19:41   Re: [CSS] Custom weapons models interface (Redux) v1.0.1
    Reply With Quote #6

    Do you know if there is anything special about hegrenade_projectile b/c when I try to use it on that it does not work. No errors nothing.

    I also tried SetEntityModel and Entity_SetModelIndex and they did not work either. The only thing I have it is a Precache check b/c it will crash with an engine error saying it is not Precached yet likely b/c it makes that entity before the mapstart for some reason.
    __________________
    zeroibis is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 07-25-2014 , 19:54   Re: [CSS] Custom weapons models interface (Redux) v1.0.1
    Reply With Quote #7

    Quote:
    Originally Posted by zeroibis View Post
    Do you know if there is anything special about hegrenade_projectile b/c when I try to use it on that it does not work. No errors nothing.

    I also tried SetEntityModel and Entity_SetModelIndex and they did not work either. The only thing I have it is a Precache check b/c it will crash with an engine error saying it is not Precached yet likely b/c it makes that entity before the mapstart for some reason.
    This plugin is for change only viewmodels (for the moment), if you want to change projectile model you can use this other plugin
    __________________
    Veteran SourceMod Coder -> Activity channel
    I dont accept more paid request, here why. If you want my private help then you could get it for free, just ask me on steam

    You like my work? Drop a +Rep in my steam profile comments

    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    zeroibis
    Veteran Member
    Join Date: Jun 2007
    Old 07-25-2014 , 20:06   Re: [CSS] Custom weapons models interface (Redux) v1.0.1
    Reply With Quote #8

    Thanks, I read the source code of the link and found exactly what I was doing wrong!
    __________________
    zeroibis is offline
    zeroibis
    Veteran Member
    Join Date: Jun 2007
    Old 07-25-2014 , 20:29   Re: [CSS] Custom weapons models interface (Redux) v1.0.1
    Reply With Quote #9

    Ah also then I suppose if we want to change how it looks to other players we need to also use SetEntityModel() after CWI_SetWeapon() (obviously we need a wold model for the weapon we want to change and not a first person model)
    __________________
    zeroibis is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 07-25-2014 , 21:06   Re: [CSS] Custom weapons models interface (Redux) v1.0.1
    Reply With Quote #10

    Quote:
    Originally Posted by zeroibis View Post
    Ah also then I suppose if we want to change how it looks to other players we need to also use SetEntityModel() after CWI_SetWeapon() (obviously we need a wold model for the weapon we want to change and not a first person model)
    That is world model index, can be changed with the next code (I think)
    PHP Code:
    SetEntProp(WeaponIndexProp_Send"m_iWorldModelIndex"WeaponModel); 
    I will add it to my plugin soon
    __________________
    Veteran SourceMod Coder -> Activity channel
    I dont accept more paid request, here why. If you want my private help then you could get it for free, just ask me on steam

    You like my work? Drop a +Rep in my steam profile comments


    Last edited by Franc1sco; 07-25-2014 at 21:06.
    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    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 15:29.


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