Raised This Month: $12 Target: $400
 3% 

How to add grenades to the plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
doide li admina
Zero Posts
Join Date: Jun 2021
Location: Plovdiv
Old 06-17-2021 , 15:58   How to add grenades to the plugin
Reply With Quote #1

Good already! Because I tell everyone because I am from Bulgaria and the weather is different here and there are some people who are at night. Let's move on

So I have made a plugin with which to give grenades every 5 seconds but the plugin started but there are no grenades.

I just don't know what he's missing. I am still new and learning so I can move forward with you!

Source code:

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

#include < amxmodx >
#include < fun >
#include < csx >
#include < cstrike >

#define HUD_COLOR 255, 20, 150
#define HUD_POSITION 0.03, 0.90
#define HUD_DURATION 100000.0
#define HUD_TEXT "You have Grenade"

public client_putinserver(id) {
	set_task(2.1, "@hud_info", id, .flags = "z");


public plugin_init() 
{
    register_plugin( "Simple Nade Giver", "V2.2", "HarveyWNvm" );
}

public grenade_throw( id, greindex, wid ) 
{
    if( wid == CSW_HEGRENADE ) 
    {
        set_task( 5.0, "Reload", id );
    }
}

public Reload( id ) 
{
    if( !user_has_weapon( id, CSW_HEGRENADE ) && is_user_alive( id ) ) 
    {
        give_item( id, "weapon_hegrenade" );
    }
}
All I need to do is give grenades to each player. Giving grenades if you can set for 5 seconds to give Thank you for your attitude.

Last edited by doide li admina; 06-17-2021 at 15:59.
doide li admina is offline
Send a message via Skype™ to doide li admina
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 06:09.


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