Use netevent for give weapon

This commit is contained in:
Vortrex
2022-03-03 01:19:14 -06:00
parent b88da6b2b7
commit 0d626bdce9

View File

@@ -1013,4 +1013,11 @@ function setVehicleHealth(vehicle, health) {
vehicle.health = 1000;
}
// ===========================================================================
function givePlayerWeapon(client, weaponId, ammo, active = true) {
logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to give weapon (Weapon: ${weaponId}, Ammo: ${ammo})`);
sendNetworkEventToPlayer("vrr.giveWeapon", client, weaponId, ammo, active);
}
// ===========================================================================