Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Default]
- Version = 1
- ;; Used incase there is ever a breaking change, or to inform user in log about a new feature.
- Strip Chars = ";[]"
- ;; List of characters to strip out
- Strip Chars Mode = 0
- ;; 0 = Strip Bad Chars, 1 = Strip + Log Bad Chars, 2 = Return Error & Log Bad Chars
- ;; Note: Logging on works when sending data to database.
- Input SQF Parser = false
- ;; Expermential
- ;; If enabled will use SQF Array Parser instead of : seperator for values
- ;; i.e 0:SQL:UpdatePlayer:["Joe",[1,2,0],0.22333,"PlayerBackpack",-3]
- ;; Advantage is that you don't need to strip : seperator from user inputted values
- ;; Löschung alter Fahrzeuge/Sachen
- [resetLifeVehicles]
- SQL1_1 = CALL resetLifeVehicles
- [deleteOldHouses]
- SQL1_1 = CALL deleteOldHouses
- [deleteDeadVehicles]
- SQL1_1 = CALL deleteDeadVehicles
- [deleteOldGangs]
- SQL1_1 = CALL deleteOldGangs
- [deleteOldContainers]
- SQL1_1 = CALL deleteOldContainers
- ;; Erste anmeldung des Spielers
- [checkPlayerExists]
- SQL1_1 = SELECT pid, name FROM players WHERE pid = ?
- SQL1_INPUTS = 1-STRING
- OUTPUT = 1-STRING, 2-STRING
- [selectName]
- SQL1_1 = SELECT name FROM players WHERE pid = ?
- SQL1_INPUTS = 1-STRING
- OUTPUT = 1-STRING
- [insertNewPlayer]
- SQL1_1 = INSERT INTO players (pid, name, cash, bankacc, aliases, cop_licenses, med_licenses, civ_licenses, civ_gear, cop_gear, med_gear, adac_gear, adac_licenses) VALUES (?, ?, ?, ?, ?,'"[]"','"[]"','"[]"','"[]"','"[]"','"[]"','"[]"','"[]"')
- SQL1_INPUTS = 1, 2, 3, 4, 5
- ;; Polizei Sachen
- ;;--------------------------------------------------------------------------------------------------------------->
- ;; Select Cop Stats
- [selectWest]
- SQL1_1 = SELECT pid, name, cash, bankacc, adminlevel, donorlevel, cop_licenses, coplevel, cop_gear, blacklist, cop_stats, playtime, idcard_data_cop FROM players WHERE pid = ?
- SQL1_INPUTS = 1
- OUTPUT = 1-STRING, 2-STRING, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
- ;; Update Cop Stats
- [updateWest]
- SQL1_1 = UPDATE players SET name = ?, cash = ?, bankacc = ?, cop_gear = ?, cop_licenses = ?, cop_stats = ?, playtime = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2, 3, 4, 5, 6, 7, 8
- ;; Cop Lizenz
- [updateWestLicenses]
- SQL1_1 = UPDATE players SET cop_licenses = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- ;; Update Cop Gear
- [updateWestGear]
- SQL1_1 = UPDATE players SET cop_gear = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- ;; Zivilisten Sachen
- ;;--------------------------------------------------------------------------------------------------------------->
- ;; Select Civ Stats
- [selectCiv]
- SQL1_1 = SELECT pid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, civ_alive, civ_position, playtime, idcard_data_civ FROM players WHERE pid = ?
- SQL1_INPUTS = 1
- OUTPUT = 1-STRING, 2-STRING, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
- ;; Update Civ Stats
- [updateCiv]
- SQL1_1 = UPDATE players SET name = ?, cash = ?, bankacc = ?, civ_licenses = ?, civ_gear = ?, arrested = ?, civ_stats = ?, civ_alive = ?, civ_position = ?, playtime = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
- ;; Civ Lizenz
- [updateCivLicenses]
- SQL1_1 = UPDATE players SET civ_licenses = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- ;; Update civ gear
- [updateCivGear]
- SQL1_1 = UPDATE players SET civ_gear = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- ;; Civ position
- [updateCivPosition]
- SQL1_1 = UPDATE players SET civ_alive = ?, civ_position = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2, 3
- ;; civ alive or not
- [updateCivAlive]
- SQL1_1 = UPDATE players SET civ_alive = '0' WHERE civ_alive = '1'
- ;; Artz Sachen
- ;;--------------------------------------------------------------------------------------------------------------->
- ;; Select Artz stats
- [selectIndep]
- SQL1_1 = SELECT pid, name, cash, bankacc, adminlevel, donorlevel, med_licenses, mediclevel, med_gear, med_stats, playtime, idcard_data_med FROM players WHERE pid = ?
- SQL1_INPUTS = 1
- OUTPUT = 1-STRING, 2-STRING, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
- ;; Update Artz stats
- [updateIndep]
- SQL1_1 = UPDATE players SET name = ?, cash = ?, bankacc = ?, med_licenses = ?, med_gear = ?, med_stats = ?, playtime = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2, 3, 4, 5, 6, 7, 8
- ;; Artz Lizenz
- [updateIndepLicenses]
- SQL1_1 = UPDATE players SET med_licenses = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- ;; Update Artz gear
- [updateIndepGear]
- SQL1_1 = UPDATE players SET med_gear = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- ;; ADAC Sachen
- ;;--------------------------------------------------------------------------------------------------------------->
- ;; Select ADAC stats
- [selectEast]
- SQL1_1 = SELECT pid, name, cash, bankacc, adminlevel, donorlevel, adac_licenses, adaclevel, adac_gear, adac_stats, playtime, idcard_data_adac FROM players WHERE pid = ?
- SQL1_INPUTS = 1
- OUTPUT = 1-STRING, 2-STRING, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
- ;; Update ADAC stats
- [updateEast]
- SQL1_1 = UPDATE players SET name = ?, cash = ?, bankacc = ?, adac_licenses = ?, adac_gear = ?, adac_stats = ?, playtime = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2, 3, 4, 5, 6, 7, 8
- ;; ADAC Lizenz
- [updateEastLicenses]
- SQL1_1 = UPDATE players SET adac_licenses = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- ;; Update ADAC gear
- [updateEastGear]
- SQL1_1 = UPDATE players SET adac_gear = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- ;;--------------------------------------------------------------------------------------------------------------->
- ;;--------------------------------------------------------------------------------------------------------------->
- ;; Cash Update
- [updateCash]
- SQL1_1 = UPDATE players SET cash = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- ;; Bank Update
- [updateBank]
- SQL1_1 = UPDATE players SET bankacc = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- ;; Update cash & Bank
- [updateCashAndBank]
- SQL1_1 = UPDATE players SET cash = ?, bankacc = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2, 3
- ;;--------------------------------------------------------------------------------------------------------------->
- ;;--------------------------------------------------------------------------------------------------------------->
- ;; Wanted
- [updateArrested]
- SQL1_1 = UPDATE players SET arrested = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- [selectWanted]
- SQL1_1 = SELECT wantedID, wantedName, wantedCrimes, wantedBounty FROM wanted WHERE active = '1' AND wantedID = ?
- SQL1_INPUTS = 1
- OUTPUT = 1-STRING, 2-STRING, 3, 4
- [selectWantedID]
- SQL1_1 = SELECT wantedID FROM wanted WHERE wantedID = ?
- SQL1_INPUTS = 1
- OUTPUT = 1-STRING
- [selectWantedCrimes]
- SQL1_1 = SELECT wantedCrimes, wantedBounty FROM wanted WHERE wantedID = ?
- SQL1_INPUTS = 1
- [selectWantedActive]
- SQL1_1 = SELECT wantedCrimes, wantedBounty FROM wanted WHERE active = '1' AND wantedID = ?
- SQL1_INPUTS = 1
- [selectWantedActiveID]
- SQL1_1 = SELECT wantedID, wantedName FROM wanted WHERE active = '1' AND wantedID in (?)
- SQL1_INPUTS = 1
- OUTPUT = 1-STRING, 2-STRING
- [selectWantedBounty]
- SQL1_1 = SELECT wantedID, wantedName, wantedBounty FROM wanted WHERE active = '1' AND wantedID = ?
- SQL1_INPUTS = 1
- OUTPUT = 1-STRING, 2-STRING, 3
- [selectWantedName]
- SQL1_1 = SELECT wantedName FROM wanted WHERE wantedID = ?
- SQL1_INPUTS = 1
- OUTPUT = 1-STRING
- [insertWanted]
- SQL1_1 = INSERT INTO wanted (wantedID, wantedName, wantedCrimes, wantedBounty, active) VALUES (?, ?, ?, ?, '1')
- SQL1_INPUTS = 1, 2, 3, 4
- [updateWanted]
- SQL1_1 = UPDATE wanted SET wantedCrimes = ?, wantedBounty = wantedBounty + ?, active = '1' WHERE wantedID = ?
- SQL1_INPUTS = 1, 2, 3
- [updateWantedName]
- SQL1_1 = UPDATE wanted SET wantedName = ? WHERE wantedID = ?
- SQL1_INPUTS = 1, 2
- [deleteWanted]
- SQL1_1 = UPDATE wanted SET active = '0', wantedCrimes = '[]', wantedBounty = 0 WHERE wantedID = ?
- SQL1_INPUTS = 1
- ;;--------------------------------------------------------------------------------------------------------------->
- ;;--------------------------------------------------------------------------------------------------------------->
- ;; Gang Sachen
- [selectGang]
- SQL1_1 = SELECT id FROM gangs WHERE active = '1' AND id = ?
- SQL1_INPUTS = 1
- [selectPlayerGang]
- SQL1_1 = SELECT id, owner, name, maxmembers, bank, members, gangtag FROM gangs WHERE active = '1' AND members LIKE ?
- SQL1_INPUTS = 1
- OUTPUT = 1, 2-STRING, 3-STRING, 4, 5, 6, 7-STRING
- [selectGangID]
- SQL1_1 = SELECT id FROM gangs WHERE name = ? OR gangtag = ? AND active = '1'
- SQL1_INPUTS = 1, 2
- [selectGangIDFromMembers]
- SQL1_1 = SELECT id FROM gangs WHERE members LIKE ? AND active = '1'
- SQL1_INPUTS = 1
- [selectGangIDFromOwner]
- SQL1_1 = SELECT id FROM gangs WHERE owner = ? AND active = '1'
- SQL1_INPUTS = 1
- [selectInactiveGang]
- SQL1_1 = SELECT id, active FROM gangs WHERE name = ? OR gangtag = ? AND active = '0'
- SQL1_INPUTS = 1, 2
- [updateGang]
- SQL1_1 = UPDATE gangs SET active = '1', owner = ?, members = ?, name = ?, gangtag = ? WHERE id = ?
- SQL1_INPUTS = 1, 2, 3, 4, 5
- [updateGang1]
- SQL1_1 = UPDATE gangs SET bank = ?, maxmembers = ?, owner = ? WHERE id = ?
- SQL1_INPUTS = 1, 2, 3, 4
- [updateGangBank]
- SQL1_1 = UPDATE gangs SET bank = ? WHERE id = ?
- SQL1_INPUTS = 1, 2
- [updateGangMembers]
- SQL1_1 = UPDATE gangs SET members = ? WHERE id = ?
- SQL1_INPUTS = 1, 2
- [updateGangMaxmembers]
- SQL1_1 = UPDATE gangs SET maxmembers = ? WHERE id = ?
- SQL1_INPUTS = 1, 2
- [updateGangOwner]
- SQL1_1 = UPDATE gangs SET owner = ? WHERE id = ?
- SQL1_INPUTS = 1, 2
- [insertGang]
- SQL1_1 = INSERT INTO gangs (owner, name, members, gangtag) VALUES (?, ?, ?, ?)
- SQL1_INPUTS = 1, 2, 3, 4
- [deleteGang]
- SQL1_1 = UPDATE gangs SET active = '0' WHERE id = ?
- SQL1_INPUTS = 1
- ;;--------------------------------------------------------------------------------------------------------------->
- ;;--------------------------------------------------------------------------------------------------------------->
- ;; Housing
- [insertHouse]
- SQL1_1 = INSERT INTO houses (pid, pos, owned) VALUES (?, ?, '1')
- SQL1_INPUTS = 1, 2-STRING
- [selectHouseID]
- SQL1_1 = SELECT id FROM houses WHERE pos = ? AND pid = ? AND owned = '1'
- SQL1_INPUTS = 1, 2
- [selectAllHouses]
- SQL1_1 = SELECT COUNT(*) FROM houses WHERE owned = '1'
- [selectPlayerHouses]
- SQL1_1 = SELECT houses.id, houses.pid, houses.pos, players.name, houses.garage FROM houses INNER JOIN players WHERE houses.owned = '1' AND houses.pid = players.pid LIMIT ?, 10
- SQL1_INPUTS = 1
- OUTPUT = 1, 2-STRING, 3, 4-STRING, 5
- [selectHousePositions]
- SQL1_1 = SELECT pid, pos FROM houses WHERE pid = ? AND owned = '1'
- SQL1_INPUTS = 1
- OUTPUT = 1-STRING, 2
- [updateHouseTrunk]
- SQL1_1 = UPDATE containers SET inventory = ? WHERE id = ?
- SQL1_INPUTS = 1, 2
- [deleteHouse]
- SQL1_1 = UPDATE houses SET owned = '0', pos = '[]' WHERE pid = ? AND pos = ? AND owned = '1'
- SQL1_INPUTS = 1, 2
- [deleteHouse1]
- SQL1_1 = UPDATE houses SET owned = '0', pos = '[]' WHERE id = ?
- SQL1_INPUTS = 1
- [updateGarage]
- SQL1_1 = UPDATE houses SET garage = ? WHERE pid = ? AND pos = ?
- SQL1_INPUTS = 1, 2, 3
- [selectContainerPositions]
- SQL1_1 = SELECT pid, pos FROM containers WHERE pid = ? AND owned = '1'
- SQL1_INPUTS = 1
- OUTPUT = 1-STRING, 2
- [selectContainers]
- SQL1_1 = SELECT pid, pos, classname, inventory, gear, dir, id FROM containers WHERE pid = ? AND owned = '1'
- SQL1_INPUTS = 1
- OUTPUT = 1-STRING, 2, 3-STRING, 4, 5, 6, 7
- [selectContainerID]
- SQL1_1 = SELECT id FROM containers WHERE pos = ? AND pid = ? AND owned = '1'
- SQL1_INPUTS = 1, 2
- [insertContainer]
- SQL1_1 = INSERT INTO containers (pid, pos, classname, inventory, gear, owned, dir) VALUES (?, ?, ?, '"[[],0]"', '"[]"', '1', ?)
- SQL1_INPUTS = 1, 2, 3, 4
- [updateContainer]
- SQL1_1 = UPDATE containers SET gear = ? WHERE id = ?
- SQL1_INPUTS = 1, 2
- [deleteContainer]
- SQL1_1 = UPDATE containers SET owned = '0', pos = '[]' WHERE pid = ? AND pos = ? AND owned = '1'
- SQL1_INPUTS = 1, 2
- [deleteContainer1]
- SQL1_1 = UPDATE containers SET owned = '0', pos = '[]' WHERE id = ?
- SQL1_INPUTS = 1
- ;;--------------------------------------------------------------------------------------------------------------->
- ;;--------------------------------------------------------------------------------------------------------------->
- ;; Fahrzeuge
- [selectVehicles]
- SQL1_1 = SELECT id, side, classname, type, pid, alive, active, plate, color FROM vehicles WHERE pid = ? AND alive = '1' AND active = '0' AND side = ? AND type = ? AND impound = '0'
- SQL1_INPUTS = 1, 2, 3
- OUTPUT = 1, 2-STRING, 3-STRING, 4-STRING, 5-STRING, 6, 7, 8, 9
- [selectVehiclesMore]
- SQL1_1 = SELECT id, side, classname, type, pid, alive, active, plate, color, inventory, gear, fuel, damage, blacklist, impound FROM vehicles WHERE id = ? AND pid = ?
- SQL1_INPUTS = 1, 2
- OUTPUT = 1, 2-STRING, 3-STRING, 4-STRING, 5-STRING, 6, 7, 8, 9, 10, 11, 12, 13, 14
- [updateVehicle]
- SQL1_1 = UPDATE vehicles SET active = '1', impound = '0' WHERE pid = ? AND id = ?
- SQL1_INPUTS = 1, 2
- [updateVehicleBlacklist]
- SQL1_1 = UPDATE vehicles SET blacklist = '0' WHERE id = ? AND pid = ?
- SQL1_INPUTS = 1, 2
- [updateVehicleBlacklistPlate]
- SQL1_1 = UPDATE vehicles SET blacklist = '1' WHERE pid = ? AND plate = ?
- SQL1_INPUTS = 1, 2
- [updateVehicleFuel]
- SQL1_1 = UPDATE vehicles SET active = '0', impound = '0', fuel = ?, damage = ? WHERE pid = ? AND plate = ?
- SQL1_INPUTS = 1, 2, 3, 4
- [updateVehicleFuelImpound]
- SQL1_1 = UPDATE vehicles SET active = '0', impound = '1', fuel = ?, damage = ? WHERE pid = ? AND plate = ?
- SQL1_INPUTS = 1, 2, 3, 4
- [updateVehicleAll]
- SQL1_1 = UPDATE vehicles SET active = '0', impound = '0', inventory = ?, gear = ?, fuel = ?, damage = ? WHERE pid = ? AND plate = ?
- SQL1_INPUTS = 1, 2, 3, 4, 5, 6
- [updateVehicleAllImpound]
- SQL1_1 = UPDATE vehicles SET active = '0', impound = '1', inventory = ?, gear = ?, fuel = ?, damage = ? WHERE pid = ? AND plate = ?
- SQL1_INPUTS = 1, 2, 3, 4, 5, 6
- [updateVehicleGear]
- SQL1_1 = UPDATE vehicles SET gear = ? WHERE pid = ? AND plate = ?
- SQL1_INPUTS = 1, 2, 3
- [updateVehicleTrunk]
- SQL1_1 = UPDATE vehicles SET inventory = ? WHERE pid = ? AND plate = ?
- SQL1_INPUTS = 1, 2, 3
- [insertVehicle]
- SQL1_1 = INSERT INTO vehicles (side, classname, type, pid, alive, active, inventory, color, plate, gear, damage, impound) VALUES (?, ?, ?, ?, '1','1','"[[],0]"', ?, ?,'"[]"','"[]"', '0')
- SQL1_INPUTS = 1, 2, 3, 4, 5, 6
- [deleteVehicle]
- SQL1_1 = UPDATE vehicles SET alive = '0' WHERE pid = ? AND plate = ?
- SQL1_INPUTS = 1, 2
- [deleteVehicleID]
- SQL1_1 = UPDATE vehicles SET alive = '0' WHERE pid = ? AND id = ?
- SQL1_INPUTS = 1, 2
- [cleanupVehicle]
- SQL1_1 = UPDATE vehicles SET active = '0', fuel = ? WHERE pid = ? AND plate = ?
- SQL1_INPUTS = 1, 2, 3
- ;;--------------------------------------------------------------------------------------------------------------->
- ;;--------------------------------------------------------------------------------------------------------------->
- ;; Message System
- [SelectMSG]
- SQL1_1 = SELECT fromID, toID, message, fromName, toName FROM messages WHERE toID = ? ORDER BY time DESC
- SQL1_INPUTS = 1
- OUTPUT = 1, 2, 3-STRING, 4-STRING, 5-STRING
- [InsertMSG]
- SQL1_1 = INSERT INTO messages (fromID, toID, message, fromName, toName) VALUES(?, ?, '"?"', ?, ?)
- SQL1_INPUTS = 1, 2, 3, 4, 5
- ;;--------------------------------------------------------------------------------------------------------------->
- ;;--------------------------------------------------------------------------------------------------------------->
- ;;Tuning
- [getTuningData]
- SQL1_1 = SELECT tuning_data FROM vehicles WHERE id=?;
- SQL1_INPUTS = 1 Number of Inputs = 1 Output = 1-String
- [updateTuningData]
- SQL1_1 = UPDATE vehicles SET tuning_data=? WHERE id=?;
- SQL1_INPUTS = 1, 2
- ;;--------------------------------------------------------------------------------------------------------------->
- ;;--------------------------------------------------------------------------------------------------------------->
- ;;Ausweis
- [selectPlayer]
- SQL1_1 = SELECT name FROM players WHERE name = ? AND pid = ?
- SQL1_INPUTS = 1, 2
- OUTPUT = 1-STRING
- [updateID_CIV]
- SQL1_1 = UPDATE players SET idcard_data_civ = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- [updateID_WEST]
- SQL1_1 = UPDATE players SET idcard_data_cop = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- [updateID_MED]
- SQL1_1 = UPDATE players SET idcard_data_med = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- [updateID_ADAC]
- SQL1_1 = UPDATE players SET idcard_data_adac = ? WHERE pid = ?
- SQL1_INPUTS = 1, 2
- ;;--------------------------------------------------------------------------------------------------------------->
- ;;--------------------------------------------------------------------------------------------------------------->
- ;;Shops
- [selectShopDealer]
- SQL1_1 = SELECT pid, name, shop, value from shops where shop = ?
- SQL1_INPUTS = 1
- OUTPUT = 1, 2, 3, 4
- [selectShopPID]
- SQL1_1 = SELECTR pid, name, shop, value from shops where shop = ? and pid = ?
- SQL1_INPUTS = 1, 2
- OUTPUT = 1, 2, 3, 4
- [insertShop]
- SQL1_1 = INSERT into shops (pid, name, shop, value) Values (?, ?, ?, ?)
- SQL1_INPUTS = 1, 2, 3, 4
- [updateShop]
- SQL1_1 = update shops SET value = ? where pid = ? and shop = ?
- SQL1_INPUTS = 1, 2, 3
- [deleteShops]
- SQL1_1 = DELETE from shops where shop = ?
- SQL1_INPUTS = 1
- ;;--------------------------------------------------------------------------------------------------------------->
Advertisement
Add Comment
Please, Sign In to add comment