Fix for civ generation during AFK in SA

This commit is contained in:
Vortrex
2020-12-21 22:50:03 -06:00
parent ddcc70afa8
commit 32ec2e631e

View File

@@ -24,8 +24,12 @@ addEventHandler("OnLostFocus", function(event) {
addEventHandler("OnFocus", function(event) { addEventHandler("OnFocus", function(event) {
triggerNetworkEvent("ag.afk", false); triggerNetworkEvent("ag.afk", false);
if(localPlayer != null) { if(localPlayer != null) {
localPlayer.collisionsEnabled = true; localPlayer.collisionsEnabled = true;
gta.setCiviliansEnabled(true); if(gta.game == GAME_GTA_SA) {
gta.setCiviliansEnabled(true);
}
gta.setTrafficEnabled(true); gta.setTrafficEnabled(true);
} }
}); });
// ----------------------------------------------------------------------------