Don't use timers for keybind send or element sync
This commit is contained in:
@@ -532,9 +532,10 @@ function onPlayerSpawn(client) {
|
|||||||
updatePlayerHotBar(client);
|
updatePlayerHotBar(client);
|
||||||
|
|
||||||
logToConsole(LOG_DEBUG, `[VRR.Event] Sending custom keybinds to ${getPlayerDisplayForConsole(client)}`);
|
logToConsole(LOG_DEBUG, `[VRR.Event] Sending custom keybinds to ${getPlayerDisplayForConsole(client)}`);
|
||||||
setTimeout(function() {
|
sendAccountKeyBindsToClient(client);
|
||||||
sendAccountKeyBindsToClient(client);
|
//setTimeout(function() {
|
||||||
}, 5000);
|
// sendAccountKeyBindsToClient(client);
|
||||||
|
//}, 5000);
|
||||||
|
|
||||||
logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s switchchar state to false`);
|
logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s switchchar state to false`);
|
||||||
getPlayerData(client).switchingCharacter = false;
|
getPlayerData(client).switchingCharacter = false;
|
||||||
@@ -569,9 +570,10 @@ function onPlayerSpawn(client) {
|
|||||||
logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped state to ready`);
|
logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped state to ready`);
|
||||||
getPlayerData(client).pedState = VRR_PEDSTATE_READY;
|
getPlayerData(client).pedState = VRR_PEDSTATE_READY;
|
||||||
|
|
||||||
setTimeout(function() {
|
syncPlayerProperties(client);
|
||||||
syncPlayerProperties(client);
|
//setTimeout(function() {
|
||||||
}, 1000);
|
// syncPlayerProperties(client);
|
||||||
|
//}, 1000);
|
||||||
|
|
||||||
logToConsole(LOG_DEBUG, `[VRR.Event] Syncing ${getPlayerDisplayForConsole(client)}'s cash ${getPlayerCurrentSubAccount(client).cash}`);
|
logToConsole(LOG_DEBUG, `[VRR.Event] Syncing ${getPlayerDisplayForConsole(client)}'s cash ${getPlayerCurrentSubAccount(client).cash}`);
|
||||||
updatePlayerCash(client);
|
updatePlayerCash(client);
|
||||||
|
|||||||
Reference in New Issue
Block a user