Raised This Month: $ Target: $400
 0% 

he grenade prb hns


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sum
Member
Join Date: Oct 2011
Old 04-29-2012 , 16:33   he grenade prb hns
Reply With Quote #1

Heyo, i got problem, this plugin gives admin_level_h flagged player at spawn each round He but only for 0.5 ms after its like sthk restricts it can u fix it please???


Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fun>
#include <fakemeta_util>

#define PLUGIN "HE SPAWN"
#define VERSION "1.0"
#define AUTHOR "Johny"


public plugin_init()
{
	RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1) 	
}
public fwHamPlayerSpawnPost() {

	new players[32], player, pnum;
	get_players(players, pnum, "a");
	for(new i = 0; i < pnum; i++)
	{
		player = players[i];
		if(is_user_alive(player) && get_user_flags(player) & ADMIN_LEVEL_H)
		{
		give_item(player, "weapon_hegrenade");
		}
	}
	return PLUGIN_HANDLED
}
Sum is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 04-29-2012 , 16:39   Re: he grenade prb hns
Reply With Quote #2

Remove that loop and get_players. Ham_Spawn is called seperately on every player's spawn and has the 'id' parameter.
Also you need only amxmodx, amxmisc, hamsandwich and fun includes.
__________________

Last edited by <VeCo>; 04-29-2012 at 16:39.
<VeCo> is offline
Old 04-29-2012, 17:31
Doc-Holiday
This message has been deleted by Doc-Holiday.
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 04-29-2012 , 17:34   Re: he grenade prb hns
Reply With Quote #3

This is correct:

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fun>
 
#define PLUGIN "HE SPAWN"
#define VERSION "1.0"
#define AUTHOR "Johny"
 
public plugin_init()
{
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1);  
}
 
public 
fwHamPlayerSpawnPost(id
{
    if(
is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)
    {
        
give_item(id"weapon_hegrenade");
    }

__________________

Last edited by <VeCo>; 04-29-2012 at 17:35.
<VeCo> is offline
Sum
Member
Join Date: Oct 2011
Old 04-30-2012 , 05:03   Re: he grenade prb hns
Reply With Quote #4

This is not workin , in hud it prints me He grenade icon but its red, somehow hns by exolent blocks He grenades by cvar, but i dont want to allow it at all, i want it restricted
Sum is offline
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 07:46.


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