AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Update Dot On Radar? (https://forums.alliedmods.net/showthread.php?t=307731)

GoldNux 05-22-2018 14:56

[HELP] Update Dot On Radar?
 
I would like to display the position of one lone "gladiator" on the radar for CT's.
But for some reason the dot spawns in a random location..

Anyone know why?
Thanks.

Code:
public plugin_init() {     set_task(1.0,"refreshRadar", .flags="b");     gmsgHostagePos = get_user_msgid("HostagePos") } public refreshRadar() {     new players[32];     new playercount;     get_players(players, playercount);     new i     for (i=0; i<playercount; i++)     {         new gladiatorCoords[3]         if (cs_get_user_team(players[i]) == CS_TEAM_T)         {             get_user_origin(players[i], gladiatorCoords)         }         else if (cs_get_user_team(players[i]) == CS_TEAM_CT)         {             message_begin(MSG_ONE, gmsgHostagePos, {0,0,0}, players[i])             write_byte(1)             write_byte(1)             write_coord(gladiatorCoords[0])             write_coord(gladiatorCoords[1])             write_coord(gladiatorCoords[2])             message_end()         }     } }


All times are GMT -4. The time now is 04:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.