Raised This Month: $ Target: $400
 0% 

Hudmessage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZooYork
Member
Join Date: Aug 2006
Location: in amxmodx forums
Old 04-10-2007 , 14:38   Hudmessage
Reply With Quote #1

How to make hudmessage to pulse and make it to random colors every second?
__________________
Zoo York Inst. Search! In the
amxmodx forums.
ZooYork is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 04-10-2007 , 15:13   Re: Hudmessage
Reply With Quote #2

for pulse effect set effects = 1 ! Ex:

Code:
set_hudmessage(0,255, 0, 0.30, 0.85, 1, 6.0, 6.0);
0,255,0 = colors
0.30,0.85 = position
1 = effect
6.0 = fx time
6.0 = hold time
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
ZooYork
Member
Join Date: Aug 2006
Location: in amxmodx forums
Old 04-10-2007 , 15:58   Re: Hudmessage
Reply With Quote #3

Quote:
Originally Posted by Alka View Post
for pulse effect set effects = 1 ! Ex:

Code:
set_hudmessage(0,255, 0, 0.30, 0.85, 1, 6.0, 6.0);
0,255,0 = colors
0.30,0.85 = position
1 = effect
6.0 = fx time
6.0 = hold time
PHP Code:
#include <amxmodx>
 
public plugin_init()
{
 
register_clcmd("say /kill""cmdTest")
 
}
 
public 
cmdTest(id)
{
new 
playername[18
get_user_name(idplayername17)
 
ColorChat(0GREEN"^x04[test] %s made suicide^x04""playername""green");
user_kill id1)
return 
PLUGIN_HANDLED;

What else i need to add that it would work?
EDIT: i mean playername

Code:
It shows as: [test] playername made suicide
__________________
Zoo York Inst. Search! In the
amxmodx forums.
ZooYork is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-10-2007 , 16:24   Re: Hudmessage
Reply With Quote #4

ColorChat(0, GREEN, "^x04[test] %s made suicide^x04", playername, "green"); ?
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 04-10-2007 , 16:26   Re: Hudmessage
Reply With Quote #5

=>> 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 
pname[32
get_user_name(idpname31)
console_cmd(id,"kill")
ColorChat(0GREEN"[^x04test^x01] ^x03%s made suicide!",pname);
}
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;

Updated!
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 04-11-2007 at 02:09.
Alka is offline
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
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 04-10-2007 , 16:49   Re: Hudmessage
Reply With Quote #7

hmmm...dunno! i try to make something...
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
pRED*
Join Date: Dec 2006
Old 04-10-2007 , 17:41   Re: Hudmessage
Reply With Quote #8

Code:
new temp[128]; format(temp,127,"[^x04test^x01] ^x03%s made suicide!",playername) ColorChat(0, GREEN, temp);
pRED* is offline
ZooYork
Member
Join Date: Aug 2006
Location: in amxmodx forums
Old 04-10-2007 , 17:53   Re: Hudmessage
Reply With Quote #9

Quote:
Originally Posted by pRED* | NZ View Post
Code:
new temp[128];</p><p>&nbsp;</p><p>format(temp,127,"[^x04test^x01] ^x03%s made suicide!",playername)</p><p>&nbsp;</p><p>ColorChat(0, GREEN, temp);
it worked, but still how can i make random effect to something? "little" tutorial about that would be nice ;)
__________________
Zoo York Inst. Search! In the
amxmodx forums.
ZooYork is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-10-2007 , 17:53   Re: Hudmessage
Reply With Quote #10

Quote:
Originally Posted by pRED* | NZ View Post
Code:
new temp[128]; format(temp,127,"[^x04test^x01] ^x03%s made suicide!",playername) ColorChat(0, GREEN, temp);
The stock ColorChat allow so you don't have to do pre formating like that but you always can do that.


@ ZooYork

Have you even tried the change Alka did? Cause his/her looks correct
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
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 06:39.


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