I'm trying to show a hostage death to CT only. The code I tried using will show it to both terrorist and counter-terrorist so I guess if you send the message to one player it will auto send it to all players.
I also tried to block the message but it seems you can't block messages you create in the plugin?
Here is my code:
PHP Code:
new playerCount, i, players[32], team;
get_players(players, playerCount, "ach");
for(i=0; i<playerCount; i++)
{
team = get_pdata_int(players[i], 114, 5);
if(team == 2)
{
message_begin(MSG_ALL, get_user_msgid("HostagePos"), {0,0,0}, players[i]);
write_byte(1);
write_byte(1);
write_coord(floatround(entOrigin[0]));
write_coord(floatround(entOrigin[1]));
write_coord(floatround(entOrigin[2]));
message_end();
message_begin(MSG_ALL, get_user_msgid("HostageK"), {0,0,0}, players[i]);
write_byte(1);
message_end();
}
}