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

He grenade on new round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
`666
AlliedModders Donor
Join Date: Jan 2006
Old 06-12-2007 , 09:09   He grenade on new round
Reply With Quote #1

Can some one please make simple plugin that gives he grenade to every player when new round starts (ofc if they don't have one already).
I know there is "he arena" plugin but it is too much of a spam.

Thanks.
`666 is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-12-2007 , 09:21   Re: He grenade on new round
Reply With Quote #2

=>>
Code:
#include <amxmodx>
#include <fun>
 
#define PLUGIN ""
#define VERSION ""
#define AUTHOR ""
 
public plugin_init() {
 
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_event("HLTV", "_new_round", "a", "1=0", "2=0") 
}
 
public _new_round()
{
    set_task(1.0,"give_nade")
}
 
public give_nade()
{
    new players[32], num
    get_players(players, num)
 
    new player
    for(new i = 0; i < num; i++)
    {
         player = players[i]
  
         if(user_has_weapon(player,CSW_HEGRENADE))
             return 1;
  
         give_item(player,"weapon_hegrenade")
 }
 return 1;
}
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
`666
AlliedModders Donor
Join Date: Jan 2006
Old 06-12-2007 , 09:29   Re: He grenade on new round
Reply With Quote #3

Big thanks Alka
`666 is offline
`666
AlliedModders Donor
Join Date: Jan 2006
Old 06-12-2007 , 10:50   Re: He grenade on new round
Reply With Quote #4

sometimes it doesn't give grenades to the people Could you please maybe change it to when players spawn instead of new round?
`666 is offline
`666
AlliedModders Donor
Join Date: Jan 2006
Old 06-12-2007 , 10:57   Re: He grenade on new round
Reply With Quote #5

i think because last enemy get killed by a car.
`666 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-12-2007 , 10:58   Re: He grenade on new round
Reply With Quote #6

Here :

Code:
#include <amxmodx> #include <fun>   #define PLUGIN  "Give HeGrenade" #define VERSION "1.0" #define AUTHOR  "AMXX Community" #define MAX_PLAYERS 32 new bool:g_restart_attempt[MAX_PLAYERS + 1];     public plugin_init() {     register_plugin( PLUGIN, VERSION, AUTHOR );         register_event( "ResetHUD", "event_hud_reset", "be" );     register_clcmd( "fullupdate", "clcmd_fullupdate" ) ;     register_event( "TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in" ); }   public clcmd_fullupdate() {     return PLUGIN_HANDLED_MAIN; }   public event_restart_attempt() {     new players[32], num;     get_players( players, num, "a" );         for ( new i; i < num; ++i )         g_restart_attempt[players[i]] = true; } public event_hud_reset( id ) {     if( g_restart_attempt[id] )     {         g_restart_attempt[id] = false;         return;     }     event_player_spawn( id ); } public event_player_spawn( id ) {     set_task( 1.0, "give_nade", id ); }   public give_nade( id ) {     if( !is_user_alive( id ) )         return;             if( user_has_weapon( id, CSW_HEGRENADE ) )         return;     give_item( id, "weapon_hegrenade" ); }
__________________

Last edited by Arkshine; 06-12-2007 at 11:04.
Arkshine is offline
`666
AlliedModders Donor
Join Date: Jan 2006
Old 06-12-2007 , 11:34   Re: He grenade on new round
Reply With Quote #7

thank you, this one works nicely
`666 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 03:04.


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