Hi, I know this is an old thread, but I have a similiar request.
I would like to add a red and a blue dot to the radar. This should be work for all players.
I have tried to create this feature but the following code is not working. Only the red dot will draw, but only for terrorists.
PHP Code:
public func_draw_on_radar(taskid){
new Float:f_vOrigin[3][3], vOrigin[3][3]
pev(g_iEntity[TEAM_T], pev_origin, f_vOrigin[TEAM_T])
pev(g_iEntity[TEAM_CT], pev_origin, f_vOrigin[TEAM_CT])
FVecIVec(f_vOrigin[TEAM_T], vOrigin[TEAM_T])
FVecIVec(f_vOrigin[TEAM_CT], vOrigin[TEAM_CT])
for (new id = 1; id <= g_iMaxPlayers; id++){
if (is_user_alive(id) && !is_user_bot(id)){
// Must be called before we can update the position of the red dot
message_begin(MSG_ONE, gMsgBombPickup, { 0, 0, 0}, id)
message_end()
// Draw/Update red dot
message_begin(MSG_ONE, gMsgBombDrop, { 0, 0, 0}, id)
write_coord(vOrigin[TEAM_T][0])
write_coord(vOrigin[TEAM_T][1])
write_coord(vOrigin[TEAM_T][2])
write_byte(0)
message_end()
// Draw/Update blue dot
message_begin(MSG_ONE, gMsgHostagePos, { 0, 0, 0}, id)
write_byte(0)
write_byte(6)
write_coord(vOrigin[TEAM_CT][0])
write_coord(vOrigin[TEAM_CT][1])
write_coord(vOrigin[TEAM_CT][2])
message_end()
/* // Remove blue dot
message_begin(MSG_ONE, gMsgHostageK, { 0, 0, 0}, id)
write_byte(6)
message_end()
*/
}
}
}
Thanks in advance for any ideas
Leon