ScAnY

sql_custom_v2 altis-life.ini

Mar 16th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.55 KB | None | 0 0
  1. [Default]
  2. Version = 10
  3.  
  4. Number of Inputs = 0
  5.  
  6. ;;Sanitize Checks are better than Strip Characters, but only accept ASCII Characters
  7. ;;Requires abit more work to setup correctly.
  8. Sanitize Input Value Check = false
  9. Sanitize Output Value Check = false
  10.  
  11. ;;Allows you to disable Prepared Statement Caching.
  12. ;;Mainly for people that don't want to waste memory on caching a Statement that is only once.
  13. Prepared Statement Cache = true
  14.  
  15. ;;Returns InsertID, Instead of returning [1,[]] It returns [1,[<INSERTID>,[]]]
  16. Return InsertID = false
  17.  
  18. ;;Strip Characters
  19. Strip = true
  20. ;;Possible Actions Are "Strip" / "Strip+Log" / "Strip+Error" / "None"
  21. Strip Chars Action = STRIP
  22. Strip Chars = /\|;{}<>'`
  23. ;;Strip Chars Used for $CUSTOM_x$ Inputs
  24. Strip Custom Chars = /\|;{}<>'`
  25.  
  26.  
  27.  
  28. ;;**************************************************************
  29. ;;**************************************************************
  30. ;; PROCEDURE CALLS
  31. ;;
  32.  
  33.  
  34. ;;______________________________________________________________
  35. [resetLifeVehicles]
  36. ;;
  37.  
  38. SQL1_1 = CALL resetLifeVehicles;
  39.  
  40. Number of Inputs = 0
  41. Prepared Statement Cache = false
  42.  
  43.  
  44. ;;______________________________________________________________
  45. [deleteDeadVehicles]
  46. ;;
  47.  
  48. SQL1_1 = CALL deleteDeadVehicles;
  49.  
  50. Number of Inputs = 0
  51. Prepared Statement Cache = false
  52.  
  53.  
  54. ;;______________________________________________________________
  55. [deleteOldHouses]
  56. ;;
  57.  
  58. SQL1_1 = CALL deleteOldHouses;
  59.  
  60. Number of Inputs = 0
  61. Prepared Statement Cache = false
  62.  
  63.  
  64. ;;______________________________________________________________
  65. [deleteOldGangs]
  66. ;;
  67.  
  68. SQL1_1 = CALL deleteOldGangs;
  69.  
  70. Number of Inputs = 0
  71. Prepared Statement Cache = false
  72.  
  73.  
  74.  
  75. ;;**************************************************************
  76. ;;**************************************************************
  77. ;; GANGS
  78. ;;
  79.  
  80.  
  81. ;;______________________________________________________________
  82. [gangIDPlayer]
  83. ;;
  84.  
  85. SQL1_1 = SELECT id FROM gangs WHERE members LIKE ? AND active='1';
  86.  
  87. Number of Inputs = 1
  88. SQL1_INPUTS = 1
  89.  
  90.  
  91. ;;______________________________________________________________
  92. [gangNameSelectID]
  93. ;;
  94.  
  95. SQL1_1 = SELECT id FROM gangs WHERE name=? AND active=?;
  96.  
  97. SQL1_INPUTS = 1, 2
  98. Number of Inputs = 2
  99.  
  100.  
  101. ;;______________________________________________________________
  102. [gangOwnerSelectID]
  103. ;;
  104.  
  105. SQL1_1 = SELECT id FROM gangs WHERE owner=? AND active=?;
  106.  
  107. SQL1_INPUTS = 1, 2
  108. Number of Inputs = 2
  109.  
  110. ;;______________________________________________________________
  111. [gangInsert]
  112. ;;
  113.  
  114. SQL1_1 = INSERT INTO gangs (owner, name, members) VALUES(?,?,?);
  115. SQL1_INPUTS = 1, 2, 3
  116.  
  117. Number of Inputs = 3
  118.  
  119.  
  120. ;;______________________________________________________________
  121. [gangUpdate]
  122. ;;
  123.  
  124. SQL1_1 = UPDATE gangs SET active=1, owner=?,members=? WHERE id=?;
  125.  
  126. Number of Inputs = 3
  127. SQL1_INPUTS = 1, 2, 3
  128.  
  129.  
  130. ;;______________________________________________________________
  131. [gangRemove]
  132. ;;
  133.  
  134. SQL1_1 = UPDATE gangs SET active='0' WHERE id=?;
  135. SQL1_INPUTS = 1
  136.  
  137. Number of Inputs = 1
  138.  
  139.  
  140. ;;______________________________________________________________
  141. [gangInfo]
  142. ;; Get Gang Info
  143. ;;
  144.  
  145. SQL1_1 = SELECT id, owner, name, maxmembers, bank, members FROM gangs WHERE active='1' AND members LIKE ?;
  146. SQL1_INPUTS = 1
  147.  
  148. Number of Inputs = 1
  149. OUTPUT = 1, 2-String, 3-String, 4, 5, 6
  150.  
  151.  
  152. ;;______________________________________________________________
  153. [gangBankInfoUpdate]
  154. ;; Update Gang Bank
  155. ;;
  156.  
  157. SQL1_1 = UPDATE gangs SET bank=? WHERE id=?;
  158. SQL1_INPUTS = 1, 2
  159.  
  160. Number of Inputs = 2
  161.  
  162.  
  163. ;;______________________________________________________________
  164. [gangInfoUpdate]
  165. ;; Update Gang Info
  166. ;;
  167.  
  168. SQL1_1 = UPDATE gangs SET bank=?, maxmembers=?, owner=? WHERE id=?;
  169. SQL1_INPUTS = 1, 2, 3-String, 4
  170.  
  171. Number of Inputs = 4
  172.  
  173.  
  174. ;;______________________________________________________________
  175. [gangMaxMembersUpdate]
  176. ;; Update Gang Max Members
  177. ;;
  178.  
  179. SQL1_1 = UPDATE gangs SET maxmembers=? WHERE id=?;
  180. SQL1_INPUTS = 1, 2
  181.  
  182. Number of Inputs = 2
  183.  
  184.  
  185. ;;______________________________________________________________
  186. [gangMembersUpdate]
  187. ;; Update Gang Members
  188. ;;
  189.  
  190. SQL1_1 = UPDATE gangs SET members=? WHERE id=?;
  191. SQL1_INPUTS = 1, 2
  192.  
  193. Number of Inputs = 2
  194.  
  195.  
  196. ;;______________________________________________________________
  197. [gangOwnerUpdate]
  198. ;; Update Gang Owner
  199. ;;
  200.  
  201. SQL1_1 = UPDATE gangs SET owner=? WHERE id=?;
  202. SQL1_INPUTS = 1, 2
  203.  
  204. Number of Inputs = 2
  205.  
  206.  
  207. ;;**************************************************************
  208. ;;**************************************************************
  209. ;; PLAYERS
  210. ;;
  211.  
  212. ;;______________________________________________________________
  213. [playerInfo]
  214. ;;
  215.  
  216. SQL1_1 = SELECT playerid, name FROM players WHERE playerid=?;
  217. SQL1_INPUTS = 1
  218.  
  219. Number of Inputs = 1
  220. OUTPUT = 1-STRING, 2
  221.  
  222. ;;______________________________________________________________
  223. [playerInfoInsert]
  224. ;;
  225.  
  226. SQL1_1 = INSERT INTO players
  227. ;; 1 2 3 4 5 6 7 8 9 10 11
  228. SQL1_2 = (playerid, name, cash, bankacc, aliases, cop_licenses, med_licenses, civ_licenses, civ_gear, cop_gear, med_gear)
  229. SQL1_3 = VALUES(?,?,?,?,?,?,?,?,?,?,?);
  230.  
  231. SQL1_INPUTS = 1, 2-STRING, 3, 4, 5, 6, 7, 8, 9, 10, 11
  232.  
  233. Number of Inputs = 11
  234.  
  235. ;;______________________________________________________________
  236. [playerWestInfo]
  237. ;;
  238. ;; 1 2 3 4 5 6 7 8 9 10
  239. SQL1_1 = SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, cop_licenses, coplevel, cop_gear, blacklist FROM players WHERE playerid=?;
  240. SQL1_INPUTS = 1
  241.  
  242. Number of Inputs = 1
  243. OUTPUT = 1-String, 2-String, 3, 4, 5-String, 6-String, 7, 8-String, 9, 10
  244.  
  245. ;;______________________________________________________________
  246. [playerCivInfo]
  247. ;;
  248. ;; 1 2 3 4 5 6 7 8 9
  249. SQL1_1 = SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, civ_licenses, arrested, civ_gear FROM players WHERE playerid=?;
  250. SQL1_INPUTS = 1
  251.  
  252. Number of Inputs = 1
  253. OUTPUT = 1-String, 2-String, 3, 4, 5-String, 6-String, 7, 8-String, 9
  254.  
  255. ;;______________________________________________________________
  256. [playerIndependentInfo]
  257. ;;
  258. ;; 1 2 3 4 5 6 7 8 9
  259. SQL1_1 = SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, med_licenses, mediclevel, med_gear FROM players WHERE playerid=?;
  260. SQL1_INPUTS = 1
  261.  
  262. Number of Inputs = 1
  263. OUTPUT = 1-String, 2-String, 3, 4, 5-String, 6-String, 7, 8-String, 9
  264.  
  265. ;;______________________________________________________________
  266. [playerWestUpdate]
  267. ;;
  268.  
  269. SQL1_1 = UPDATE players
  270. ;; 1 2 3 4 5 6
  271. SQL1_2 = SET name=?, cash=?, bankacc=?, cop_gear=?, cop_licenses=? WHERE playerid=?
  272.  
  273. SQL1_INPUTS = 1, 2, 3, 4, 5, 6
  274.  
  275. Number of Inputs = 6
  276.  
  277.  
  278. ;;______________________________________________________________
  279. [playerCivilianUpdate]
  280. ;;
  281.  
  282. SQL1_1 = UPDATE players
  283. ;; 1 2 3 4 5 6 7
  284. SQL1_2 = SET name=?, cash=?, bankacc=?, civ_licenses=?, civ_gear=?, arrested=? WHERE playerid=?;
  285.  
  286. SQL1_INPUTS = 1, 2, 3, 4, 5, 6, 7
  287.  
  288. Number of Inputs = 7
  289.  
  290.  
  291. ;;______________________________________________________________
  292. [playerIndependentUpdate]
  293. ;;
  294.  
  295. SQL1_1 = UPDATE players
  296. ;; 1 2 3 4 5 6
  297. SQL1_2 = SET name=?, cash=?, bankacc=?, med_licenses=?, med_gear=? WHERE playerid=?;
  298.  
  299. SQL1_INPUTS = 1, 2, 3, 4, 5, 6
  300.  
  301. Number of Inputs = 6
  302.  
  303.  
  304. ;;______________________________________________________________
  305. [playerUpdateCash]
  306. ;;
  307.  
  308. SQL1_1 = UPDATE players
  309. SQL1_2 = SET cash=? WHERE playerid=?;
  310.  
  311. SQL1_INPUTS = 1, 2
  312. Number of Inputs = 2
  313.  
  314.  
  315. ;;______________________________________________________________
  316. [playerUpdateBank]
  317. ;;
  318.  
  319. SQL1_1 = UPDATE players
  320. SQL1_2 = SET bankacc=? WHERE playerid=?;
  321.  
  322. SQL1_INPUTS = 1, 2
  323. Number of Inputs = 2
  324.  
  325.  
  326. ;;______________________________________________________________
  327. [playerUpdateBank+Cash]
  328. ;;
  329.  
  330. SQL1_1 = UPDATE players
  331. SQL1_2 = SET cash=?, bankacc=? WHERE playerid=?;
  332.  
  333. SQL1_INPUTS = 1, 2, 3
  334. Number of Inputs = 3
  335.  
  336.  
  337. ;;______________________________________________________________
  338. [playerUpdateCopLicense]
  339. ;;
  340.  
  341. SQL1_1 = UPDATE players
  342. SQL1_2 = SET cop_licenses=? WHERE playerid=?;
  343.  
  344. SQL1_INPUTS = 1, 2
  345. Number of Inputs = 2
  346.  
  347.  
  348. ;;______________________________________________________________
  349. [playerUpdateCivLicense]
  350. ;;
  351.  
  352. SQL1_1 = UPDATE players
  353. SQL1_2 = SET civ_licenses=? WHERE playerid=?;
  354.  
  355. SQL1_INPUTS = 1, 2
  356. Number of Inputs = 2
  357.  
  358.  
  359. ;;______________________________________________________________
  360. [playerUpdateMedLicense]
  361. ;;
  362.  
  363. SQL1_1 = UPDATE players
  364. SQL1_2 = SET med_licenses=? WHERE playerid=?;
  365.  
  366. SQL1_INPUTS = 1, 2
  367. Number of Inputs = 2
  368.  
  369.  
  370. ;;______________________________________________________________
  371. [playerUpdateCopGear]
  372. ;;
  373.  
  374. SQL1_1 = UPDATE players
  375. SQL1_2 = SET cop_gear=? WHERE playerid=?;
  376.  
  377. SQL1_INPUTS = 1, 2
  378. Number of Inputs = 2
  379.  
  380.  
  381. ;;______________________________________________________________
  382. [playerUpdateCivGear]
  383. ;;
  384.  
  385. SQL1_1 = UPDATE players
  386. SQL1_2 = SET civ_gear=? WHERE playerid=?;
  387.  
  388. SQL1_INPUTS = 1, 2
  389. Number of Inputs = 2
  390.  
  391.  
  392. ;;______________________________________________________________
  393. [playerUpdateMedGear]
  394. ;;
  395.  
  396. SQL1_1 = UPDATE players
  397. SQL1_2 = SET med_gear=? WHERE playerid=?;
  398.  
  399. SQL1_INPUTS = 1, 2
  400. Number of Inputs = 2
  401.  
  402.  
  403. ;;______________________________________________________________
  404. [playerUpdateAlive]
  405. ;;
  406.  
  407. SQL1_1 = UPDATE players
  408. SQL1_2 = SET alive=? WHERE playerid=?;
  409.  
  410. SQL1_INPUTS = 1, 2
  411. Number of Inputs = 2
  412.  
  413.  
  414. ;;______________________________________________________________
  415. [playerUpdateArrested]
  416. ;;
  417.  
  418. SQL1_1 = UPDATE players
  419. SQL1_2 = SET arrested=? WHERE playerid=?;
  420.  
  421. SQL1_INPUTS = 1, 2
  422. Number of Inputs = 2
  423.  
  424.  
  425. ;;**************************************************************
  426. ;;**************************************************************
  427. ;; VEHICLES
  428. ;;
  429.  
  430. ;;______________________________________________________________
  431. [vehicleDead]
  432. ;;
  433.  
  434. SQL1_1 = UPDATE vehicles SET alive=? WHERE pid=? AND plate=?;
  435.  
  436. SQL1_INPUTS = 1, 2, 3
  437. Number of Inputs = 3
  438.  
  439. ;;______________________________________________________________
  440. [vehicleInsert]
  441. ;;
  442.  
  443. SQL1_1 = INSERT INTO vehicles
  444. ;; 1 2 3 4 5 6 7 8 9
  445. SQL1_2 = (side, classname, type, pid, alive, active, inventory, color, plate)
  446. SQL1_3 = VALUES (?,?,?,?,?,?,?,?,?);
  447.  
  448. SQL1_INPUTS = 1, 2, 3, 4, 5, 6, 7, 8, 9
  449. Number of Inputs = 9
  450.  
  451.  
  452. ;;______________________________________________________________
  453. [vehicleInfo]
  454. ;;
  455.  
  456. ;; 1 2 3 4 5 6 7 8 9
  457. SQL1_1 = SELECT id, side, classname, type, pid, alive, active, plate, color
  458. SQL1_2 = FROM vehicles WHERE id=? AND pid=?;
  459. SQL1_INPUTS = 1, 2
  460. Number of Inputs = 2
  461.  
  462. OUTPUT = 1, 2-String, 3-String, 4-String, 5-String, 6, 7, 8, 9
  463.  
  464.  
  465. ;;______________________________________________________________
  466. [vehiclesInfo]
  467. ;;
  468.  
  469. ;; 1 2 3 4 5 6 7 8 9
  470. SQL1_1 = SELECT id, side, classname, type, pid, alive, active, plate, color
  471. SQL1_2 = FROM vehicles WHERE pid=? AND alive=1 AND active = 0 AND side=? AND type=?;
  472. SQL1_INPUTS = 1, 2, 3
  473. Number of Inputs = 3
  474.  
  475. OUTPUT = 1, 2-String, 3-String, 4-String, 5-String, 6, 7, 8, 9
  476.  
  477.  
  478. ;;______________________________________________________________
  479. [vehicleUpdateActive]
  480. ;;
  481.  
  482. SQL1_1 = UPDATE vehicles SET active=? WHERE pid=? AND id=?;
  483.  
  484. SQL1_INPUTS = 1, 2, 3
  485. Number of Inputs = 3
  486.  
  487.  
  488. ;;______________________________________________________________
  489. [vehicleUpdateActivePlate]
  490. ;;
  491.  
  492. SQL1_1 = UPDATE vehicles SET active=? WHERE pid=? AND plate=?;
  493.  
  494. SQL1_INPUTS = 1, 2, 3
  495. Number of Inputs = 3
  496.  
  497.  
  498.  
  499. ;;______________________________________________________________
  500. [vehicleUpdateAlive]
  501. ;;
  502.  
  503. SQL1_1 = UPDATE vehicles SET alive=? WHERE pid=? AND id=?;
  504.  
  505. SQL1_INPUTS = 1, 2, 3
  506. Number of Inputs = 3
  507.  
  508.  
  509. ;;______________________________________________________________
  510. [vehicleUpdateAlivePlate]
  511. ;;
  512.  
  513. SQL1_1 = UPDATE vehicles SET alive=? WHERE pid=? AND plate=?;
  514.  
  515. SQL1_INPUTS = 1, 2, 3
  516. Number of Inputs = 3
  517.  
  518. ;;**************************************************************
  519. ;;**************************************************************
  520. ;; Houses
  521. ;;
  522.  
  523.  
  524. ;;______________________________________________________________
  525. [housingCount]
  526. ;;
  527.  
  528. SQL1_1 = SELECT COUNT(*) FROM houses WHERE owned='1';
  529.  
  530. Number of Inputs = 0
  531.  
  532. ;;______________________________________________________________
  533. [housingInit]
  534. ;;
  535.  
  536. SQL1_1 = SELECT houses.id, houses.pid, houses.pos, players.name FROM houses INNER JOIN players ON houses.pid=players.playerid WHERE houses.owned='1' LIMIT ?,10;
  537.  
  538. SQL1_INPUTS = 1
  539. Number of Inputs = 1
  540.  
  541. OUTPUT = 1, 2-String, 3-String, 4-String
  542.  
  543. ;;______________________________________________________________
  544. [housingFetchPlayerHouse]
  545. ;;
  546. SQL1_1 = SELECT pid, pos, inventory, containers FROM houses WHERE pid=? AND owned='1';
  547.  
  548. SQL1_INPUTS = 1
  549. Number of Inputs = 1
  550.  
  551. OUTPUT = 1-String, 2-String, 3, 4
  552.  
  553. ;;______________________________________________________________
  554. [housingCheckHouse]
  555. ;;
  556.  
  557. SQL1_1 = SELECT CASE
  558. SQL1_2 = WHEN EXISTS(SELECT id FROM houses WHERE pos=? AND owned='1')
  559. SQL1_3 = THEN 'true' ELSE 'false'
  560. SQL1_4 = END
  561.  
  562. SQL1_INPUTS = 1
  563. Number of Inputs = 1
  564.  
  565. OUTPUT = 1
  566.  
  567. ;;______________________________________________________________
  568. [housingAddHouse]
  569. ;;
  570. SQL1_1 = INSERT INTO houses (pid, pos, inventory, containers, owned)
  571. SQL1_2 = VALUES(?,?,?,?,?);
  572. SQL1_INPUTS = 1, 2, 3, 4, 5
  573. SQL2_1 = SELECT id FROM houses WHERE pos=? AND pid=? AND owned='1';
  574. SQL2_INPUTS = 2, 1
  575.  
  576. Number of Inputs = 5
  577. OUTPUT = 1
  578.  
  579. ;;______________________________________________________________
  580. [housingSellHouse]
  581. ;;
  582. SQL1_1 = UPDATE houses SET owned='0', pos='[]' WHERE pid=? AND pos=? AND owned='1';
  583. SQL1_INPUTS = 1, 2, 3
  584.  
  585. Number of Inputs = 3
  586.  
  587. ;;______________________________________________________________
  588. [housingSellHouse2]
  589. ;;
  590. SQL1_1 = UPDATE houses SET owned='0', pos='[]' WHERE id=?;
  591. SQL1_INPUTS = 1
  592.  
  593. Number of Inputs = 1
  594.  
  595. ;;______________________________________________________________
  596. [houseUpdateContainer]
  597. ;;
  598. SQL1_1 = UPDATE houses SET containers=? WHERE id=?;
  599. SQL1_INPUTS = 1, 2
  600.  
  601. Number of Inputs = 2
  602.  
  603. ;;______________________________________________________________
  604. [housingUpdateInventory]
  605. ;;
  606. SQL1_1 = UPDATE houses SET inventory=? WHERE id=?;
  607. SQL1_INPUTS = 1, 2
  608.  
  609. Number of Inputs = 2
  610.  
  611. ;;______________________________________________________________
  612. [housingCleanup]
  613. ;;
  614. SQL1_1 = SELECT pid, pos, inventory, containers FROM houses WHERE pid=? AND owned='1';
  615. SQL1_INPUTS = 1
  616.  
  617. Number of Inputs = 1
Add Comment
Please, Sign In to add comment