Jump to content

Ranous

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by Ranous

  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)
  13. Thank you Tomas but statics is 0 now.
  14. Datas in database and panel datas is not equal. Client-Side; Server-Side; Database; Panel; Debug Code;
  15. The problem is solved by 8Q. Thanks.
  16. It doesn't work. What should I do ?
  17. Player is already in the team but it doesn't work.
  18. The errors is gone now but it doesn't work. (A new row isn't added.)
  19. Hi Guys, I'm doing the clan panel but i don't know the use of the required functions. I tried to do, i've failed. İt's debug message of the script: Code: clanGrid = guiCreateGridList (5,8,392,228,false,clanTab) usernamePlayer = guiGridListAddColumn( clanGrid, "Username", 0.2 ) for id,players in ipairs(getPlayersInTeam(getPlayerTeam(getLocalPlayer()))) do local playerTeam = guiGridListAddRow ( clanGrid ) guiGridListSetItemText ( clanGrid, playerTeam, usernamePlayer, getPlayerName ( players ), false, false ) end
  20. Description: - Server status is manuel. - This script need admin rights. - You can edit this script. Multi Theft Auto
  21. Updated • A new link has been added.
  22. This problem solved but i need new techniques. Thank you Python.
×
×
  • Create New...