View Single Post
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 05-05-2010 , 11:27   Re: [HELP] Set CT on T radar (and vice-versa)
Reply With Quote #6

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_originf_vOrigin[TEAM_T])
    
pev(g_iEntity[TEAM_CT], pev_originf_vOrigin[TEAM_CT])
    
FVecIVec(f_vOrigin[TEAM_T], vOrigin[TEAM_T])
    
FVecIVec(f_vOrigin[TEAM_CT], vOrigin[TEAM_CT])

    for (new 
id 1id <= g_iMaxPlayersid++){
        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_ONEgMsgBombPickup, { 000}, id)
            
message_end()

            
// Draw/Update red dot
            
message_begin(MSG_ONEgMsgBombDrop, { 000}, 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_ONEgMsgHostagePos, { 000}, 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

Last edited by Leon M.; 05-05-2010 at 13:52. Reason: Code added
Leon M. is offline