Jump to content

DiGiTal

Members
  • Posts

    277
  • Joined

  • Last visited

Everything posted by DiGiTal

  1. DiGiTal

    Speed Player

    Hi, i want to make my player running fast but it didn't once jump it going from the air like a arrow function updateCamera () local xs, ys, zs = getElementVelocity(localPlayer) setElementVelocity(localPlayer, xs*2, ys*2, zs*2) end addEventHandler ( "onClientPreRender", root, updateCamera )
  2. fixed, the probleme was on ' must add WHERE + set account data for kills and deaths'
  3. Some persons says me it's the UPDATE must add the WHERE but doesn't work again
  4. i restarted many time once changed the money value, it changes kills and deaths with same value @Avival
  5. hey i have created a systeme that will save deaths,kills,money on db all works fine but once i change the value of money it saves but it changing the kills and deaths equal to money value wtf is that local createTable = executeSQLQuery ("CREATE TABLE IF NOT EXISTS Players(accountName TEXT PRIMARY KEY,nickName TEXT,serial TEXT,IP TEXT,Money INT,kills INT,deaths INT)") addEventHandler ("onPlayerLogin",root, function(_,acName) ----------------------------------------------- local userAccountName = getAccountName ( acName ) local plr_serial = getPlayerSerial( source ) local plr_ip = getPlayerIP( source ) local plr_nick = getPlayerName( source ) local plr_money = getAccountData( acName,"money") local plr_kills = getAccountData( acName,"kills") local plr_deaths = getAccountData( acName,"deaths") ------------------------------------------------ local check = executeSQLQuery("SELECT accountName FROM Players WHERE accountName = ? ",userAccountName) ------------------------------------------------ if (#check==0) then local result1 = executeSQLQuery("INSERT INTO Players(accountName,serial,IP,Money,nickName,kills,deaths) VALUES(?,?,?,?,?,?,?)",userAccountName,plr_serial,plr_ip,0,plr_nick,0,0) print("hi1") else local result2 = executeSQLQuery( "UPDATE Players SET IP = ? ,Money = ?, kills =? ,deaths = ? ",plr_ip,tonumber(plr_money) ,tonumber(plr_kills),tonumber(plr_deaths)) local result3 = executeSQLQuery( "UPDATE Players SET nickName = ?", plr_nick) setPlayerMoney( source, tonumber(plr_money)) print("hi2") end end ) and this for the saving systeme -------------------------- addEventHandler("onPlayerQuit",root, function() ------------------------------------------------ local b_money = setAccountData( getPlayerAccount(source), "money", getPlayerMoney( source ) ) local result4 = executeSQLQuery( "UPDATE Players SET Money = ?",tonumber(getPlayerMoney( source ) ) ) ------------------------------------------------ updateStats(source) print("DATA SAVED") end ) -------------------------- function updateStats(thePlayer) if thePlayer then if not (isGuestAccount(getPlayerAccount(thePlayer)) ) then ------------------------------------------------ local kills1 = getAccountData(getPlayerAccount( thePlayer ),"kills") local deaths1 = getAccountData(getPlayerAccount( thePlayer ),"deaths") local result5 = executeSQLQuery( "UPDATE Players SET kills = ?,deaths = ?",tonumber(kills1) ,tonumber(deaths1)) print("hey2") ------------------------------------------------ end end end and this for the sync for kills and deaths function onWasted(totalAmmo,killer,killerWeapon) if not (isGuestAccount(getPlayerAccount(source)) ) then ------------------------------------------------ local deaths = getAccountData(getPlayerAccount(source),"deaths") ------------------------------------------------ setAccountData(getPlayerAccount(source),"deaths",tonumber(deaths)+1) updateStats(source) print("hey3") end if killer then if not checks and killer and (killer ~= source) then ------------------------------------------------ local kills = getAccountData( getPlayerAccount(killer), "kills") ------------------------------------------------ setAccountData(getPlayerAccount(killer),"kills",tonumber(kills)+1) updateStats(killer) print("hey4") end end end addEventHandler("onPlayerWasted",getRootElement(),onWasted)
  6. @Citizen bah , moi je suis dev francophone ,tu peux me tagger quand tu veux tjr avaible
  7. Nice one , You should continue
  8. BACK UPDATES: NEW WEBSITE (easier than older one,clean,simple...) More experience New languages added link of the website (beta) : http://tutoplayfun.gq/
  9. Hello, I'll present you my second script (login panel) that i spent many days to realise it me as scripter and my freind (testor) helping much on testing my scripts FEATURES: NO LAG SAVE MONEY SAVE LAST POSITION SAVE USERNAME AND PASSWORD BY checkbox ✔ Dx panel NOTIFICATION SYSTEM Cool background screenshot: I wanna you see this too :+) @Simplex
  10. It lookinh simple html page.means i see only text on the page without pictures
  11. UPDATE Ive added random DESTINATIONS . That means you can have many destinations and the script will choose random destination.
×
×
  • Create New...