Player ped network ID for IV
This commit is contained in:
@@ -74,6 +74,7 @@ function addAllNetworkHandlers() {
|
||||
addNetworkEventHandler("vrr.skinSelected", playerFinishedSkinSelection);
|
||||
addNetworkEventHandler("vrr.clientInfo", updateConnectionLogOnClientInfoReceive);
|
||||
addNetworkEventHandler("vrr.vehBuyState", receiveVehiclePurchaseStateUpdateFromClient);
|
||||
addNetworkEventHandler("vrr.playerPedId", receivePlayerPedNetworkId);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -223,29 +224,6 @@ function updatePlayerSnowState(client) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function sendExcludedModelsForGroundSnowToPlayer(client) {
|
||||
if(getGameConfig().excludedGroundSnowModels[getServerGame()].length > 0) {
|
||||
for(let i in getGameConfig().excludedGroundSnowModels[getServerGame()]) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Misc] Sending excluded model ${i} for ground snow to ${getPlayerName(client)}`);
|
||||
sendNetworkEventToPlayer("vrr.excludeGroundSnow", client, getGameConfig().excludedGroundSnowModels[getServerGame()][i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function sendRemovedWorldObjectsToPlayer(client) {
|
||||
if(getGameConfig().removedWorldObjects[getServerGame()].length > 0) {
|
||||
for(let i in getGameConfig().removedWorldObjects[getServerGame()]) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Client] Sending removed world object ${i} (${getGameConfig().removedWorldObjects[getServerGame()][i][0]}) to ${getPlayerName(client)}`);
|
||||
sendNetworkEventToPlayer("vrr.removeWorldObject", client, getGameConfig().removedWorldObjects[getServerGame()][i][0], getGameConfig().removedWorldObjects[getServerGame()][i][1], getGameConfig().removedWorldObjects[getServerGame()][i][2]);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function updatePlayerHotBar(client) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Client] Sending updated hotbar data to ${getPlayerDisplayForConsole(client)}`);
|
||||
let tempHotBarItems = [];
|
||||
@@ -1053,12 +1031,6 @@ function setPlayerHeadLookPosition(client, position) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function sendPlayerGameScriptState(client, scriptName, state) {
|
||||
sendNetworkEventToPlayer("vrr.gameScript", client, scriptName, state);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function requestClientInfo(client) {
|
||||
sendNetworkEventToPlayer("vrr.clientInfo", client);
|
||||
}
|
||||
@@ -1078,7 +1050,10 @@ function forcePlayerToSyncElementProperties(client, element) {
|
||||
// ===========================================================================
|
||||
|
||||
function sendPlayerPedPartsAndProps(client) {
|
||||
sendNetworkEventToPlayer("vrr.ped")
|
||||
let bodyParts = getPlayerCurrentSubAccount(client).bodyParts;
|
||||
let bodyProps = getPlayerCurrentSubAccount(client).bodyProps;
|
||||
|
||||
sendNetworkEventToPlayer("vrr.ped", client, [bodyParts.hair, bodyParts.head, bodyParts.upper, bodyParts.lower], [bodyProps.hair, bodyProps.eyes, bodyProps.head, bodyProps.leftHand, bodyProps.rightHand, bodyProps.leftWrist, bodyProps.rightWrist, bodyParts.hip, bodyProps.leftFoot, bodyProps.rightFoot]);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1171,7 +1146,19 @@ function sendAllHouseEntrancesToPlayer(client) {
|
||||
// ==========================================================================
|
||||
|
||||
function makePlayerHoldObjectModel(client, modelIndex) {
|
||||
sendNetworkEventToPlayer("vrr.holdObject", client, modelIndex);
|
||||
sendNetworkEventToPlayer("vrr.holdObject", client, getPlayerData(client).pedId, modelIndex);
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
|
||||
function receivePlayerPedNetworkId(client, pedId) {
|
||||
getPlayerData(client).pedId = pedId;
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
|
||||
function requestPlayerPedNetworkId(client) {
|
||||
sendNetworkEventToPlayer("vrr.playerPedId", client);
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
Reference in New Issue
Block a user