Raised This Month: $32 Target: $400
 8% 

[CSS] PreciseShot


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Xilver266
Member
Join Date: Apr 2011
Plugin ID:
3017
Plugin Version:
1.1
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Force drop weapon client on shooting him in the hands
    Old 06-15-2012 , 19:20   [CSS] PreciseShot
    Reply With Quote #1



    Force drop weapon client on shooting him in the hands


    SDK Hooks 2.1

    • sm_psweaponuse - Use a specific weapon for make the drop function
    • sm_psweaponname - Specific weapon (Dependency: sm_psweaponuse)
    • sm_damagecheck - Damage to force drop weapon
    • sm_psdamage - Amount of damage to force drop weapon (Dependency: sm_psdamagecheck)
    • sm_psclientmessage - Show messages to client


    Code:
    2012-17-06 (v1.1)
    
    * Fixed some bugs.
    * Native GetConVarInt() replaced by native GetConVarBool()
    
    2012-16-06 (v1.0)
    
    * Initial release.

    Place SMX in the plugins folder and you're done". A cfg file will be generated once the server has started (cfg/sourcemod/plugin.preciseshot.cfg)

    GitHub Repository
    Attached Files
    File Type: smx preciseshot.smx (3.7 KB, 426 views)
    File Type: sp Get Plugin or Get Source (preciseshot.sp - 417 views - 3.7 KB)
    __________________

    Last edited by Xilver266; 12-08-2013 at 16:37.
    Xilver266 is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 06-15-2012 , 19:34   Re: [CSS] PreciseShot
    Reply With Quote #2

    Could have sworn that something like this has been released before.. i may be wrong. Nice idea.

    Also, i would add translation, since half the script is in English, and half in spanish.?

    Last edited by Mitchell; 06-15-2012 at 19:36.
    Mitchell is offline
    Xilver266
    Member
    Join Date: Apr 2011
    Old 06-15-2012 , 21:01   Re: [CSS] PreciseShot
    Reply With Quote #3

    Quote:
    Originally Posted by Mitchell View Post
    Could have sworn that something like this has been released before.. i may be wrong. Nice idea.

    Also, i would add translation, since half the script is in English, and half in spanish.?
    Fixed, thanks
    __________________
    Xilver266 is offline
    angel635
    Senior Member
    Join Date: Apr 2011
    Old 06-16-2012 , 18:39   Re: [CSS] PreciseShot
    Reply With Quote #4

    hi

    Plz fix

    Error log :
    Attached Files
    File Type: log errors_20120617.log (510 Bytes, 338 views)
    angel635 is offline
    Xilver266
    Member
    Join Date: Apr 2011
    Old 06-16-2012 , 19:26   Re: [CSS] PreciseShot
    Reply With Quote #5

    Quote:
    Originally Posted by angel635 View Post
    hi

    Plz fix

    Error log :
    I don't get that error. Do yo installed SDK Hooks?
    __________________
    Xilver266 is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 06-17-2012 , 00:35   Re: [CSS] PreciseShot
    Reply With Quote #6

    Quote:
    Originally Posted by Xilver266 View Post
    I don't get that error. Do yo installed SDK Hooks?
    Quick tip!
    (since your using the same stock IsValidClient stock i have (weird!))
    Code:
        new String:g_Weapon[32];
        GetClientWeapon(attacker, g_Weapon, sizeof(g_Weapon));
        
        new String:g_WeaponName[32];
        GetConVarString(PSWeaponName, g_WeaponName, sizeof(g_WeaponName));
        
        if ( IsValidClient(attacker))
        {
    You are executing a function on a client, that maynot even exsist, i suggest checking if the client is 'valid' before getting his weapon name.
    Mitchell is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 06-20-2012 , 12:22   Re: [CSS] PreciseShot
    Reply With Quote #7

    Nice my friend (it was time for you publish something )

    However, you know this is rather like my other plugin ( https://forums.alliedmods.net/showthread.php?p=1621020 ) so you should mention.

    Hope that you update this plugin (since the code can be improved, I'll tell you).


    Spanish (lo que es español vamos)

    Bueno pues te hablo en español ahora xD ya por fin publicaste un plugin en sourcemod (aplausos)

    Este plugin se parece mucho al mio de avisos (demasiado diría yo xd) por lo que deberías mencionarlo en el post.

    También el código tiene algunos fallos de optimización y cosas que sobran que tendrías que mejorar (ya te contaré por privado).

    Haber si sigues así, que lo mismo consigues hacerme la competencia y todo xD ya que en España el único que publica plugins en sourcemod (y creo que también en eventscripts) soy yo (hasta ahora).
    __________________
    Veteran Coder -> Activity channel
    Coding on CS2 and taking paid and free jobs.

    Contact: Steam, Telegram or discord ( franug ).

    You like my work? +Rep in my steam profile comments or donate.

    Franc1sco is offline
    Send a message via MSN to Franc1sco
    relicek
    Member
    Join Date: Mar 2012
    Old 04-02-2013 , 18:22   Re: [CSS] PreciseShot
    Reply With Quote #8

    nice plugin, but it should have option to disable when someone shooting teammates so only enemy will drop weapon, because i can see that people will shoot themselves because they want for example awp that someone from their team have so please make option to disable it for team attack
    relicek is offline
    ecca
    Sexy Santa
    Join Date: Jan 2011
    Old 04-04-2013 , 13:11   Re: [CSS] PreciseShot
    Reply With Quote #9

    Good job. For some cleaning up and improvement in the code.
    • Cache the cvars on OnConfigsExecuted
    • All the if's you don't going to check an else on could you put into 1 if only.
    • Add a lateLoad check on pluginstart ?
    __________________

    Last edited by ecca; 04-04-2013 at 13:11.
    ecca is offline
    ilga80
    Senior Member
    Join Date: Nov 2012
    Old 04-05-2013 , 12:59   Re: [CSS] PreciseShot
    Reply With Quote #10

    There is a bug. If the player dropped the gun and picked it up again, it don't drops when firing into the hands
    ilga80 is offline
    Reply



    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 21:53.


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