That is very very clean, thanks mate010.
THe only thins, is their a green hud for regulars and red hud for admins? I only saw one set_hudmessage. Sorry guys, but thanks soo much
This is what I got it so far.
( i know the client cmd doesnt work in that spot...) I was trying to find different ways to emmit the sound, but... blah
HTML Code:
#include <amxmodx>
#include <amxmisc>
#include <csstats>
new g_szSoundFile[] = "buttons/blip1.wav";
public plugin_precache()
{
precache_sound(g_szSoundFile);
}
public plugin_init() {
register_plugin("Enter Leave Message", "1.0", "MaTTe");
}
public client_connect(id) {
if(is_user_bot(id))
return PLUGIN_CONTINUE;
new name[32];
get_user_name(id, name, 31);
new data[8], rankpos[8], pos;
pos = get_user_stats(id, data, data);
num_to_str(pos, rankpos, 7);
set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 12.0, 0.1, 0.2, -1);
if(is_user_admin(id)) {
client_cmd(param[0],"spk %s", g_szSoundFile);
show_hudmessage(0, "Admin %s has just joined |AoC|!^n(Rank is %s)\nSo watch out! =)", name, rankpos);
} else {
set_hudmessage(255, 0, 0, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, -1)
show_hudmessage(0, "Player %s has just joined |AoC|!^n(Rank is %s)\nEnjoy you stay!", name, rankpos);
}
}
__________________