03.09.2010, 15:21
I am making a COD like FFA and have made it so you cant see enemies unless you activate a UAV (/uav cmd)
The problem: When a player spawns, the script will check each spawned player if they have a UAV. If they do have a UAV then put all the red markers on, if they dont have a UAV then all markers turn invisible. However, when a person spawns, they will always appear on the map to everybody as a white marker for about a second even if the UAV is offline.
Is they anyway to stop that from happening? I know its not a big problem but it would make the GM a bit unfair and make the UAV more pointless.
Code under OnPlayerSpawn
Similar code is also ran under a repeating timer to update the UAV.
The problem: When a player spawns, the script will check each spawned player if they have a UAV. If they do have a UAV then put all the red markers on, if they dont have a UAV then all markers turn invisible. However, when a person spawns, they will always appear on the map to everybody as a white marker for about a second even if the UAV is offline.
Is they anyway to stop that from happening? I know its not a big problem but it would make the GM a bit unfair and make the UAV more pointless.
Code under OnPlayerSpawn
pawn Код:
if (GameMode == MODE_FREE) {
if (UAVTimer[playerid] > 0) {
for(new w = 0; w < MAX_PLAYERS; w++) {
SetPlayerMarkerForPlayer(playerid, w, (0xFF0000AA & 0xFF0000AA));
}
}
else {
for(new w = 0; w < MAX_PLAYERS; w++) {
SetPlayerMarkerForPlayer(playerid, w, (0xFF0000AA & 0xFFFFFF00));
}
}
}