Advertisement
Guest User

Untitled

a guest
Nov 7th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.44 KB | None | 0 0
  1.  
  2.  
  3.  
  4. local connection = exports['fv_engine']:getConnection(getThisResource())
  5.  
  6. local accounts = {}
  7. --[[
  8. Tábla felépítése:
  9. accounts[name] = {id, password, serial, email, regdate, lastlogin, ip}
  10. ]]
  11. local isSerialAttachedToAccount = {}
  12. --[[
  13. Tábla felépítése:
  14. isSerialAttachedToAccount[serial] = true
  15. ]]
  16. local isEmailAttachedToAccount = {}
  17. --[[
  18. Tábla felépítése:
  19. isEmailAttachedToAccount[email] = true
  20. ]]
  21. local idConvertToName = {}
  22. --[[
  23. Tábla felépítése:
  24. idConvertToName[id] = name
  25. ]]
  26. local isValidAccount = {}
  27. --[[
  28. Tábla felépítése:
  29. isValidAccount[name] = name
  30. ]]
  31. local isLogged = {}
  32. --[[
  33. Tábla felépítése:
  34. isLogged[name] = true
  35. ]]
  36.  
  37. local characters = {}
  38. --[[
  39. Tábla felépítése:
  40. characters[id] = {...}
  41. ]]
  42. local getAccountCharacterID = {}
  43. --[[
  44. Tábla felépítése:
  45. getAccountCharacterID[accountName] = id
  46. ]]
  47. local isAccountHaveCharacter = {}
  48. --[[
  49. Tábla felépítése:
  50. isAccountHaveCharacter[accountName] = true
  51. ]]
  52. local isNameRegistered = {}
  53.  
  54. function receiveTables()
  55. -- triggerClientEvent(root, "giveBackToClient", root, accounts, characters)
  56. end
  57. addEvent("receiveTables", true)
  58. addEventHandler("receiveTables", root, receiveTables)
  59.  
  60.  
  61. addEventHandler("onResourceStart", resourceRoot,
  62. function()
  63. dbQuery(function(query)
  64. local query, query_lines = dbPoll(query, 0)
  65. if query_lines > 0 then
  66.  
  67. for k, row in pairs (query) do
  68. local id = tonumber(row["id"])
  69. local name = tostring(row["name"])
  70. local email = tostring(row["email"])
  71. local password = tostring(row["password"])
  72. local serial = tostring(row["serial"])
  73. local ip = tostring(row["ip"])
  74. local registerdatum = tostring(row["registerdatum"])
  75. local lastlogin = tostring(row["lastlogin"])
  76. local online = tonumber(row["online"])
  77. if online == 1 then
  78. isLogged[name] = true
  79. else
  80. isLogged[name] = false
  81. end
  82. accounts[name] = {id, password, serial, email, registerdatum, lastlogin, ip}
  83. isValidAccount[name] = true
  84. isSerialAttachedToAccount[serial] = true
  85. isEmailAttachedToAccount[email] = true
  86. idConvertToName[id] = name
  87. end
  88. end
  89. receiveTables()
  90. outputDebugString("[Success] Loading accounts has finished successfuly. Loaded: " .. query_lines .. " accounts!")
  91. end, connection, "SELECT * FROM `accounts`")
  92. end
  93. )
  94.  
  95. addEventHandler("onResourceStart", resourceRoot,
  96. function()
  97. dbQuery(function(query)
  98. local query, query_lines = dbPoll(query, 0)
  99. if query_lines > 0 then
  100. for k, row in pairs (query) do
  101. local id = tonumber(row["id"])
  102. local ownerName = tostring(row["ownerAccountName"])
  103. local charname = tostring(row["charname"])
  104. local position = tostring(row["position"])
  105. local health = tonumber(row["health"])
  106. local armor = tonumber(row["armor"])
  107. local skinid = tonumber(row["skinid"])
  108. local pedType = tostring(row["pedType"])
  109. local pedType2 = tostring(row["pedType2"])
  110. local age = tonumber(row["age"])
  111. local weight = tonumber(row["weight"])
  112. local height = tonumber(row["height"])
  113. local fightStyle = tonumber(row["fightStyle"])
  114. local walkStyle = tonumber(row["walkStyle"])
  115. local money = tonumber(row["money"])
  116. local bankmoney = tonumber(row["bankmoney"])
  117. local death = tostring(row["death"])
  118. local headless = tostring(row["headless"])
  119. local playedtime = tonumber(row["playedtime"])
  120. local premiumPoints = tonumber(row["premiumPoints"])
  121. local adminlevel = tonumber(row["adminlevel"])
  122. local job = tonumber(row["job"])
  123. local rot = tonumber(row["rot"])
  124. local adminduty = tostring(row["adminduty"])
  125. local food = tostring(row["food"])
  126. local drink = tostring(row["drink"])
  127. local adminname = tostring(row["adminname"])
  128. local level = tonumber(row["level"])
  129. local deathReasons = tostring(row["deathReasons"])
  130. local bone = tostring(row["bone"])
  131. local adutytime = tonumber(row["adutytime"])
  132. local rtc = tonumber(row["rtc"])
  133. local fix = tonumber(row["fix"])
  134. local fuel = tonumber(row["fuel"])
  135. local ban = tonumber(row["ban"])
  136. local jail = tonumber(row["jail"])
  137. local kick = tonumber(row["kick"])
  138. characters[id] = {
  139. ["ownerName"] = ownerName,
  140. ["charName"] = charname,
  141. ["position"] = position,
  142. ["health"] = health,
  143. ["armor"] = armor,
  144. ["skinid"] = skinid,
  145. ["pedType"] = pedType,
  146. ["pedType2"] = pedType2,
  147. ["age"] = age,
  148. ["weight"] = weight,
  149. ["height"] = height,
  150. ["fightStyle"] = fightStyle,
  151. ["walkStyle"] = walkStyle,
  152. ["money"] = money,
  153. ["bankmoney"] = bankmoney,
  154. ["death"] = death,
  155. ["headless"] = headless,
  156. ["playedtime"] = playedtime,
  157. ["premiumPoints"] = premiumPoints,
  158. ["adminlevel"] = adminlevel,
  159. ["job"] = job,
  160. ["rot"] = rot,
  161. ["adminduty"] = adminduty,
  162. ["food"] = food,
  163. ["drink"] = drink,
  164. ["adminname"] = adminname,
  165. ["level"] = level,
  166. ["deathReasons"] = deathReasons,
  167. ["bone"] = bone,
  168. ["adutytime"] = adutytime,
  169. ["rtc"] = rtc,
  170. ["fix"] = fix,
  171. ["fuel"] = fuel,
  172. ["jail"] = jail,
  173. ["ban"] = ban,
  174. ["kick"] = kick,
  175. }
  176. getAccountCharacterID[ownerName] = id
  177. isAccountHaveCharacter[ownerName] = true
  178. isNameRegistered[charname] = true
  179. end
  180. end
  181. receiveTables()
  182. outputDebugString("[Success] Loading characters has finished successfuly. Loaded: " .. query_lines .. " characters!")
  183. end, connection, "SELECT * FROM `characters`")
  184. end
  185. )
  186.  
  187. addEvent("account >> register", true)
  188. addEventHandler("account >> register", root,
  189. function(sourceElement, username, password, email)
  190. local serial = getPlayerSerial(sourceElement)
  191. if isSerialAttachedToAccount[serial] then
  192. exports.fv_infobox:addNotification(sourceElement, "error", "Ez a serial ("..serial..") már társítva van egy felhasználóhoz!")
  193. return
  194. end
  195.  
  196. if isEmailAttachedToAccount[email] then
  197. exports.fv_infobox:addNotification(sourceElement, "error", "Ez az email ("..email..") már társítva van egy felhasználóhoz!")
  198. return
  199. end
  200.  
  201. if isValidAccount[username] then
  202. exports.fv_infobox:addNotification(sourceElement, "error", "Ez a felhasználónév ("..username..") már regisztrálva lett!")
  203. return
  204. end
  205.  
  206. local hashPassword1 = hash("md5", password)
  207. local hashedPassword = hash("sha512", hashPassword1)
  208. local ip = getPlayerIP(sourceElement)
  209. local serial = getPlayerSerial(sourceElement)
  210.  
  211. dbExec(connection, "INSERT INTO `accounts` SET `name` = ?, `email` = ?, `password` = ?, `serial` = ?, `ip` = ?, `registerdatum` = NOW(), `lastlogin` = NOW()", username, email, hashedPassword, serial, ip)
  212.  
  213. dbQuery(function(query)
  214. local query, query_lines = dbPoll(query, 0)
  215. if query_lines > 0 then
  216. for k, row in pairs (query) do
  217. local id = tonumber(row["id"])
  218. local name = tostring(row["name"])
  219. local email = tostring(row["email"])
  220. local password = tostring(row["password"])
  221. local serial = tostring(row["serial"])
  222. local ip = tostring(row["ip"])
  223. local registerdatum = tostring(row["registerdatum"])
  224. local lastlogin = tostring(row["lastlogin"])
  225. accounts[name] = {id, password, serial, email, regdate, lastlogin, ip}
  226. isValidAccount[name] = true
  227. isSerialAttachedToAccount[serial] = true
  228. isEmailAttachedToAccount[email] = true
  229. idConvertToName[id] = name
  230. exports.fv_infobox:addNotification(sourceElement, "success", "Sikeres regisztráció most már beléphetsz!")
  231. end
  232. receiveTables()
  233. end
  234. end, connection, "SELECT * FROM `accounts` WHERE `name` = ?", username)
  235. end
  236. )
  237.  
  238.  
  239. addEvent("account >> login", true)
  240. addEventHandler("account >> login", root,
  241. function(sourceElement, username, password)
  242. if not isValidAccount[username] then
  243. exports.fv_infobox:addNotification(sourceElement, "error", "Ez a felhasználónév ("..username..") nincs regisztrálva!")
  244. return
  245. end
  246.  
  247. if isLogged[username] then
  248. exports.fv_infobox:addNotification(sourceElement, "error", "Ez a felhasználó ("..username..") már használatban van!")
  249. return
  250. end
  251.  
  252. local data = accounts[username]
  253. local id = data[1]
  254. local realPassword = data[2]
  255. local serial = data[3]
  256. local lastlogin = data[6]
  257. local registerdatum = data[5]
  258. local mtaserial = getPlayerSerial(sourceElement)
  259.  
  260. if string.lower(serial) ~= string.lower(mtaserial) then
  261. if tonumber(serial) == "0" or tonumber(serial) == 0 then
  262. dbExec(connection, "UPDATE `accounts` SET `serial`=? WHERE `id`=?", mtaserial, id)
  263. accounts[username][3] = mtaserial
  264. else
  265. exports.fv_infobox:addNotification(sourceElement, "error", "A te serialod ("..serial..") nem ehhez a felhasználóhoz van társítva!")
  266. return
  267. end
  268. end
  269.  
  270. local hashedPassword = hash("md5", password)
  271. local hashedPassword2 = hash("sha512", hashedPassword)
  272.  
  273. if string.lower(realPassword) ~= string.lower(hashedPassword2) then
  274. exports.fv_infobox:addNotification(sourceElement, "error", "Hibás jelszó!")
  275. return
  276. end
  277.  
  278. isLogged[username] = true
  279.  
  280.  
  281.  
  282. dbExec(connection, "UPDATE `accounts` SET `lastlogin`=NOW(), `online`=? WHERE `id`=?", 1, id)
  283. dbQuery(function(query)
  284. local query, query_lines = dbPoll(query, 0)
  285. if query_lines > 0 then
  286. for k, row in pairs (query) do
  287. local lastlogin = tostring(row["lastlogin"])
  288. accounts[username][6] = lastlogin
  289. end
  290. receiveTables()
  291. end
  292. end, connection, "SELECT * FROM `accounts` WHERE `id` = ?", id)
  293.  
  294.  
  295. dbQuery(function(query)
  296. local query, query_lines = dbPoll(query, 0)
  297. if query_lines > 0 then
  298. for k, row in pairs (query) do
  299. local premiumPoints = tostring(row["premiumPoints"])
  300. characters[id]["premiumPoints"] = premiumPoints
  301. end
  302. receiveTables()
  303. end
  304. end, connection, "SELECT * FROM `characters` WHERE `id` = ?", id)
  305.  
  306. setElementData(sourceElement, "acc >> loggedIn", true)
  307. setElementData(sourceElement, "acc >> id", id)
  308. setElementData(sourceElement, "acc >> username", username)
  309.  
  310. if isAccountHaveCharacter[username] then
  311. --Betöltés
  312. local id = getAccountCharacterID[username]
  313. local data = characters[id]
  314. triggerClientEvent(sourceElement, "character >> loading", sourceElement, data, lastlogin, id, registerdatum)
  315. else
  316. --Karakter létrehozása
  317. triggerClientEvent(sourceElement, "character >> create", sourceElement)
  318. end
  319. end
  320. )
  321.  
  322. addEvent("character >> register", true)
  323. addEventHandler("character >> register", root,
  324. function(sourceElement, name, age, weight, height, skinid, pedType, pedType2)
  325. if isNameRegistered[name] then
  326. exports.fv_infobox:addNotification(sourceElement, "error", "Ez a név már használatban van!")
  327. return
  328. end
  329.  
  330. local id = getElementData(sourceElement, "acc >> id")
  331. local username = getElementData(sourceElement, "acc >> username")
  332.  
  333. dbExec(connection, "INSERT INTO `characters` SET `id` = ?, `ownerAccountName` = ?, `charname` = ?, `age` = ?, `weight` = ?, `height` = ?, `skinid` = ?, `pedType` = ?, `pedType2` = ?", id, username, name, age, weight, height, skinid, pedType, pedType2)
  334.  
  335. dbQuery(function(query)
  336. local query, query_lines = dbPoll(query, 0)
  337. if query_lines > 0 then
  338. --for i, row in pairs(query) do
  339. for k, row in pairs (query) do
  340. local id = tonumber(row["id"])
  341. local ownerName = tostring(row["ownerAccountName"])
  342. local charname = tostring(row["charname"])
  343. local position = tostring(row["position"])
  344. local health = tonumber(row["health"])
  345. local armor = tonumber(row["armor"])
  346. local skinid = tonumber(row["skinid"])
  347. local pedType = tostring(row["pedType"])
  348. local pedType2 = tostring(row["pedType2"])
  349. local age = tonumber(row["age"])
  350. local weight = tonumber(row["weight"])
  351. local height = tonumber(row["height"])
  352. local fightStyle = tonumber(row["fightStyle"])
  353. local walkStyle = tonumber(row["walkStyle"])
  354. local money = tonumber(row["money"])
  355. local bankmoney = tonumber(row["bankmoney"])
  356. local death = tostring(row["death"])
  357. local headless = tostring(row["headless"])
  358. local playedtime = tonumber(row["playedtime"])
  359. local premiumPoints = tonumber(row["premiumPoints"])
  360. local adminlevel = tonumber(row["adminlevel"])
  361. local job = tonumber(row["job"])
  362. local rot = tonumber(row["rot"])
  363. local adminduty = tostring(row["adminduty"])
  364. local adminname = tostring(row["adminname"])
  365. local food = tostring(row["food"])
  366. local drink = tostring(row["drink"])
  367. local level = tonumber(row["level"])
  368. local deathReasons = tostring(row["deathReasons"])
  369. local bone = tostring(row["bone"])
  370. local adutytime = tonumber(row["adutytime"])
  371. local rtc = tonumber(row["rtc"])
  372. local fix = tonumber(row["fix"])
  373. local fuel = tonumber(row["fuel"])
  374. local ban = tonumber(row["ban"])
  375. local jail = tonumber(row["jail"])
  376. local kick = tonumber(row["kick"])
  377. characters[id] = {
  378. ["ownerName"] = ownerName,
  379. ["charName"] = charname,
  380. ["position"] = position,
  381. ["health"] = health,
  382. ["armor"] = armor,
  383. ["skinid"] = skinid,
  384. ["pedType"] = pedType,
  385. ["pedType2"] = pedType2,
  386. ["age"] = age,
  387. ["weight"] = weight,
  388. ["height"] = height,
  389. ["fightStyle"] = fightStyle,
  390. ["walkStyle"] = walkStyle,
  391. ["money"] = money,
  392. ["bankmoney"] = bankmoney,
  393. ["death"] = death,
  394. ["headless"] = headless,
  395. ["playedtime"] = playedtime,
  396. ["premiumPoints"] = premiumPoints,
  397. ["adminlevel"] = adminlevel,
  398. ["job"] = job,
  399. ["rot"] = rot,
  400. ["adminduty"] = adminduty,
  401. ["food"] = food,
  402. ["drink"] = drink,
  403. ["adminname"] = adminname,
  404. ["level"] = level,
  405. ["deathReasons"] = deathReasons,
  406. ["bone"] = bone,
  407. ["adutytime"] = adutytime,
  408. ["rtc"] = rtc,
  409. ["fix"] = fix,
  410. ["fuel"] = fuel,
  411. ["jail"] = jail,
  412. ["ban"] = ban,
  413. ["kick"] = kick,
  414. }
  415. getAccountCharacterID[ownerName] = id
  416. isAccountHaveCharacter[ownerName] = true
  417. isNameRegistered[charname] = true
  418. local data = accounts[ownerName]
  419. local lastlogin = data[6]
  420. local registerdatum = data[5]
  421. exports.fv_infobox:addNotification(sourceElement, "success", "Sikeres karakterregisztráció most már beléphetsz!")
  422. --triggerClientEvent(sourceElement, "destroyCharCreate", sourceElement)
  423. local data = characters[id]
  424. triggerClientEvent(sourceElement, "character >> loading", sourceElement, data, lastlogin, id, registerdatum)
  425. end
  426. receiveTables()
  427. end
  428. end, connection, "SELECT * FROM `characters` WHERE `id` = ?", id)
  429. end
  430. )
  431.  
  432.  
  433.  
  434. local isValid = {
  435. ["needSpawn"] = true,
  436. ["char >> skin"] = true,
  437. ["char >> fightStyle"] = true,
  438. ["char >> walkStyle"] = true,
  439. ["char >> death"] = true,
  440. ["char >> headless"] = true,
  441. ["char >> name"] = true,
  442. ["char >> armor"] = true,
  443. ["char >> death"] = true,
  444. }
  445.  
  446.  
  447.  
  448. addEventHandler("onElementDataChange", root,
  449. function(dName, oValue)
  450. if getElementType(source) == "player" and isValid[dName] then
  451. if dName == "needSpawn" then
  452. local value = getElementData(source, dName)
  453. if value then
  454. local x,y,z, dim, int = unpack(getElementData(source, "char >> position"))
  455. local rot = getElementData(source, "char >> rot")
  456. local skinid = getElementData(source, "char >> skin")
  457. setElementModel(source, skinid)
  458. setElementRotation(source, 0,0,rot)
  459. setElementDimension(source, dim)
  460. setElementInterior(source, int)
  461. setElementPosition(source, x, y, z)
  462. spawnPlayer(source, x,y,z, rot, skinid, int, dim)
  463. setElementHealth(source, getElementData(source, "char >> health"))
  464. setElementFrozen(source, true)
  465. local source = source
  466. setTimer(
  467. function()
  468. setElementFrozen(source, false)
  469. end, 7000, 1
  470. )
  471. end
  472. elseif dName == "char >> skin" then
  473. local value = getElementData(source, dName)
  474. setElementModel(source, value)
  475. elseif dName == "char >> fightStyle" then
  476. local value = getElementData(source, dName)
  477. -- setPedFightingStyle(source, value)
  478. elseif dName == "char >> walkStyle" then
  479. local value = getElementData(source, dName)
  480. --setPedWalkingStyle(source, value)
  481. elseif dName == "char >> name" then
  482. local value = getElementData(source, dName)
  483. setPlayerName(source, value)
  484. local id = getElementData(source, "acc >> id")
  485. characters[id]["charName"] = value
  486. --receiveTables()
  487.  
  488. elseif dName == "char >> armor" then
  489. local value = getElementData(source, dName)
  490. setPedArmor(source, value)
  491.  
  492. elseif dName == "char >> headless" then
  493. local value = getElementData(source, dName)
  494. setPedHeadless(source, value)
  495. end
  496. end
  497. end
  498. )
  499.  
  500. addEventHandler("onPlayerChangeNick", root,
  501. function(oldNick, newNick)
  502. if getElementData(source, "loggedIn") then
  503. cancelEvent()
  504. end
  505. end
  506. )
  507.  
  508. addEventHandler("onPlayerQuit", root,
  509. function()
  510. savePlayer(source)
  511. end
  512. )
  513.  
  514. addEventHandler("onResourceStop", resourceRoot,
  515. function()
  516. for k,v in pairs(getElementsByType("player")) do
  517. savePlayer(v)
  518. end
  519. end
  520. )
  521. local bones = pasz
  522.  
  523. function savePlayer(source)
  524. if getElementData(source, "acc >> loggedIn") then
  525. local id = getElementData(source, "acc >> id")
  526. dbExec(connection, "UPDATE `accounts` SET `online`=? WHERE `id`=?", 0, id)
  527. local ownerName = idConvertToName[id]
  528. isLogged[ownerName] = false
  529. end
  530. if getElementData(source, "loggedIn") then
  531. local id = getElementData(source, "acc >> id")
  532. --isLogged[username] = true
  533. local dim = getElementDimension(source)
  534. if getElementData(source, "char >> death") or getElementData(source, "inDeath") then
  535. local oldDimension = getElementData(source, "oldDimension") or getElementDimension(source)
  536. dim = oldDimension
  537. end
  538. local int = getElementInterior(source)
  539. local x,y,z = getElementPosition(source)
  540. local position = toJSON({x,y,math.floor(z + 1), dim, int})
  541. local money = getElementData(source, "char >> money")
  542. local bankmoney = getElementData(source, "char >> bankmoney")
  543. local ax, ay, rot = getElementRotation(source)
  544. local skinid = getElementData(source, "char >> skin")
  545. local fightStyle = getElementData(source, "char >> fightStyle")
  546. local walkStyle = getElementData(source, "char >> walkStyle")
  547. local charname = getElementData(source, "char >> name")
  548. local health = getElementHealth(source)
  549. local armor = getPedArmor(source)
  550. local job = getElementData(source, "char >> job")
  551. local death = tostring(getElementData(source, "char >> death"))
  552. local headless = tostring(getElementData(source, "char >> headless"))
  553. local playedtime = getElementData(source, "char >> playedtime")
  554. local premiumPoints = getElementData(source, "char >> premiumPoints")
  555. local adminlevel = getElementData(source, "admin >> level")
  556. if adminlevel == 1 then
  557. adminlevel = 0
  558. end
  559. local adminduty = "false"
  560. local adminname = tostring(getElementData(source, "admin >> name"))
  561. local food = getElementData(source, "char >> food")
  562. local drink = getElementData(source, "char >> drink")
  563. local level = getElementData(source, "char >> level")
  564. local deathReason = getElementData(source, "deathReason") or "Ismeretlen"
  565. local deathReasonAdmin = getElementData(source, "deathReason >> admin") or "Ismeretlen"
  566. local deathReasons = toJSON({deathReason, deathReasonAdmin})
  567. local bones = getElementData(source, "char >> bone") or {true, true, true, true, true}
  568. bones = true
  569. local bone = toJSON(bones)
  570. local adutytime = getElementData(source, "admin >> time") or 0
  571. local rtc = getElementData(source, "rtc >> using") or 0
  572. local fix = getElementData(source, "fix >> using") or 0
  573. local fuel = getElementData(source, "fuel >> using") or 0
  574. local ban = getElementData(source, "ban >> using") or 0
  575. local jail = getElementData(source, "jail >> using") or 0
  576. local kick = getElementData(source, "kick >> using") or 0
  577. dbExec(connection, "UPDATE `characters` SET `position`=?, `charname`=?, `health`=?, `armor`=?, `skinid`=?, `fightStyle`=?, `walkStyle`=?, `money`=?, `bankmoney`=?, `death`=?, `headless`=?, `playedtime`=?, `premiumPoints`=?, `adminlevel`=?, `job`=?, `rot`=?, `adminduty`=?, `food`=?, `drink`=?, `level`=?, `adminname`=?, `deathReasons`=?, `bone`=?, `adutytime`=?, `rtc`=?, `fix`=?, `fuel`=?, `ban`=?, `jail`=?, `kick`=? WHERE `id`=?", position, charname, health, armor, skinid, fightStyle, walkStyle, money, bankmoney, death, headless, playedtime, premiumPoints, adminlevel, job, rot, adminduty, food, drink, level, adminname, deathReasons, bone, adutytime, rtc, fix, fuel, ban, jail, kick, id)
  578. local ownerName = idConvertToName[id]
  579. characters[id] = {
  580. ["ownerName"] = ownerName,
  581. ["charName"] = charname,
  582. ["position"] = position,
  583. ["health"] = health,
  584. ["armor"] = armor,
  585. ["skinid"] = skinid,
  586. ["pedType"] = pedType,
  587. ["pedType2"] = pedType2,
  588. ["age"] = age,
  589. ["weight"] = weight,
  590. ["height"] = height,
  591. ["fightStyle"] = fightStyle,
  592. ["walkStyle"] = walkStyle,
  593. ["money"] = money,
  594. ["bankmoney"] = bankmoney,
  595. ["death"] = death,
  596. ["headless"] = headless,
  597. ["playedtime"] = playedtime,
  598. ["premiumPoints"] = premiumPoints,
  599. ["adminlevel"] = adminlevel,
  600. ["job"] = job,
  601. ["rot"] = rot,
  602. ["adminduty"] = adminduty,
  603. ["food"] = food,
  604. ["drink"] = drink,
  605. ["adminname"] = adminname,
  606. ["level"] = level,
  607. ["deathReasons"] = deathReasons,
  608. ["bone"] = bone,
  609. ["adutytime"] = adutytime,
  610. ["rtc"] = rtc,
  611. ["fix"] = fix,
  612. ["fuel"] = fuel,
  613. ["jail"] = jail,
  614. ["ban"] = ban,
  615. ["kick"] = kick,
  616. }
  617. receiveTables()
  618. outputDebugString("[SG-Save]: " .. charname .. "("..id..") - saved succesfuly!", 0, 87,255,87)
  619. end
  620. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement