Add new script cvars system

This commit is contained in:
Vortrex
2022-12-10 01:54:01 -06:00
parent df05c18499
commit 268a3a5f60
2 changed files with 12 additions and 0 deletions

View File

@@ -464,4 +464,10 @@ function updatePlayerPing(playerName, ping) {
playerPing[playerName] = ping;
}
// ===========================================================================
function receiveClientVariablesFromServer(clientVariablesString) {
serverData.cvars = JSON.parse(clientVariablesString);
}
// ===========================================================================

View File

@@ -1317,4 +1317,10 @@ function fadePlayerCamera(client, fadeIn, time, colour = toColour(0, 0, 0, 255))
sendNetworkEventToPlayer("agrp.fadeCamera", client, fadeIn, time, colour);
}
// ==========================================================================
function sendClientVariablesToClient(client) {
sendNetworkEventToPlayer("agrp.cvar", client, JSON.stringify(clientVariables));
}
// ==========================================================================