Raised This Month: $ Target: $400
 0% 

Hudmessage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ZooYork
Member
Join Date: Aug 2006
Location: in amxmodx forums
Old 04-10-2007 , 16:29   Re: Hudmessage
Reply With Quote #6

Quote:
Originally Posted by Alka View Post
=>> Dunno what you are trying to do
PHP Code:
#include <amxmodx>
 
#define MAXSLOTS 32
 
enum Color
{
YELLOW 1,
GREEN,
TEAM_COLOR,
GREY,
RED,
BLUE
}
 
new 
TeamName[][] = 
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}
 
new 
bool:IsConnected[MAXSLOTS 1];
new 
TeamInfoSayTextMaxSlots;
 
public 
plugin_init()
{
register_clcmd("say /kill""cmdTest");
 
TeamInfo get_user_msgid("TeamInfo");
SayText get_user_msgid("SayText");
MaxSlots get_maxplayers();
}
 
public 
cmdTest(id)
{
new 
playername[32
get_user_name(idplayername31)
ColorChat(0GREEN"[^x04test^x01] ^x03%s made suicide!",playername);
user_kill id1)
}
 
public 
ColorChat(idColor:type, const msg[], {Float,Sql,Result,_}:...)
{
static 
message[256];
switch(
type)

case 
YELLOW:
{
message[0] = 0x01;
}
case 
GREEN:
{
message[0] = 0x04;
}
default:
{
message[0] = 0x03;
}
}
vformat(message[1], 251msg4);
message[192] = '^0';
new 
teamColorChangeindexMSG_Type;
if(!
id)
{
index FindPlayer();
MSG_Type MSG_ALL;
} else {
MSG_Type MSG_ONE;
index id;
}
team get_user_team(index); 
ColorChange ColorSelection(indexMSG_Typetype);
ShowColorMessage(indexMSG_Typemessage);
if(
ColorChange)
{
Team_Info(indexMSG_TypeTeamName[team]);
}
}
ShowColorMessage(idtypemessage[])
{
message_begin(typeSayText_id);
write_byte(id)  
write_string(message);
message_end(); 
}
Team_Info(idtypeteam[])
{
message_begin(typeTeamInfo_id);
write_byte(id);
write_string(team);
message_end();
return 
1;
}
ColorSelection(indextypeColor:Type)
{
switch(
Type)
{
case 
RED:
{
return 
Team_Info(indextypeTeamName[1]);
}
case 
BLUE:
{
return 
Team_Info(indextypeTeamName[2]);
}
case 
GREY:
{
return 
Team_Info(indextypeTeamName[0]);
}
}
return 
0;
}
FindPlayer()
{
new 
= -1;
while(
<= MaxSlots)
{
if(
IsConnected[++i])
{
return 
i;
}
}
return -
1;

You know i got that part already coded, but it wont show the playername who typed the command.
EDIT: As i said before it shows like:
Code:
[test] playername made suicide
__________________
Zoo York Inst. Search! In the
amxmodx forums.

Last edited by ZooYork; 04-10-2007 at 16:40.
ZooYork 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 06:39.


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