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

[L4D2] sm_give


Post New Thread Reply   
 
Thread Tools Display Modes
Author
user00111
New Member
Join Date: Apr 2013
Plugin ID:
4080
Plugin Version:
1.0
Plugin Category:
Fun Stuff
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Give yourself items/weapons at round start.
    Old 02-04-2014 , 07:09   [L4D2] sm_give
    Reply With Quote #1

    This plugin allows you to give yourself items/weapons at round start.

    Type !give kit pills ak47 magnum in chat to give yourself first_aid_kit, pain_pills, rifle_ak47 and pistol_magnum.

    Also with menu: Type !give only to open the give menu.

    Melee weapons also supported!

    Non-Admins can use this command only at round start (in safe room), admins can use the !give command any time (can be disabled with convar).


    Command:
    sm_give [item_name]

    ConVar: sm_give_adminsallowed - Admins allowed to use command any time?
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_give.sp - 4800 views - 6.4 KB)

    Last edited by user00111; 02-13-2014 at 04:17. Reason: Added description.
    user00111 is offline
    St00ne
    Veteran Member
    Join Date: Jan 2011
    Location: Annecy - France
    Old 12-03-2016 , 00:33   Re: [L4D2] sm_give
    Reply With Quote #2

    Hi,

    Great plugin, but just to let you know, I have this error in my logs:

    Quote:
    L 12/03/2016 - 05:44:13: [SM] Native "CloseHandle" reported: Handle 2f300a0 is invalid (error 3)
    L 12/03/2016 - 05:44:13: [SM] Displaying call stack trace for plugin "sm_give.smx":
    L 12/03/2016 - 05:44:13: [SM] [0] Line 200, /home/forums/content/files/2/2/7/3/7/5/130254.attach::ItemsMenuHandler()
    ++

    St00ne
    __________________

    *** *** ***
    -My plugins-
    St00ne is offline
    St00ne
    Veteran Member
    Join Date: Jan 2011
    Location: Annecy - France
    Old 12-06-2016 , 14:40   Re: [L4D2] sm_give
    Reply With Quote #3

    Hi,

    I fixed it by forcing the plugin to display main menu again when an item is dropped, instead of displaying items menu again.
    I noticed that this is what you coded already when a melee weapon was dropped (plugin displays main menu again and not melee menu), and there was no error when using the melee menu.
    So I only changed line 197 and it works like a charm.

    Code:
    DisplayMenu(menu, client, 60);
    has become:
    Code:
    DisplayGiveMenu(client, 60);
    New code attached.

    Regards,

    St00ne
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_give_givemenu.sp - 1361 views - 6.5 KB)
    __________________

    *** *** ***
    -My plugins-

    Last edited by St00ne; 12-06-2016 at 14:41.
    St00ne is offline
    Newbie_Sexy
    Member
    Join Date: Aug 2016
    Location: Vietnam
    Old 07-11-2017 , 11:55   Re: [L4D2] sm_give
    Reply With Quote #4

    Can someone improve this plugin so admin can do this anytime and can give to others?
    Newbie_Sexy is offline
    Psyk0tik
    Veteran Member
    Join Date: May 2012
    Location: Homeless
    Old 10-06-2017 , 02:56   Re: [L4D2] sm_give
    Reply With Quote #5

    Updated under 1.8.x.

    Changes:

    - Add L4D1 support.
    - For admins with root flag only (can use overrides to give other admin flags access to sm_give command). I made this change with VIP users in mind.
    - Added item name aliases to weapons with non-unique names.

    Without this fix:
    Example: sm_give rifle - this for some reason gives you a hunting rifle.

    With this fix:
    Example: sm_give m16 - this will give you the m16 assault rifle.

    List of item name aliases:

    Left 4 Dead 1:

    - M16 Assault Rifle: m16
    - Hunting Rifle: snipe
    - M1911 Pistol: dual
    - First Aid Kit: medkit

    Left 4 Dead 2:

    - M16 Assault Rifle: m16
    - P220 Pistol: dual
    - First Aid Kit: medkit

    l4d_sm_give.smx is for Left 4 Dead 1.

    l4d2_sm_give.smx is for Left 4 Dead 2.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_sm_give.sp - 1270 views - 4.4 KB)
    File Type: sp Get Plugin or Get Source (l4d2_sm_give.sp - 1722 views - 6.6 KB)
    __________________

    Last edited by Psyk0tik; 10-22-2017 at 11:18.
    Psyk0tik is offline
    Mi.Cura
    Veteran Member
    Join Date: Dec 2016
    Location: Brazil
    Old 05-28-2019 , 18:50   Re: [L4D2] sm_give
    Reply With Quote #6

    Hi,

    I'm trying to enable some items with different flags by adminoverides, but without success, someone could tell me the may be wrong.

    I already compiled the .SP, and changed the flag to ADMFLAG_KICK.
    RegAdminCmd ("sm_give", Cmd_SM_Give, ADMFLAG_KICK, "sm_give [item_name] [item_name]");

    Exemple:

    "sm_give rifle_m60" "t"
    "sm_give molotov" "z"
    "sm_give pipe_bomb" "z"
    "sm_give vomitjar" "z"
    "sm_give grenade_launcher" "t"
    "sm_give upgradepack_incendiary" "z"
    "sm_give upgradepack_explosive" "z"
    __________________
    Mi.Cura | Modded Servers | L4D2
    https://steamcommunity.com/groups/micuramodzombie

    Last edited by Mi.Cura; 05-28-2019 at 18:51.
    Mi.Cura is offline
    Psyk0tik
    Veteran Member
    Join Date: May 2012
    Location: Homeless
    Old 05-29-2019 , 23:11   Re: [L4D2] sm_give
    Reply With Quote #7

    Quote:
    Originally Posted by Mi.Cura View Post
    Hi,

    I'm trying to enable some items with different flags by adminoverides, but without success, someone could tell me the may be wrong.

    I already compiled the .SP, and changed the flag to ADMFLAG_KICK.
    RegAdminCmd ("sm_give", Cmd_SM_Give, ADMFLAG_KICK, "sm_give [item_name] [item_name]");

    Exemple:

    "sm_give rifle_m60" "t"
    "sm_give molotov" "z"
    "sm_give pipe_bomb" "z"
    "sm_give vomitjar" "z"
    "sm_give grenade_launcher" "t"
    "sm_give upgradepack_incendiary" "z"
    "sm_give upgradepack_explosive" "z"
    SM doesn't allow you to set overrides for specific arguments.
    __________________
    Psyk0tik is offline
    Mi.Cura
    Veteran Member
    Join Date: Dec 2016
    Location: Brazil
    Old 05-30-2019 , 11:01   Re: [L4D2] sm_give
    Reply With Quote #8

    OK, Thanks, Crasher
    __________________
    Mi.Cura | Modded Servers | L4D2
    https://steamcommunity.com/groups/micuramodzombie
    Mi.Cura is offline
    gamer_kanelita
    Senior Member
    Join Date: Jun 2019
    Location: Peru
    Old 04-02-2020 , 22:52   Re: [L4D2] sm_give
    Reply With Quote #9

    Good to all gamers, could someone help me like bindear using adrenaline directly, for example I have seen an admin when he wants to use adrenaline press his assigned button and directly cause the effect of adrenaline (that does not have his adrenaline loaded) if someone please know I would really appreciate it
    Buenas a todos gamers, podria ayudarme alguien como bindear usando la adrenalina directamente,por ejemplo he visto a un admin cuando quiere usar la adrenalina aprieta su boton asignado y directamente causa el efecto de la adrenalina ( eso que no tiene cargado su adrenalina) si alguien lo sabe porfavor se lo agradeceria mucho
    gamer_kanelita 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 05:57.


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