Quote:
Originally Posted by fysiks
I would think you could hook intermission and play your sound then.
|
All about on why didn't work is because of cs_get_user_vip, why?
because:
PHP Code:
public TheEnd(id) {
if (cs_get_user_team(id) == CS_TEAM_CT) {
if (cs_get_user_vip(id)) { //If you do it withou is_user_alive, it will not work
client_cmd("spk %s",vip)
}
else {
client_cmd("spk %s",yes)
}
}
else if (cs_get_user_team(id) == CS_TEAM_T) {
client_cmd("spk %s",no)
}
}
And in that case I tried 2 thinks:
1:
PHP Code:
public TheEnd(id) {
if (cs_get_user_team(id) == CS_TEAM_CT) {
if (is_user_alive(id)) {
if (cs_get_user_vip(id)) {
client_cmd("spk %s",vip)
}
else {
client_cmd("spk %s",yes)
}
}
}
else if (cs_get_user_team(id) == CS_TEAM_T) {
client_cmd("spk %s",no)
}
}
2:
PHP Code:
static get[33]
public onSpawn(id) {
if (is_user_alive(id)) {
if (cs_get_user_vip(id)) {
get[id] = true
}
}
}
public TheEnd(id) {
if (cs_get_user_team(id) == CS_TEAM_CT) {
if (vip[id]) {
client_cmd("spk %s",vip)
}
else {
client_cmd("spk %s",yes)
}
}
else if (cs_get_user_team(id) == CS_TEAM_T) {
client_cmd("spk %s",no)
}
}
But nothing worked! Any ideas? You know I also registered the events!