Initial commit

This commit is contained in:
VortrexFTW
2020-09-04 15:56:19 -05:00
commit c536fcd6ef
245 changed files with 14997 additions and 0 deletions

37
scripts/client/main.js Normal file
View File

@@ -0,0 +1,37 @@
// ===========================================================================
// Asshat Gaming RP
// http://asshatgaming.com
// © 2020 Asshat Gaming
// ---------------------------------------------------------------------------
// FILE: main.js
// DESC: Main client script (will be reorganized into individual files later)
// TYPE: Client (JavaScript)
// ===========================================================================
addNetworkHandler("ag.connectCamera", function(cameraPosition, cameraLookat) {
gta.fadeCamera(true);
gta.setCameraLookAt(cameraPosition, cameraLookat, true);
});
// ---------------------------------------------------------------------------
addEventHandler("onPickupCollected", function(event, pickup, ped) {
// This won't be needed in next GTAC update. onPickupCollccted has been added server side
if(ped == localPlayer) {
triggerNetworkEvent("ag.onPickupCollected", pickup);
}
});
// ---------------------------------------------------------------------------
addNetworkHandler("ag.clearWeapons", function() {
localPlayer.clearWeapons();
});
// ---------------------------------------------------------------------------
addNetworkHandler("ag.giveWeapon", function(weaponId, ammo, active) {
localPlayer.giveWeapon(weaponId, ammo, active);
});
// ---------------------------------------------------------------------------