here this might help a little more with what it is i really want to accomplish, i have some code i found here that would post doublekills etc, it was set to just show the text and i wanted to make it to add sound to each one, here is the altered code for it, it is set to play global sounds but maybe not all want to hear them so i want to make it play to the person who got it only, if that is possible.
/*
==================
doublekills, multikills, monsterkills, etc
==================
*/
static void G_DoubleKill(gentity_t *ent) {
char *message;
if(!ent || !ent->client) {
return;
}
if(!g_doublekill.integer) {
return;
}
message = "";
if((level.time - ent->client->lastKillTime) > 1000) {
ent->client->doublekill = 0;
ent->client->lastKillTime = level.time;
return;
} else {
ent->client->doublekill++;
ent->client->lastKillTime = level.time;
}
switch(ent->client->doublekill) {
case 1:
message = "^z>>^?DOUBLE^z-^?KILL^z<<";
G_globalSound("sound/misc/doublekill.wav");
break;
case 2:
message = "^z>>^?MULTI^z-^?KILL^z<<";
G_globalSound("sound/misc/multikill.wav");
break;
case 3:
message = "^z>>^?MONSTER^z-^?KILL^z<<";
G_globalSound("sound/misc/monsterkill.wav");
break;
case 4:
message = "^z>>^?ULTRA^z-^?KILL^z<<";
G_globalSound("sound/misc/ultrakill.wav");
break;
case 5:
message = "^z>>^?LUDICROUS^z-^?KILL^z<<";
G_globalSound("sound/misc/ludicrouskill.wav");
break;
}
if( ent->client->doublekill >= 1 &&
ent->client->doublekill <= 5 ) {
CP(va("cp \"^1%s\"", message ));
}
}
thnx shadow commander for the original code:
http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=13612
is there a way i can do it ??