Payphone net events

This commit is contained in:
Vortrex
2023-02-25 04:42:39 -06:00
parent f4a2425fce
commit 0c7b25d0a8

View File

@@ -1142,6 +1142,12 @@ function sendVehicleToPlayer(client, vehicleId, isDeleted, model, position, head
// ==========================================================================
function sendPayPhoneToPlayer(client, payPhoneId, isDeleted, state, position) {
sendNetworkEventToPlayer("v.rp.payPhone", client, payPhoneId, isDeleted, state, position);
}
// ==========================================================================
function sendAllBusinessesToPlayer(client) {
sendNetworkEventToPlayer("v.rp.removeBusinesses", client);
@@ -1188,6 +1194,17 @@ function sendAllVehiclesToPlayer(client) {
// ==========================================================================
function sendAllPayPhonesToPlayer(client) {
sendNetworkEventToPlayer("v.rp.removePayPhones", client);
let payPhones = getServerData().payPhones;
for (let i in payPhones) {
sendPayPhoneToPlayer(client, payPhones[i].index, false, payPhones[i].state, payPhones[i].position);
}
}
// ==========================================================================
function makePlayerHoldObjectModel(client, modelIndex) {
sendNetworkEventToPlayer("v.rp.holdObject", client, getPlayerData(client).ped, modelIndex);
}
@@ -1357,4 +1374,28 @@ function requestPlayerToken(client) {
sendNetworkEventToPlayer("v.rp.token", client);
}
// ==========================================================================
function sendPayPhoneStateToClient(client, payPhoneIndex, state) {
sendNetworkEventToPlayer("v.rp.payPhoneState", client, payPhoneIndex, state);
}
// ==========================================================================
function sendPayPhoneDialingToPlayer(client) {
sendNetworkEventToPlayer("v.rp.payPhoneDial", client);
}
// ==========================================================================
function sendPayPhoneHangupToPlayer(client) {
sendNetworkEventToPlayer("v.rp.payPhoneHangup", client);
}
// ==========================================================================
function sendPayPhonePickupToPlayer(client) {
sendNetworkEventToPlayer("v.rp.payPhonePickup", client);
}
// ==========================================================================