Jump to content

Ranous

Members
  • Posts

    32
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Ranous's Achievements

Rat

Rat (9/54)

0

Reputation

  1. it's still the same, i deleted the 3D DirextX Library. Thanks.
  2. Already i'm doing 3D DirextX Library. Rectangle and text is 3D.
  3. The rectangle and text quality why is it so bad? Border, quality of writing, etc.
  4. Solved this topic. You can use 3D dxDrawRectangle function.
  5. Script's Files; It's not HTML-CSS.
  6. I want to create a 3D rectangle. Sample Video:
  7. Work of the "if ( not result ) then" line although "createdata" does not work. -- CONNECTION MYSQL -- local dbConnection = mysql_connect( host, username, password, dbName ) -- CREATE TABLE -- createTable = mysql_query (dbConnection ,"CREATE TABLE IF NOT EXISTS accountdatas(accountName TEXT,playerJoin INT)" ) -- ADD ACCOUNT DATA -- addEventHandler ("onPlayerLogin",root, function(_,acName) local userAccountName = getAccountName ( acName ) local result = mysql_query ( dbConnection, "SELECT accountName FROM accountdatas WHERE accountName = "..userAccountName ) if ( not result ) then local createData = mysql_query ( dbConnection, "INSERT INTO accountdatas(accountName,playerJoin) VALUES ("..userAccountName..",".."0"..")") if ( createData ) then outputChatBox ("#C1C1C1*Your account data was successfully created.",source,255,255,255,true) end else mysql_free_result(result) end end )
  8. it's still the same, debug is empty and script does not work.
  9. Debug is empty. I guess sql is difficult.
  10. I get player statics with dbQuery and I send a Client-Side with triggerClientEvent. I have tried. Script does not work.
  11. -- OUTPUT -- Money: Nil Kills: Nil Deaths: Nil Joins: Nil
  12. Full:Server-Side; -- CONNECT DATABASE -- addEventHandler ("onResourceStart",root, function() dataBase = dbConnect ("sqlite","userDatabase.db") userDatabase = dbExec (dataBase ,"CREATE TABLE IF NOT EXISTS userDatabase(accountName TEXT,money INT,playerKills INT,playerDeaths INT,playerJoin INT)" ) end ) -- ADD ACCOUNT DATA -- addEventHandler ("onPlayerLogin",root, function(_,acName) local userAccountName = getAccountName (acName) local accountNameQuery = dbQuery(dataBase, "SELECT accountName FROM userDatabase WHERE accountName = ?", userAccountName) local result = dbPoll(accountNameQuery, -1) if #result == 0 or not result then createData = dbExec (dataBase,"INSERT INTO userDatabase(accountName,money,playerKills,playerDeaths,playerJoin) VALUES (?,?,?,?,?)",userAccountName,0,0,0,0) if (createData) then outputChatBox ("#FF8600*#C1C1C1Your account data was successfully created.",source,255,255,255,true) end end end ) -- DELETE ACCOUNT DATA -- addCommandHandler ("deleteAccountData", function(thePlayer,command,accName) local aName = getAccountName( getPlayerAccount(thePlayer) ) if isObjectInACLGroup("user."..aName, aclGetGroup("Admin")) then if accName then local accountNameDB = dbQuery(dataBase, "SELECT accountName FROM userDatabase WHERE accountName = ?", accName) local result = dbPoll(accountNameDB, -1) if #result ~= 0 then deleteUserData = dbExec (dataBase,"DELETE FROM userDatabase WHERE accountName=?", accName) if (deleteUserData) then outputChatBox ("#FF8600*#C1C1C1Account data was deleted. ("..accName..")",source,255,255,255,true) end else outputChatBox ("#FF8600*#C1C1C1Account name could not be found. ("..accName..")",source,255,255,255,true) end end end end ) -- ACCOUNT CLIENT-SIDE -- function gAccountsToSend(getUserName) local gAccount = getPlayerAccount(getUserName) local gAccountName = getAccountName(gAccount) if (gAccountName) then local query = dbQuery (dataBase,"SELECT money,playerKills,playerDeaths,playerJoin FROM userDatabase WHERE accountName = ?",gAccountName) local result = dbPoll (query,-1) if (#result ~= 0) then userMoney = result.money userKills = result.playerKills userDeaths = result.playerDeaths userJoins = result.playerJoin triggerClientEvent(source, "onSendAccountNamesToClient", getRootElement(), userMoney,userKills,userDeaths,userJoins) end end end addEvent("onClientRequestAccountNames", true) addEventHandler("onClientRequestAccountNames", getRootElement(), gAccountsToSend) -- STATICS: DEATHS -- function deathPlayer() local playerAccount = getPlayerAccount(source) local userAccountName = getAccountName (playerAccount) dbExec(dataBase, "UPDATE userDatabase SET playerDeaths = IFNULL (playerDeaths, 0) + 1 WHERE accountName = ?", userAccountName) end addEventHandler ("onPlayerWasted",root,deathPlayer) -- STATICS: JOINS -- function joinsX(_,uName) local userAccountName = getAccountName (uName) dbExec(dataBase, "UPDATE userDatabase SET playerJoin = IFNULL (playerJoin, 0) + 1 WHERE accountName = ?", userAccountName) end addEventHandler ("onPlayerLogin",root,joinsX)
×
×
  • Create New...