Problems:
----------
1. Player name (name)
it replaces it with the hostname instead and I don't know why.
hostname, mapname, nextmap, players works perfecly.
2. spk (looked into speech.ini, but it wasn't same did I get when I didn't hear
the sounds in-game, hope you have an solution to get them to work without to do them into 1 .wav file so players don't need to download)
------------
Suggestion:
I can't really make
timeleft into it, wonder if you could do it (below
nextmap).
Code:
#include <amxmodx>
public plugin_init() {
register_plugin("AMXX Client Connect", "1.0", "Rirre")
set_task(16.0, "ClientConnect")
return PLUGIN_CONTINUE
}
public ClientConnect(id) {
new name[32], hostname[64]
new mapname[32], nextmap[32]
get_cvar_string("hostname",hostname,63)
get_user_name(id,name,31)
get_mapname(mapname,31)
get_cvar_string("amx_nextmap",nextmap,31)
client_cmd(id, ^"spk \'fvox/fuzz fuzz hev_logon\'^")
set_hudmessage(200,255,0, 0.0, 0.34, 0, 6.0, 15.0)
show_hudmessage(id, "Hi %s!^nWelcome to %s^nMap: %s^nNextmap: %s^nPlayers: %d/%d",name,hostname,mapname,nextmap,get_playersnum(),get_maxplayers())
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_sound("fvox/fuzz.wav")
precache_sound("fvox/hev_logon.wav")
}