Raised This Month: $ Target: $400
 0% 

Help me with give nades, if i say /he


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Arje
Senior Member
Join Date: Apr 2020
Location: Córdoba, Argentina
Old 05-21-2020 , 17:51   Help me with give nades, if i say /he
Reply With Quote #1

Hello! , well i use this plugin that works correctly, giving me a grenade of each type, each round start, however I would like that also typing in chat "say / he; / fb; / sg" would also give me a grenade of that type respectively

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fun>
#include <hamsandwich>

public plugin_init()
{
    
register_plugin("PubGiveNades""1.0""Krtola")

    
RegisterHam(Ham_Spawn"player""spawn_add_he"1)
    
RegisterHam(Ham_Spawn"player""spawn_add_fb"1)
    
RegisterHam(Ham_Spawn"player""spawn_add_sg"1)
    
RegisterHam(Ham_Spawn"player""spawn_add_fb2"1)
}

public 
spawn_add_he(id)
{
    if(
is_user_alive(id))
    {
        if(!
user_has_weapon(idCSW_HEGRENADE))
                
give_item(id"weapon_hegrenade"
    }


public 
spawn_add_fb(id)
{
    if(
is_user_alive(id))
    {
        if(!
user_has_weapon(idCSW_FLASHBANG))
                
give_item(id"weapon_flashbang"
    }


public 
spawn_add_sg(id)
{
    if(
is_user_alive(id))
    {
        if(!
user_has_weapon(idCSW_SMOKEGRENADE))
                
give_item(id"weapon_smokegrenade"
    }

Arje is offline
 


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 17:04.


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