Raised This Month: $115 Target: $400
 28% 

[CS:GO] Zero Ammo


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Byte
Senior Member
Join Date: Jun 2010
Location: 0:0:0:0:0:0:0:1
Plugin ID:
4722
Plugin Version:
1.00
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Set the ammo of every gun to 0.
    Old 07-09-2015 , 16:53   [CS:GO] Zero Ammo
    Reply With Quote #1

    Description
    Sets the ammo of all guns picked up, spawned, bought from buy menu to 0.
    This is useful for some custom gamemode servers where killing others is not an objective but weapons are still allowed.

    This plugin sets the ammo to 0 for all gun entities including those that have custom skins applied to them via m_nFallbackPaintKit.
    Attached Files
    File Type: sp Get Plugin or Get Source (zeroammo.sp - 490 views - 1.6 KB)
    __________________

    STEAM: /id/invexbyte | My Community: Invex Gaming | My Plugins: Click Me!

    Last edited by Byte; 07-09-2015 at 16:53.
    Byte is offline
    FrostSurf
    Member
    Join Date: Oct 2014
    Old 08-09-2015 , 20:22   Re: [CS:GO] Zero Ammo
    Reply With Quote #2

    When i spawn i have full ammo on my pistol i need to change back to the knife and back to the pistol and then the ammo disappears ?
    FrostSurf is offline
    Headline
    SourceMod Moderator
    Join Date: Mar 2015
    Location: 32.7157 N, 117.1611 W
    Old 08-09-2015 , 20:49   Re: [CS:GO] Zero Ammo
    Reply With Quote #3

    Quote:
    Originally Posted by FrostSurf View Post
    When i spawn i have full ammo on my pistol i need to change back to the knife and back to the pistol and then the ammo disappears ?
    I'm pretty sure that this is one of the many things CS:GO will bug out with.


    I remember running into this problem before and there was no real solution I found. I must have tried 15 different methods on removing a client's ammo with no bugs.
    __________________
    Headline is offline
    FrostSurf
    Member
    Join Date: Oct 2014
    Old 08-09-2015 , 22:20   Re: [CS:GO] Zero Ammo
    Reply With Quote #4

    Quote:
    Originally Posted by Headline22 View Post
    I'm pretty sure that this is one of the many things CS:GO will bug out with.


    I remember running into this problem before and there was no real solution I found. I must have tried 15 different methods on removing a client's ammo with no bugs.
    Yeah :/
    FrostSurf is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 08-10-2015 , 02:21   Re: [CS:GO] Zero Ammo
    Reply With Quote #5

    suggestion,
    Use event
    - item_equip


    - Make little delay when event executed. Create timer with 0.0 interval, pass event "userid" to timer callback, use timer flag TIMER_FLAG_NO_MAPCHANGE
    - On that timer cb, find player with given "userid", remove player ammo from current active weapon.

    Not need use SDKHooks, less code.
    __________________

    Last edited by Bacardi; 08-10-2015 at 02:24.
    Bacardi is offline
    Dr. Api
    BANNED
    Join Date: Mar 2015
    Location: France
    Old 08-10-2015 , 02:37   Re: [CS:GO] Zero Ammo
    Reply With Quote #6

    Check my plugin is already do that.
    Dr. Api 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 13:26.


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