Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include < amxmodx >
- #include < cstrike >
- #include < fun >
- new g_Delay, g_contor[ 33 ];
- new g_Chan1, g_Chan2;
- public plugin_init( )
- {
- register_plugin "Give Free HE Grenade", "1.1", "KronoS # GG" ;
- g_Delay = register_cvar( "freehe_delay", "10" );
- g_Chan1 = CreateHudSyncObj();
- g_Chan2 = CreateHudSyncObj();
- }
- public client_putinserver( index )
- {
- g_contor[ index ] = 0;
- set_task 1.0, "Func_GiveHe", index, _, _, "b" ;
- }
- public Func_GiveHe( index )
- {
- if ( !is_user_alive( index ) || cs_get_user_bpammo( index , CSW_HEGRENADE ) > 0 )
- return;
- if ( g_contor[ index ] > 0 )
- {
- set_hudmessage 255, 0, 0, -1.0, 0.02, 0, 6.0, 12.0 ;
- ShowSyncHudMsg( index, g_Chan1, "Vei primi un HE gratis in %i secunde...", g_contor[ index ] );
- g_contor[ index ]--;
- return;
- }
- else
- {
- set_hudmessage 0, 255, 0, 0.02, 0.48, 0, 1.0, 1.0 ;
- ShowSyncHudMsg( index, g_Chan2, "Ai primit un HE gratis!" );
- g_contor[ index ] = get_pcvar_num( g_Delay );
- give_item index, "weapon_hegrenade" ;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement