Raised This Month: $ Target: $400
 0% 

Kill/Death Hud Display Plugin Problems & Voice Channel Inquiry


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Moe
Member
Join Date: Dec 2009
Location: GTA
Old 09-04-2010 , 22:42   Kill/Death Hud Display Plugin Problems & Voice Channel Inquiry
Reply With Quote #1

This is my code for my player display plugin. 0 compiling errors but when I put it in a server nothing happens xD
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
 
#define PLUGIN "Player Display"
#define VERSION "2.0"
#define AUTHOR "MoE | -hAbd-"
 
new bool:g_isconnected[33];
 
public 
plugin_init() 
{
 
register_plugin(PLUGINVERSIONAUTHOR); 
}
 
public 
client_connect(id)

 
g_isconnected[id] = true
 
if(g_isconnected[id] = true)
 {
  
set_task(1.0"DisplayKills"551__"b");
 }
}
 
public 
DisplayKills(id)
{
 new 
kills get_user_frags(id);
 new 
deaths cs_get_user_deaths(id);
 
set_hudmessage(025500.00.1506.01.0);
 
 
show_hudmessage(id"Kills: %d^nDeaths: %d"killsdeaths);
}
public 
client_disconnect(id)
{
 
g_isconnected[id] = false

------------

Also I was wondering how to make new voice channels? Nothing crazy with a menu or anything but is their a way to make a player only broadcast to their team or admins and stuff like that?
Moe is offline
analogg
Junior Member
Join Date: Sep 2009
Location: Ukraine
Old 09-05-2010 , 09:59   Re: Kill/Death Hud Display Plugin Problems & Voice Channel Inquiry
Reply With Quote #2

DisplayKills(id) ??? From where u get the user id ?
analogg is offline
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 09-05-2010 , 10:06   Re: Kill/Death Hud Display Plugin Problems & Voice Channel Inquiry
Reply With Quote #3

No where.

*I guess I will help. As of now, you are trying to pass 551 as "id". You do not need that bool. You can get rid of it. On client_putinserver(id) do set_task(1.0, "DisplayKills", id, _, _, "b"). Then on client_disconnect(id) just do remove_task(id).
__________________

Last edited by RedRobster; 09-05-2010 at 10:09.
RedRobster is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 09-05-2010 , 18:59   Re: Kill/Death Hud Display Plugin Problems & Voice Channel Inquiry
Reply With Quote #4

About the "custom voice channel", I belive you can use set_user_listen() so only admins can hear him at that time... but I think there are already plugins made with similar functions, search for "voice" or something in the plugins.
__________________
Hunter-Digital is offline
Moe
Member
Join Date: Dec 2009
Location: GTA
Old 09-05-2010 , 21:44   Re: Kill/Death Hud Display Plugin Problems & Voice Channel Inquiry
Reply With Quote #5

So this is now correct?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Player Display"
#define VERSION "2.0"
#define AUTHOR "MoE | -hAbd-"
new kills
new deaths
public plugin_init() 
{
 
register_plugin(PLUGINVERSIONAUTHOR); 
}
public 
client_putinserver(id)
{
 
set_task(1.0"DisplayKills"id__"b");
}
public 
DisplayKills(id)
{
 
kills get_user_frags(id);
 
deaths cs_get_user_deaths(id);
 
set_hudmessage(025500.00.1506.01.0);
 
 
show_hudmessage(id"Kills: %d^nDeaths: %d"killsdeaths);
}
public 
client_disconnect(id)
{
 
remove_task(id0)

----------

For set client listen how does it work as sender and receiver do you need to actually put their name? If someone could please explain it a little bit
Moe is offline
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 09-05-2010 , 21:49   Re: Kill/Death Hud Display Plugin Problems & Voice Channel Inquiry
Reply With Quote #6

Code:
Receiver and sender are players indices from 1 to 32.
http://www.amxmodx.org/funcwiki.php?go=func&id=113
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
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 16:15.


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