Use netevent for give weapon
This commit is contained in:
@@ -1013,4 +1013,11 @@ function setVehicleHealth(vehicle, health) {
|
|||||||
vehicle.health = 1000;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
Reference in New Issue
Block a user