Check for server elements on spawn

This commit is contained in:
Vortrex
2022-08-10 14:16:29 -05:00
parent beec73daed
commit 7a71c08c3d

View File

@@ -596,6 +596,7 @@ async function onPlayerSpawn(client) {
setPlayerWeaponDamageEvent(client, AGRP_WEAPON_DAMAGE_EVENT_NORMAL); setPlayerWeaponDamageEvent(client, AGRP_WEAPON_DAMAGE_EVENT_NORMAL);
if (areServerElementsSupported()) {
if (getGlobalConfig().playerStreamInDistance == -1 || getGlobalConfig().playerStreamOutDistance == -1) { if (getGlobalConfig().playerStreamInDistance == -1 || getGlobalConfig().playerStreamOutDistance == -1) {
getPlayerPed(client).netFlags.distanceStreaming = false; getPlayerPed(client).netFlags.distanceStreaming = false;
} else { } else {
@@ -604,6 +605,7 @@ async function onPlayerSpawn(client) {
} }
resetPlayerBlip(client); resetPlayerBlip(client);
}
// Radio stuff must be last thing sent to client because it hangs the client for a second, which blocks processing of other incoming packets // Radio stuff must be last thing sent to client because it hangs the client for a second, which blocks processing of other incoming packets
// Start playing business/house radio if in one // Start playing business/house radio if in one