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

42
scripts/server/item.js Normal file
View File

@@ -0,0 +1,42 @@
// ===========================================================================
// Asshat Gaming RP
// http://asshatgaming.com
// © 2020 Asshat Gaming
// ---------------------------------------------------------------------------
// FILE: item.js
// DESC: Provides item functions and usage
// TYPE: Server (JavaScript)
// ===========================================================================
function initItemScript() {
return true;
}
// ---------------------------------------------------------------------------
function addItemCommandHandlers() {
return true;
}
// ---------------------------------------------------------------------------
function loadItemsFromDatabase() {
let tempItems = [];
let dbConnection = connectToDatabase();
if(dbConnection) {
let dbQuery = dbConnection.query("SELECT * FROM `item_main` WHERE `item_server` = " + getServerGame())
if(dbQuery) {
if(dbQuery.numRows > 0) {
while(dbFetchAssoc = dbQuery.fetchAssoc()) {
let tempItemData = getClasses().itemData(dbFetchAssoc);
tempItems.push(tempItemData);
}
}
dbQuery.free();
}
disconnectFromDatabase(dbConnection);
}
}
// ---------------------------------------------------------------------------