Jump to content

spoty

Members
  • Posts

    334
  • Joined

  • Last visited

Everything posted by spoty

  1. spoty

    Fixed now

    awesome!!!! you are the best
  2. spoty

    Fixed now

    hmm ok i tryed that now and this is what i currently have function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "arizonadrift") if (accountData) then local anterior = getElementData(source, "Last Drift", anterior) local total = getElementData(source, "Total Drift", total) local mejor = getElementData(source, "Best Drift", mejor) end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onLogout () kickPlayer (source, nil, "Logging out is disallowed.") end addEventHandler ("onPlayerLogout", getRootElement(), onLogout) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setElementData(source, "Last Drift", anterior) setElementData(source, "Total Drift", total) setElementData(source, "Best Drift", mejor) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit) 0 error's but it wont save / set the score
  3. hmm i have getting this error now [2014-10-01 18:23:17] WARNING: drift\Driftdatabase.lua:1: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] [2014-10-01 18:23:17] WARNING: drift\Driftdatabase.lua:1: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2014-10-01 18:23:17] ERROR: drift\Driftdatabase.lua:14: attempt to concatenate local 'accountname' (a boolean value) here is the script local accountname = getPlayerAccount( getPlayerAccount( source ) ) local driftpoints = driftpoints local handler = mysql_connect("localhost", "root", "", "arizonadrift") function aaa() dbQuery( myCallback, connection, "SELECT * FROM driftpoints" ) end function myCallback(qh) local result = dbPoll( qh, 0 ) -- Timeout doesn't matter here because the result will always be ready end local query = dbQuery ( housedb, "SELECT * FROM driftpoints WHERE accountname = '" .. accountname .. "' ") local result = dbPoll ( query, -1 ) local points = result[1]["points"] mysql_query(handler, "UPDATE users SET driftpoints = '" .. driftpoints .."' WHERE accountname = '" .. accountname .. "' ")
  4. You'd use dbPoll and dbQuery local query = dbQuery ( housedb, "SELECT * FROM drift_points WHERE accountname = ''" .. accountherelol .. "" ) local result = dbPoll ( query, -1 ) local points = result[1]["points"] so then it sould be something like this local accountname = getAccountName( getPlayerAccount( player ) ) local driftpoints = driftpoints local handler = mysql_connect("localhost", "root", "kolpol55", "arizonadrift") function aaa() dbQuery( myCallback, connection, "SELECT * FROM driftpoints" ) end function myCallback(qh) local result = dbPoll( qh, 0 ) -- Timeout doesn't matter here because the result will always be ready end local query = dbQuery ( housedb, "SELECT * FROM driftpoints WHERE accountname = ''" .. accountherelol .. "" ) local result = dbPoll ( query, -1 ) local points = result[1]["points"] mysql_query(handler, "UPDATE users SET driftpoints = '" .. driftpoints .."' WHERE accountname = '" .. accountname .. "' ")
  5. spoty

    Fixed now

    ye i wanne do it with account data but i cant see what i did wrong but i gonna rescript it mayby will work then i am also trying to work it with mySQL but still not working...
  6. hahaha ye first time i make this kinda fail lel never had it before but if i wanne take the drift score from internal.db how can i do that?
  7. oh lol i see now what i did wrong
  8. yes i am trying to get them from internal.db "NL|Spoty" version="1.0.0" type="script"/> i also have tryed to run driftdatabase.lua as server but then it wont run the drift resource
  9. local accountname = getAccountName( getPlayerAccount( player ) ) local driftpoints = driftpoints local handler = mysql_connect("localhost", "root", "kolpol55", "arizonadrift") function aaa() dbQuery( myCallback, connection, "SELECT * FROM driftpoints" ) end function myCallback(qh) local result = dbPoll( qh, 0 ) -- Timeout doesn't matter here because the result will always be ready end mysql_query(handler, "UPDATE users SET driftpoints = '" .. driftpoints .."' WHERE accountname = '" .. accountname .. "' ") thats what i have now but its for now just testing
  10. okay so i need to make my own register lead to mySQL user table that i just created and now i have this error when i have maded the database for drift points ERROR: Couldn't parse config Driftdatabase.lua in resource drift
  11. so i need to put that into my register script? and what you mean whit that? the internal.db?
  12. okay thnx gonna read the topic and try to make something nice from it thnx
  13. ok and how can i do that? i know how to make a mySQL script that conects to mySQL but the others i dont know
  14. ok thnx but to make a database that saves the drift points i also need to script a database?
  15. hello i wanne make a drift database i have installed xampp but i realy dont know how to make a database and i wanne use it for save driftpoints can any body mayby help me alittel bit ? i would realy like it if you help me
  16. i get error 1006 when i try to download a vehmod ingame any kinda fixes for it?
  17. spoty

    Fixed now

    ok so i have installed xampp could anybody help me now?
  18. spoty

    Fixed now

    still no fix.... can anybody help me?
  19. spoty

    Fixed now

    and can you guys mayby make a small start for me because i am pretty noob in database scripting
  20. pff damm i dind see that att all "roskilde.txd"
  21. hello so i was putting in a costum drift map ingame and i maded a replace script and its working fine but it cant load the txd for some reason function map() txd = engineLoadTXD ( "rosklide.txd" ) engineImportTXD ( txd, 14808 ) engineImportTXD ( txd, 14809 ) col = engineLoadCOL ( "roskilde1.col" ) col1 = engineLoadCOL ( "roskilde2.col" ) dff = engineLoadDFF ( "roskilde1.dff", 0 ) dff1 = engineLoadDFF ( "roskilde2.dff", 0 ) engineReplaceCOL ( col, 14808 ) engineReplaceCOL ( col1, 14809 ) engineReplaceModel ( dff, 14808 ) engineReplaceModel ( dff1, 14809 ) engineSetModelLODDistance(14808, 2000) engineSetModelLODDistance(14809, 2000) end setTimer ( map, 1000, 1) addCommandHandler("reloadmap",map) addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), function() engineRestoreCOL(14808) engineRestoreCOL(14809) engineRestoreModel(14808) engineRestoreModel(14809) destroyElement(dff) destroyElement(dff1) destroyElement(col) destroyElement(col1) destroyElement(txd) end ) the error is unable to load roskilde.txd
  22. ah ok and i fixed it by my own i dind see that here this is wrong txd = engineLoadTXD("parts/fbmp_a_f.txd", 1153 ) engineImportTXD(txd, 11523) dff = engineLoadDFF("parts/fbmp_a_f.dff", 1153 ) engineReplaceModel(dff, 11523) it needs to be txd = engineLoadTXD("parts/fbmp_a_f.txd", 1153 ) engineImportTXD(txd, 1153) dff = engineLoadDFF("parts/fbmp_a_f.dff", 1153 ) engineReplaceModel(dff, 1153)
  23. hmm okay i gonna try it or can it mayby crash by my meta? "Spoty" name="car" version="1.0.0" type="script"/>
  24. my whole mta crashes and it says error by gta_sa.exe
×
×
  • Create New...