Jump to content

Snow-Man

Members
  • Posts

    350
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Snow-Man

  1. hey, i have made top chat but i have got problem in text position http://postimg.org/image/4nne1czu9 addEventHandler("onClientRender",getRootElement(), function() for i, message in ipairs ( dxMessage ) do dxDrawRectangle(256, 2*((i-1)*20), 898, 33, tocolor(0, 0, 0, 100)) dxDrawText(message[1], 256, 2*((i-1)*20), 898, 33, tocolor(message[3], message[4],message[5], 255), 1.00, "bankgothic", "left", "center", false, false, true, true, false) end end ) but when i use guiGetScreenSize() i got error expected number, got NaN my codes : local sizeX, sizeY = guiGetScreenSize( ) local sx, sy = sizeX/1280, sizeY/1024 addEventHandler("onClientRender",getRootElement(), function() for i, message in ipairs ( dxMessage ) do sx, sy, sh, sw = sx*256, sy*2, sx*898, sy*33 dxDrawRectangle(sx, sy*((i-1)*20), sh, sw, tocolor(0, 0, 0, 100)) dxDrawText(message[1], sx, sy*((i-1)*20), sh, sw, tocolor(message[3], message[4],message[5], 255), 1.00, "bankgothic", "left", "center", false, false, true, true, false) end end )
  2. Snow-Man

    [Help] db

    how can i get id from db with export ?
  3. Yes, i did first line of top bar i don't know how to make the next line
  4. how can i make dx message with 2 lines?
  5. done, i fixed it /lock please
  6. WARNING: USCstaff\server.lua:6: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil]
  7. function addPlayerPunishments(thePlayer) local account = getPlayerAccount(thePlayer) if (account) and not (isGuestAccount(account)) then local accountName = getAccountName(account) local serial = getPlayerSerial(thePlayer) Local time = getRealTime().timestamp return exports.USCsql:Execdb("INSERT INTO punishlogs (account,serial,time) VALUES(?,?,?)", accountName, serial, time) end return false end When i use this export, i didn't found any data in db Help?
  8. Stolen from UIP resources https://community.multitheftauto.com/ind ... ls&id=9586
  9. change this function createPickup() to function createpickup() and addEventHandler("onResourceStart", resourceRoot,createPickup) to addEventHandler("onResourceStart", resourceRoot,createpickup)
  10. everytime when i try to login with my accounts system, SQL data will save a new record how can i make it create one time record if account saved in db my code exports.USCsql:Execdb("INSERT INTO accounts ( accountname, password, account) VALUES ( ?, ?, ?)", username, password, account)
  11. Snow-Man

    MTA Problem

    thanks @ccw and @towncivilian MTA working now
  12. Snow-Man

    MTA Problem

    http://pastebin.mtasa.com/421591008
  13. No, it's a class of functions (or a table as known in Lua) For example, you could write this: for i, v in pairs ( Player ) do outputChatBox ( tostring ( i ).." -> "..tostring ( v ) ) end To output all of the functions in the Player class/table. thanks
  14. @Made, Player remplace getElementsByType("player") in OOP Lua ?
  15. what the different between Lua and OOP ?
  16. Snow-Man

    object color

    i think, you can't
  17. @Citizen, you codes not working and no errors
  18. Snow-Man

    Map

    Yes, Check this Control Names
  19. Snow-Man

    MTA Problem

    http://pastebin.mtasa.com/990269776
  20. Snow-Man

    MTA Problem

    i do not using Proxy, i have tried again but the same error [url=http://pastebin.mtasa.com/]http://pastebin.mtasa.com/[/url]<html> <head> <meta http-equiv="Cache-Control" content="no-cache, max-age=0, must-revalidate, proxy-revalidate, s-maxage=0"> <meta http-equiv="Expires" content="now"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Content-Type" content="text/html"> <title>302 Moved / Fix the browser</title> </head> <body> <h1>302 Moved / Fix the browser</h1> The browser did not handle properly a 302 redirect response. </body> </html>
  21. Snow-Man

    MTA Problem

    [url=http://pastebin.mtasa.com/]http://pastebin.mtasa.com/[/url]<html> <head> <meta http-equiv="Cache-Control" content="no-cache, max-age=0, must-revalidate, proxy-revalidate, s-maxage=0"> <meta http-equiv="Expires" content="now"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Content-Type" content="text/html"> <title>302 Moved / Fix the browser</title> </head> <body> <h1>302 Moved / Fix the browser</h1> The browser did not handle properly a 302 redirect response. </body> </html>
×
×
  • Create New...