Raised This Month: $ Target: $400
 0% 

Print Chat


Post New Thread Reply   
 
Thread Tools Display Modes
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
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 01-06-2016 , 07:30   Re: Print Chat
Reply With Quote #2

Quote:
Originally Posted by Sn3amtz View Post
I Want To Get For Victim Only Message
Do you want to what with developer? Please explain better.

Quote:
Originally Posted by Sn3amtz View Post
I tried server_print("SLAY FOR USING DEVELOPER",get_user_name(id))
But nothing
Do you tried to do that, to do what?


What is using developer?
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
Sn3amtz
Senior Member
Join Date: Jan 2015
Location: France
Old 01-06-2016 , 11:17   Re: Print Chat
Reply With Quote #3

I want to get message only to victim
This message
client_print(0, print_chat, " %s slayed for using developer",name)

client_print show message to all

Last edited by Sn3amtz; 01-06-2016 at 11:19.
Sn3amtz is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 01-06-2016 , 11:58   Re: Print Chat
Reply With Quote #4

Quote:
Originally Posted by Sn3amtz View Post
I want to get message only to victim
This message
client_print(0, print_chat, " %s slayed for using developer",name)

client_print show message to all
try changing it to:
Code:
client_print(id, print_chat, " %s slayed for using developer",name)
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
Sn3amtz
Senior Member
Join Date: Jan 2015
Location: France
Old 01-06-2016 , 12:17   Re: Print Chat
Reply With Quote #5

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


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