Raised This Month: $ Target: $400
 0% 

Print Chat


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Sn3amtz
Senior Member
Join Date: Jan 2015
Location: France
Old 01-06-2016 , 06:35   Print Chat
Reply With Quote #1

I Want To Get For Victim Only Message
I tried server_print("SLAY FOR USING DEVELOPER",get_user_name(id))
But nothing


Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define DEVELOPER_OFFSET         768
#define MAXWARNS 3
#define is_user_valid(%1) (1 <= %1 <= 32)
new cvar_MaxFps;
new iFrames[33]
new iWarnings[33]
new alive[33]
public plugin_init()
{
	register_plugin("Anti-developer", "1.0", "NeuTroN aka Menethil") 
	register_forward(FM_PlayerPreThink, "Fwd_PlayerPreThink") 
	cvar_MaxFps = register_cvar("amx_maxfps", "130")
	register_event( "DeathMsg", "eventDeath", "a" )
	RegisterHam(Ham_Spawn,"player","playerSpawn")
}

public Fwd_PlayerPreThink(id)
{
	if(!alive[id])
		return FMRES_IGNORED
	iFrames[id]++   
	return FMRES_IGNORED
}


public client_putinserver(id)
{
	iFrames[id] = 0
	set_task(1.0, "ShowFps",id+DEVELOPER_OFFSET, _, _, "b");
}

public ShowFps(id)
{   
	id-=DEVELOPER_OFFSET
	if(is_user_alive(id) && iFrames[id] >= get_pcvar_num(cvar_MaxFps))
	{
		iWarnings[id]++
		if(iWarnings[id] >= MAXWARNS)
		{
			new name[32]
			get_user_name(id,name,31)

                        user_kill(id)
			client_print(0, print_chat, " %s slayed for using developer",name)
		}
	}       
	iFrames[id] = 0
}

public client_disconnect(id)
{
	if(task_exists(id+DEVELOPER_OFFSET))
	{
		remove_task(id+DEVELOPER_OFFSET)
	}
}

public playerSpawn(id)
{
	alive[id] = 1
	return PLUGIN_CONTINUE
}   

public eventDeath()
{
	new victim = read_data(2)
	if(is_user_valid(victim))
	{
		alive[victim] = 0
	}
}
Sn3amtz is offline
 



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 09:24.


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