Search the Community

Showing results for tags 'scripting'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • community.mtasa.com
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Gang


Location


Occupation


Interests

Found 280 results

  1. for index, info in ipairs(blips) do dxSetRenderTarget(MiniMap["RenderTarget"], true) local bx = info.x local by = info.y local actualDist = getDistanceBetweenPoints2D(playerX, playerY, bx, by) local dist = actualDist/(worldMaxSize/((worldWidth+worldHeight)/2)) local rot = findRotation(bx, by, playerX, playerY)-camZ local blipX, blipY = getPointFromDistanceRotation( (MiniMap_x+MiniMap["width"]+MiniMap_x)/2, (MiniMap_y+MiniMap_y+MiniMap["height"])/2, math.min(dist, math.sqrt((MiniMap_y+MiniMap_y+MiniMap["height"])/2-MiniMap_y^2 + MiniMap_x+MiniMap["width"]-(MiniMap_x+MiniMap["width"]+MiniMap_x)/2^2)), rot ) local blipX = math.max(MiniMap_x, math.min(MiniMap_x+MiniMap["width"], blipX)) local blipY = math.max(MiniMap_y, math.min(MiniMap_y+MiniMap["height"], blipY)) local color = 255 dxDrawImage(blipX - blipSize/2, blipY - blipSize/2, blipSize, blipSize, "blips/".. info.blipID ..".png",0,0,0,tocolor(255,2555,255,255)) dxSetRenderTarget() end Why not working? No errors/warnings..
  2. Callum

    FREE Scripting Lessons!

    I have launched a new, entirely free service that offers personal tutoring to anybody who wants to learn new MTA skills, including: Setting up an MTA Server Resources / scripts / meta.xml Writing Lua code MTA concepts such as events, timers, client-side interfaces, etc. SQL and other data storage methods I've been in the MTA community for coming up to 11 years now, and have worked with many of the 'big servers' that exist today, so the information will be delivered by people (including myself) with plenty of experience. The few students I'm already tutoring are well on their way to writing some basic MTA scripts already, after only a few days (totaling 4-5 hours). If you want to get involved, be sure to join the Discord server. You can also click here to see the recommended syllabus. If you know of anybody else who wants to learn to script, be sure to let them know of this great offer!
  3. I want know what fail in my script because i'm new in LUA Scripting and if a "professional" resolve my problem maybe i can learn of that In this script i want make math problems and if the players resolve this gain $2k setTimer(function() x1 = math.random(500) x2 = math.random(600) outputChatBox("#1860F1[Math]#ffffff " .. x1 .. " + " .. x2 .. " = ", root, 255, 255, 255, true) end, 30000, 0) function mathSystem(text, source) outputChatBox(text, source, 255, 255, 255, true) if text == x1 + x2 then givePlayerMoney(source, 2000) end end addEventHandler("onPlayerChat", root, mathSystem)
  4. Galera,ja fiz alguns posts aqui,ja estou bem caminhado,hoje fui fazer um script pensando no que eu queria fazer que era UM MARKER ONDE QUANDO EU ENTRASSE NELE ELE ABRIA UM PAINEL SO QUEM PODERIA USAR ESSE PAINEL ERA POLICIAL SE SAISSE DO MARKER O PAINEL SUMIA OU O PAINEL NAO ABRIRIA POR COMANDO CASO NAO FOSSE COM PAINEL QUERIA FAZER UM COMANDO QUE SO PODERIA SER EXECUTADO NAQUELE MARKER QUERIA FAZER TIPO UM COMANDO DENTRO DE OUTRO,TIPO /PRENDER (NICK) (MOTIVO) (TEMPO) SO CONSIGO FAZER O /PRENDER (NICK) E O POLICIAL PUDESSE PRENDER PESSOAS SEM ESTRELA TBM ME AJUDEM POR FAVOR Discord: CarllosDrift7412
  5. I just made a character customization system in MTA with 3D GUI.
  6. Smoker

    DB Problem

    Hello Mta Community ❤️ I have problem with my server db when i open the server on my pc (localhost) it works good but when i open it on my linux host dosen't work i changed the DB Information and everything Some Dvelopers says it's from ur host i bought a linux vps from Abdullah Ali host Developers says it works good on tableto so what is the diffrent this is copy of my server logs ================================================================== = Multi Theft Auto: San Andreas v1.5.6 [64 bit] ================================================================== = Server name : Multi Theft Auto = Server IP address: 217.182.25.250 = Server port : 27015 = = Log file : ..ser_Files/1/mods/deathmatch/logs/server.log = Maximum players : 4096 = HTTP port : 22005 = Voice Chat : Disabled = Bandwidth saving : Maximum with lightweight sync rate of 1500ms ================================================================== [19-03-31 22:45:24] ERROR: Couldn't find file res/Textures/ad2.png for resource NSCBillboards [19-03-31 22:45:24] Loading of resource 'NSCBillboards' failed [19-03-31 22:45:24] ERROR: Couldn't find file files/inv.txd for resource NSCMods [19-03-31 22:45:24] Loading of resource 'NSCMods' failed [19-03-31 22:45:24] ERROR: Couldn't find file flags/GE.png for resource NSCScoreboard [19-03-31 22:45:24] Loading of resource 'NSCScoreboard' failed [19-03-31 22:45:25] ERROR: Problem with resource: NSCBillboards; Couldn't find file res/Textures/ad2.png for resource NSCBillboards [19-03-31 22:45:25] ERROR: Problem with resource: NSCMods; Couldn't find file files/inv.txd for resource NSCMods [19-03-31 22:45:25] ERROR: Problem with resource: NSCScoreboard; Couldn't find file flags/GE.png for resource NSCScoreboard [19-03-31 22:45:25] Resources: 295 loaded, 3 failed [19-03-31 22:45:25] Server password set to 'NSC321321' [19-03-31 22:45:25] MODULE: Unable to load x64/modules/mta_mysql.so (libmysqlclient.so.16: cannot open shared object file: No such file or directory) [19-03-31 22:45:25] Starting resources... [19-03-31 22:45:25] WARNING: NGSQL/sql.luac:11: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:25] WARNING: NSCCore/client.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [19-03-31 22:45:25] Some files in 'NSCCore' use deprecated functions. [19-03-31 22:45:25] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:25] WARNING: NSCAdmin <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'cmd/cmdclient.luac') [19-03-31 22:45:25] WARNING: NSCAdmin requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'cmd/cmdclient.luac') [19-03-31 22:45:25] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:7: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCAdmin/cmd/cmdserver.lua:17: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCAdmin/web/s.lua:82: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] Server minclientversion is now 1.5.5-9.11815.0 [19-03-31 22:45:26] startResource: Resource 'NSCAdmin' started [19-03-31 22:45:26] WARNING: NSCAmmunation/client-side.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [19-03-31 22:45:26] WARNING: NSCAmmunation/training/client.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [19-03-31 22:45:26] Some files in 'NSCAmmunation' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCAmmunation' started [19-03-31 22:45:26] startResource: Resource 'NSCAndro' started [19-03-31 22:45:26] WARNING: NSCBank <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'gui.luac') [19-03-31 22:45:26] WARNING: NSCBank requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'gui.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [DUP x2] [19-03-31 22:45:26] WARNING: NSCBank/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCBank/server.lua:3: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCBank/server.lua:4: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] INFO: Already bankTrans [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCBank' started [19-03-31 22:45:26] WARNING: NSCBans/bans_client.luac [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [19-03-31 22:45:26] Some files in 'NSCBans' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCBans/bans_server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCBans/bans_server.lua:83: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCBans/bans_server.lua:83: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCBans/bans_server.lua:83: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCBans' started [19-03-31 22:45:26] startResource: Resource 'NSCBaseConverter' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCCore/server.lua:11: Failed to start resource 'NSCBillboards': Couldn't find file res/Textures/ad2.png for resource NSCBillboards [19-03-31 22:45:26] WARNING: NSCBus/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCBus/server.lua:6: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCBus/server.lua:7: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCBus/server.lua:8: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCBus' started [19-03-31 22:45:26] WARNING: NSCCC/speedometer.lua(Line 19) [Client] setControlState is deprecated and may not work in future versions. Please replace with setPedControlState. [19-03-31 22:45:26] Some files in 'NSCCC' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCCC' started [19-03-31 22:45:26] startResource: Resource 'NSCCarJacker' started [19-03-31 22:45:26] WARNING: NSCChairs/c.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [19-03-31 22:45:26] Some files in 'NSCChairs' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCChairs' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [DUP x3] [19-03-31 22:45:26] WARNING: NSCChat/chatbubbles_server.lua:148: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCChat/clan.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCChat/staff.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCChat/law.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCChat/advert.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCChat/vip.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCChat' started [19-03-31 22:45:26] WARNING: NSCClans <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'blip.luac') [19-03-31 22:45:26] WARNING: NSCClans requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'blip.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCClans/server.lua:2: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCClans/server.lua:1457: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCClans/server.lua:1457: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCClans/server.lua:1457: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCClans' started [19-03-31 22:45:26] startResource: Resource 'NSCCollisions' started [19-03-31 22:45:26] startResource: Resource 'NSCCompiler' started [19-03-31 22:45:26] startResource: Resource 'NSCCrimes' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [DUP x3] [19-03-31 22:45:26] WARNING: NSCDrugDelivery/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] ERROR: NSCDrugDelivery/server.lua:43: exports: Call to non-running server resource (NSCText) [string "?"] [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCDrugDelivery' started [19-03-31 22:45:26] WARNING: NSCDrugs <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'plantc.luac') [19-03-31 22:45:26] WARNING: NSCDrugs requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'plantc.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCDrugs/plants.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCDrugs/plants.lua:25: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCDrugs/plants.lua:25: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCDrugs/plants.lua:25: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCDrugs/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCDrugs/server.lua:6: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCDrugs/server.lua:7: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCDrugs/server.lua:31: attempt to compare nil with number [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCDrugs' started [19-03-31 22:45:26] WARNING: NSCEvents/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCEvents/server.lua:9: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCEvents/server.lua:13: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCEvents/server.lua:411: bad argument #1 to 'pairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCEvents' started [19-03-31 22:45:26] WARNING: NSCGUI <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'gui_createGUI.luac') [19-03-31 22:45:26] WARNING: NSCGUI requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'gui_createGUI.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCGUI' started [19-03-31 22:45:26] startResource: Resource 'NSCGlue' started [19-03-31 22:45:26] WARNING: NSCGym/walk_style_c.lua(Line 103) [Client] setControlState is deprecated and may not work in future versions. Please replace with setPedControlState. [19-03-31 22:45:26] Some files in 'NSCGym' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCGym' started [19-03-31 22:45:26] startResource: Resource 'NSCHandlingConverter' started [19-03-31 22:45:26] startResource: Resource 'NSCHeligrab' started [19-03-31 22:45:26] WARNING: NSCHelmet/client.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [19-03-31 22:45:26] Some files in 'NSCHelmet' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCHelmet' started [19-03-31 22:45:26] WARNING: NSCHelpPanel/client.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [19-03-31 22:45:26] Some files in 'NSCHelpPanel' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCHelpPanel' started [19-03-31 22:45:26] WARNING: NSCInteriors/client.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [19-03-31 22:45:26] Some files in 'NSCInteriors' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [DUP x7] [19-03-31 22:45:26] WARNING: NSCInteriors/server.lua:5: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCInteriors/server.lua:9: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCInteriors/server.lua:11: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCInteriors/server.lua:121: bad argument #1 to 'pairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCInteriors' started [19-03-31 22:45:26] WARNING: NSCInventory <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] WARNING: NSCInventory requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCInventory/server.lua:231: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] startResource: Resource 'NSCInventory' started [19-03-31 22:45:26] WARNING: NSCJail <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'jailfine.luac') [19-03-31 22:45:26] WARNING: NSCJail requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'jailfine.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCJail/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCJail/server.lua:15: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCJail/server.lua:17: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCJail/server.lua:19: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCJail' started [19-03-31 22:45:26] WARNING: File 'images/map.png' in resource 'NSCJobActions' is invalid. [19-03-31 22:45:26] WARNING: NSCJobActions/actions.lua(Line 39) [Client] getControlState is deprecated and may not work in future versions. Please replace with getPedControlState. [19-03-31 22:45:26] WARNING: NSCJobActions/actions.lua(Line 222) [Client] setControlState is deprecated and may not work in future versions. Please replace with setPedControlState. [19-03-31 22:45:26] Some files in 'NSCJobActions' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCJobActions/pizza.lua:3: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCJobActions/pizza.lua:7: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCJobActions/pizza.lua:9: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCJobActions/pizza.lua:9: attempt to get length of a boolean value [19-03-31 22:45:26] WARNING: NSCJobActions/police.lua:3: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCJobActions/police.lua:5: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCJobActions/police.lua:7: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCJobActions/police.lua:163: bad argument #1 to 'pairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCJobActions' started [19-03-31 22:45:26] WARNING: NSCJobs <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] WARNING: NSCJobs requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCJobs/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCJobs/server.lua:154: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCJobs/server.lua:281: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCJobs/server.lua:282: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCJobs/server.lua:292: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCJobs' started [19-03-31 22:45:26] startResource: Resource 'NSCLoc' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCLogin/server.lua:50: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCLogin' started [19-03-31 22:45:26] startResource: Resource 'NSCLottery' started [19-03-31 22:45:26] WARNING: NSCMCC/c.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [19-03-31 22:45:26] Some files in 'NSCMCC' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCMCC' started [19-03-31 22:45:26] startResource: Resource 'NSCMaps' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [DUP x3] [19-03-31 22:45:26] WARNING: NSCMechanicShop/s.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCMechanicShop/s.lua:97: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCMechanicShop/s.lua:99: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCMechanicShop/s.lua:99: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCMechanicShop' started [19-03-31 22:45:26] startResource: Resource 'NSCMessages' started [19-03-31 22:45:26] startResource: Resource 'NSCMines' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [DUP x2] [19-03-31 22:45:26] WARNING: NSCCore/server.lua:11: Failed to start resource 'NSCMods': Couldn't find file files/inv.txd for resource NSCMods [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCNyan' started [19-03-31 22:45:26] Failed to start resource item bases/yersilme/objects.map in NSCObjects [19-03-31 22:45:26] startResource: Failed to start resource 'NSCObjects' [19-03-31 22:45:26] INFO: Chatfilter info: loaded filters.xml [19-03-31 22:45:26] INFO: Chatfilter info: loaded 39 filters [19-03-31 22:45:26] startResource: Resource 'NSCOfensive' started [19-03-31 22:45:26] WARNING: NSCOwnedVehicles <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] WARNING: NSCOwnedVehicles requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCOwnedVehicles/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCOwnedVehicles/server.lua:7: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCOwnedVehicles/server.lua:8: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCOwnedVehicles/server.lua:26: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCOwnedVehicles/adds.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCOwnedVehicles' started [19-03-31 22:45:26] startResource: Resource 'NSCPDRobbery' started [19-03-31 22:45:26] WARNING: NSCPhone/s.lua(Line 115) [Server] killPlayer is deprecated and may not work in future versions. Please replace with killPed. [19-03-31 22:45:26] WARNING: NSCPhone <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Some files in 'NSCPhone' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCPhone requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCPhone/s.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCPhone' started [19-03-31 22:45:26] startResource: Resource 'NSCPlayerBlips' started [19-03-31 22:45:26] startResource: Resource 'NSCPlayerFunctions' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [DUP x2] [19-03-31 22:45:26] WARNING: NSCPresents/s.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCPresents' started [19-03-31 22:45:26] WARNING: NSCPshop/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] startResource: Resource 'NSCPshop' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCRadar' started [19-03-31 22:45:26] WARNING: NSCRealTunning/c.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [19-03-31 22:45:26] Some files in 'NSCRealTunning' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCRealTunning/s.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCRealTunning/s.lua:243: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCRealTunning/s.lua:243: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCRealTunning/s.lua:243: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCRealTunning' started [19-03-31 22:45:26] WARNING: NSCReports/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCReports/server.lua:168: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCReports/server.lua:168: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCReports/server.lua:168: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCReports' started [19-03-31 22:45:26] startResource: Resource 'NSCSC' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCCore/server.lua:11: Failed to start resource 'NSCScoreboard': Couldn't find file flags/GE.png for resource NSCScoreboard [19-03-31 22:45:26] WARNING: NSCServices <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] WARNING: NSCServices requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCServices/gass.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCServices/gass.lua:40: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCServices/gass.lua:41: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCServices/gass.lua:46: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCServices/repair.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCServices/repair.lua:4: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCServices/repair.lua:5: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCServices/repair.lua:8: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] ERROR: NSCServices/fastFood/food-s.lua:52: attempt to index field '?' (a nil value) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCServices' started [19-03-31 22:45:26] WARNING: NSCSevenShops/s.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCSevenShops/s.lua:64: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCSevenShops/s.lua:65: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCSevenShops/s.lua:65: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCSevenShops' started [19-03-31 22:45:26] startResource: Resource 'NSCShaders' started [19-03-31 22:45:26] startResource: Resource 'NSCSmoke' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [DUP x2] [19-03-31 22:45:26] WARNING: NSCSounds/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] ERROR: NSCSounds/server.lua:2: call: failed to call 'NGSQL:db_exec' [string "?"] [19-03-31 22:45:26] WARNING: NSCSounds/server.lua:3: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCSounds/server.lua:7: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCSounds/server.lua:7: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCSounds' started [19-03-31 22:45:26] WARNING: NSCSpawnProtection/client.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [19-03-31 22:45:26] Some files in 'NSCSpawnProtection' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCSpawnProtection' started [19-03-31 22:45:26] WARNING: NSCSpawners <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] WARNING: NSCSpawners requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCSpawners/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCSpawners/server.lua:3: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCSpawners/server.lua:4: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCSpawners/server.lua:9: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCSpawners' started [19-03-31 22:45:26] startResource: Resource 'NSCSpeakers' started [19-03-31 22:45:26] WARNING: NSCStores/server.lua(Line 721) [Server] getVehicleModel is deprecated and may not work in future versions. Please replace with getElementModel. [19-03-31 22:45:26] Some files in 'NSCStores' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCStores/server.lua:4: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCStores' started [19-03-31 22:45:26] WARNING: NSCSuperman <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] WARNING: NSCSuperman requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCSuperman' started [19-03-31 22:45:26] startResource: Resource 'NSCTaser' started [19-03-31 22:45:26] startResource: Resource 'NSCText' started [19-03-31 22:45:26] WARNING: NSCToll/c.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [19-03-31 22:45:26] Some files in 'NSCToll' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCToll' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [DUP x4] [19-03-31 22:45:26] WARNING: NSCTrade/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCTrade' started [19-03-31 22:45:26] WARNING: NSCTrader/gui.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [19-03-31 22:45:26] Some files in 'NSCTrader' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCTrader' started [19-03-31 22:45:26] WARNING: NSCTurf <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] WARNING: NSCTurf requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCTurf/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCTurf/server.lua:75: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCTurf/server.lua:76: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCTurf/server.lua:76: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCTurf' started [19-03-31 22:45:26] startResource: Resource 'NSCUpdates' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCVIP/vip_s.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCVIP' started [19-03-31 22:45:26] WARNING: NSCVehicleShop/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] ERROR: NSCVehicleShop/server.lua:2: call: failed to call 'NGSQL:db_exec' [string "?"] [19-03-31 22:45:26] ERROR: NSCVehicleShop/server.lua:3: call: failed to call 'NGSQL:db_exec' [string "?"] [19-03-31 22:45:26] WARNING: NSCVehicleShop/server.lua:49: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCVehicleShop/server.lua:50: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCVehicleShop/server.lua:52: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCVehicleShop' started [19-03-31 22:45:26] WARNING: NSCWarZone/server.lua(Line 628) [Server] killPlayer is deprecated and may not work in future versions. Please replace with killPed. [19-03-31 22:45:26] Some files in 'NSCWarZone' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCWarZone/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCWarZone/server.lua:450: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCWarZone/server.lua:454: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:26] ERROR: NSCWarZone/server.lua:454: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCWarZone' started [19-03-31 22:45:26] WARNING: File 'models/Wheels/vehicle.txd' in resource 'NSCWheels' contains errors. [19-03-31 22:45:26] WARNING: NSCWheels <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] WARNING: NSCWheels requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCWheels' started [19-03-31 22:45:26] startResource: Resource 'NSCWrench' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [DUP x2] [19-03-31 22:45:26] INFO: starting civ event is Astronunt [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCciviliansystem' started [19-03-31 22:45:26] WARNING: NSCduel/server.lua(Line 388) [Server] getVehicleIDFromName is deprecated and may not work in future versions. Please replace with getVehicleModelFromName. [19-03-31 22:45:26] Some files in 'NSCduel' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCduel' started [19-03-31 22:45:26] WARNING: NSCecho <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'antidm.luac') [19-03-31 22:45:26] WARNING: NSCecho requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'antidm.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCecho/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCecho/server.lua:8: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] INFO: Echo account Sql: SQLite has failed to connected. [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCecho' started [19-03-31 22:45:26] WARNING: NSCfallout <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] WARNING: NSCfallout requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCfallout' started [19-03-31 22:45:26] WARNING: NSChospital <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] WARNING: NSChospital requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSChospital' started [19-03-31 22:45:26] startResource: Resource 'NSCmodels' started [19-03-31 22:45:26] WARNING: NSCmodshop <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'color.luac') [19-03-31 22:45:26] WARNING: NSCmodshop requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'color.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCmodshop' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [DUP x4] [19-03-31 22:45:26] WARNING: NSCpolicecomputer/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCpolicecomputer' started [19-03-31 22:45:26] WARNING: NSCsniperevent <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] WARNING: NSCsniperevent requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCsniperevent' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCucp/server.lua:1: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] INFO: Server Achievements has failed to connected. [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] startResource: Resource 'NSCucp' started [19-03-31 22:45:26] WARNING: NSCvehiclehud <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] WARNING: NSCvehiclehud requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least client 1.5.2-9.07903 because of 'client.luac') [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] startResource: Resource 'NSCvehiclehud' started [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: NSCCore/saf.lua:7: Bad usage @ 'dbConnect' [Can't connect to MySQL server on '217.182.25.250' (111)] [19-03-31 22:45:26] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:26] WARNING: realdriveby/driveby_client.lua(Line 253) [Client] setControlState is deprecated and may not work in future versions. Please replace with setPedControlState. [19-03-31 22:45:26] Some files in 'realdriveby' use deprecated functions. [19-03-31 22:45:26] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:26] ERROR: Couldn't find resource NSCJobsActions. Check it exists. [19-03-31 22:45:27] ERROR: Couldn't find resource NSCastrouant. Check it exists. [19-03-31 22:45:27] ERROR: Couldn't find resource NSCbases. Check it exists. [19-03-31 22:45:27] ERROR: Couldn't find resource NSCdonations. Check it exists. [19-03-31 22:45:27] ERROR: Couldn't find resource NSChud. Check it exists. [19-03-31 22:45:27] ERROR: Unable to start resource NSCmods; Couldn't find file files/inv.txd for resource NSCMods [19-03-31 22:45:27] Failed to start resource item bases/yersilme/objects.map in NSCObjects [19-03-31 22:45:27] ERROR: Unable to start resource NSCobjects; Failed to start resource item bases/yersilme/objects.map which is required [19-03-31 22:45:27] ERROR: Couldn't find resource NSC. Check it exists. [19-03-31 22:45:27] ERROR: Unable to start resource NSCscoreboard; Couldn't find file flags/GE.png for resource NSCScoreboard [19-03-31 22:45:27] ERROR: Couldn't find resource NSCescort. Check it exists. [19-03-31 22:45:27] WARNING: customblips/blipstreamer_client.lua(Line 220) [Client] getControlState is deprecated and may not work in future versions. Please replace with getPedControlState. [19-03-31 22:45:27] Some files in 'customblips' use deprecated functions. [19-03-31 22:45:27] Use the 'upgrade' command to perform a basic upgrade of resources. [19-03-31 22:45:27] ERROR: Couldn't find resource IconM. Check it exists. [19-03-31 22:45:27] Querying MTA master server... success! (Auto detected IP:217.182.25.250) [19-03-31 22:45:27] Authorized serial account protection is enabled for the ACL group(s): `Admin` See http://mtasa.com/authserial [19-03-31 22:45:27] Server started and is ready to accept connections! [19-03-31 22:45:27] To stop the server, type 'shutdown' or press Ctrl-C [19-03-31 22:45:27] Type 'help' for a list of commands. [19-03-31 22:45:31] WARNING: NSCAdmin/server.lua:1189: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [DUP x9] [19-03-31 22:45:31] WARNING: NSCStores/server.lua:283: dbPoll failed; SQL logic error [19-03-31 22:45:31] WARNING: NSCStores/server.lua:291: dbPoll failed; SQL logic error [19-03-31 22:45:31] WARNING: NSCStores/server.lua:90: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:31] WARNING: NSCStores/server.lua:91: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:31] ERROR: NSCStores/server.lua:93: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:36] WARNING: NSCBank/server.lua:12: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:36] ERROR: NSCBank/server.lua:12: bad argument #1 to 'pairs' (table expected, got boolean) [19-03-31 22:45:39] CONNECT: Smoker failed to connect (Wrong password) (IP: 156.212.133.5 Serial: 98CDA3085A47EFAD4340B4675DF5DDB2 Version: 1.5.6-9.16598.0) [19-03-31 22:45:39] Server minclientversion is now 1.5.6-9.16557.0 [19-03-31 22:45:47] WARNING: NSCLogin/server.lua:60: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:47] CONNECT: Smoker connected (IP: 156.212.133.5 Serial: 98CDA3085A47EFAD4340B4675DF5DDB2 Version: 1.5.6-9.16598.0) [19-03-31 22:45:47] JOIN: Smoker joined the game (IP: 156.212.133.5) [19-03-31 22:45:47] WARNING: NGSQL/sql.luac:935: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:47] WARNING: NGSQL/sql.luac:935: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:47] ERROR: NGSQL/sql.luac:936: attempt to get length of local 'res' (a boolean value) [19-03-31 22:45:47] WARNING: NSCBans/bans_server.lua:36: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:47] WARNING: NSCBans/bans_server.lua:38: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:47] ERROR: NSCBans/bans_server.lua:39: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:56] WARNING: NSCBans/bans_server.lua:53: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:56] WARNING: NSCBans/bans_server.lua:54: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:56] ERROR: NSCBans/bans_server.lua:55: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:56] WARNING: NSCVIP/vip_s.lua:25: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:56] WARNING: NSCVIP/vip_s.lua:26: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:56] ERROR: NSCVIP/vip_s.lua:27: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:45:56] WARNING: NSCLogin/server.lua:75: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:45:56] WARNING: NSCLogin/server.lua:77: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:45:56] ERROR: NSCLogin/server.lua:79: bad argument #1 to 'ipairs' (table expected, got boolean) [19-03-31 22:46:02] WARNING: NSCLogin/server.lua:75: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean] [19-03-31 22:46:02] WARNING: NSCLogin/server.lua:77: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean] [19-03-31 22:46:02] ERROR: NSCLogin/server.lua:79: bad argument #1 to 'ipairs' (table expected, got boolean)
  7. Tokio

    [HELP] How to fix this bug?

    When i write a message to chatbox the picture appears in the right place, but when a another player output something in chatbox, the picture jumps up more than my message.. How to fix this bug?! Client: emotes = {} function showEmotes(originaltext,emote,emoteID) local totaltextwidth = getImageOffsets(originaltext) local chatwidth = getChatboxLayout()["chat_width"]*317*scaleX local originalmultiplier = math.floor(totaltextwidth/chatwidth) local text,_ = string.gsub(originaltext,tostring(emoteID..".*"),"") local width = getImageOffsets(text) local multiplier = math.floor(width/chatwidth) local width = width-multiplier*chatwidth table.insert(emotes,{emote,width,lines-(originalmultiplier-multiplier),false}) local _,index1 = string.gsub(originaltext,emoteID,emoteID) if index1>1 then local text,index = string.gsub(originaltext,emoteID,"-00",1) showEmotes(text,emote,emoteID) end end addEvent("triggerChat",true) addEventHandler("triggerChat",root,showEmotes) function getImageOffsets(text) lines = getChatboxLayout()["chat_lines"] local chatboxscale = getChatboxLayout()["text_scale"] local fontint = getChatboxLayout()["chat_font"] scaleX = getChatboxLayout()["chat_scale"][1] scaleY = getChatboxLayout()["chat_scale"][2] if fontint == 0 then font = "default" end if fontint == 1 then font = "clear" end if fontint == 2 then font = "default-bold" end if fontint == 3 then font = "arial" end fontheight = dxGetFontHeight(chatboxscale,font) local width = (dxGetTextWidth(text,chatboxscale,font)+chatxoffset)*scaleX return width end local screenWidth, screenHeight = guiGetScreenSize ( ) chatxoffset = screenWidth * 0.0145 chatyoffset = screenHeight * 0.0145 function createText ( ) for index,item in ipairs(emotes) do local line = item[3] local width = item[2] local height = (chatyoffset + (line-1)*fontheight)*scaleY if (item[3]<1) then table.remove(emotes,index) else dxDrawImage(width,height,20,20,"a.png",0,0,0,tocolor(255,255,255,255),true) end end end function emotesOnOff() if emotesVisible then removeEventHandler ( "onClientRender", root, createText ) emotesVisible = false else addEventHandler ( "onClientRender", root, createText ) emotesVisible = true end end function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) emotesVisible = true addCommandHandler ("emotes", emotesOnOff ) end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) function onClientChatMessageHandler(text) local width = getImageOffsets(text) local chatwidth = getChatboxLayout()["chat_width"]*317*scaleX local multiplier = math.floor(width/chatwidth)+1 for index,item in ipairs(emotes) do if item[4] then item[3] = item[3]-1*multiplier end item[4] = true end end addEventHandler("onClientChatMessage", getRootElement(), onClientChatMessageHandler) Server: emotes = { {"a","-23"} } function playerChat(text, messageType) if (messageType ~= 0) then return end local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "tesztr" ) ) then local originalText = removeColorCodes(getPlayerName(source)) for index,item in ipairs(emotes) do text,item[3] = string.gsub(originalText,item[1],item[2]) end for index,item in ipairs(emotes) do triggerClientEvent("triggerChat",source,"[HU]"..originalText,item[1],item[2]) end for index,item in ipairs(emotes) do originalText,item[3] = string.gsub(originalText,item[1]," ") end end end addEventHandler("onPlayerChat", root, playerChat) function removeColorCodes(str) return (string.gsub(str, "#[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]", "")) end
  8. A simple script of dressable characters and deformable faces. You can move every vertex of the head with a simple displacement shader. The script is in test state right now, I'll create a new editor later. Hope you like it.
  9. TPF is bringing opportunities for those players who don't know scripting but wants to learn. We ( TPF staff ) offers free courses in various languages, as well as designing, for totally free. Languages we can teach you? We can teach you Lua, HTML, CSS ,PHP and MYSQL What can we teach you in designing ? Creating logos, creating banners ,posters , web design and MORE !!!(Using Photoshop cs6) Our contact: Contact DiGiTal#2028 or join our discord server : https://discord.gg/BxkW65z For more information and tutorials visit our website : https://tutoplayfun.ml/
  10. I want attach images to my message in default mta chat with a word, but i dont know how to attach the image to the message.. Anyone can help, and show me a example?
  11. Grozz

    [SHOW] 3D GUI Library

    I made a 3D GUI System in MTA:SA. You can place 3D GUI Elements (Buttons, Textboxes, Labels, Lists, Checkboxes, Sliders, etc.) wherever you want. It's not public yet.
  12. Hey, I have a freeroam server and for that I have a "Clan Panel" or "Clan System" script, which have a problem . The problem of the resource is that when I use the respective bind ("H") the clan panel is not showed on the server. I am now in a sad situation , it would be great if someone helps me out. The script : clan_c.lua : Clan = { Button = {}, Window = {}, Gridlist = {}, Edit = {} } Clan.Window[1] = guiCreateWindow(306, 174, 320, 346, "Clan panel", false) guiWindowSetSizable(Clan.Window[1], false) Clan.Window[2] = guiCreateWindow(401, 281, 252, 99, "Set Player Rank", false) guiWindowSetSizable(Clan.Window[2], false) Clan.Window[3] = guiCreateWindow(401, 281, 252, 99, "Set Player Rank", false) guiWindowSetSizable(Clan.Window[3], false) Clan.Gridlist[1] = guiCreateGridList(9, 25, 188, 311, false, Clan.Window[1]) local column = guiGridListAddColumn(Clan.Gridlist[1], "Players", 0.9) if ( column ) then --If the column has been created, fill it with players for _,v in ipairs(getElementsByType("player"))do local row = guiGridListAddRow(Clan.Gridlist[1]) local players = getPlayerName(v) guiGridListSetItemText(Clan.Gridlist[1],row,column,players,false,false) end end Clan.Button[1] = guiCreateButton(204, 51, 106, 38, "Add", false, Clan.Window[1]) Clan.Button[2] = guiCreateButton(204, 96, 106, 38, "Kick", false, Clan.Window[1]) Clan.Button[3] = guiCreateButton(204, 144, 106, 38, "Promote", false, Clan.Window[1]) Clan.Button[4] = guiCreateButton(204, 192, 106, 38, "Demote", false, Clan.Window[1]) Clan.Button[5] = guiCreateButton(204, 288, 106, 38, "Close", false, Clan.Window[1]) Clan.Button[6] = guiCreateButton(13, 62, 87, 23, "Cancel", false, Clan.Window[2]) Clan.Button[7] = guiCreateButton(143, 62, 87, 23, "Set", false, Clan.Window[2]) Clan.Button[8] = guiCreateButton(13, 62, 87, 23, "Cancel", false, Clan.Window[3]) Clan.Button[9] = guiCreateButton(143, 62, 87, 23, "Set", false, Clan.Window[3]) Clan.Edit[1] = guiCreateEdit(13, 29, 227, 28, "", false, Clan.Window[2]) Clan.Edit[2] = guiCreateEdit(13, 29, 227, 28, "", false, Clan.Window[3]) guiSetVisible(Clan.Window[1], false) guiSetVisible(Clan.Window[2], false) guiSetVisible(Clan.Window[3], false) showCursor(false) if getElementData(localPlayer, "clan.rank") == "leader" or getElementData(localPlayer, "player.key") == "Snowwhite" or getElementData(localPlayer, "player.key") == "danksta" or getElementData(localPlayer, "player.key") == "[ET]Snowwhite" or getElementData(localPlayer, "player.key") == "[ET]Danksta" or getElementData(localPlayer, "player.key") == "Danksta" then guiSetEnabled(Clan.Button[3], true) guiSetEnabled(Clan.Button[4], true) else guiSetEnabled(Clan.Button[3], false) guiSetEnabled(Clan.Button[4], false) end function toggleClanControl( source ) if getElementData(localPlayer, "player.key") == "Snowwhite" or getElementData(localPlayer, "player.key") == "[ET]Snowwhite" or getElementData(localPlayer, "player.key") == "danksta" or getElementData(localPlayer, "player.key") == "[ET]Danksta" or getElementData(localPlayer, "player.key") == "Danksta" then if not guiGetVisible( Clan.Window[1] ) then showCursor ( true ) guiSetVisible( Clan.Window[1], true ) guiGridListClear ( Clan.Gridlist[1] ) if ( column ) then guiGridListClear ( Clan.Gridlist[1] ) for _,v in ipairs(getElementsByType("player"))do local row = guiGridListAddRow(Clan.Gridlist[1]) local playerName = getPlayerName(v) guiGridListSetItemText(Clan.Gridlist[1],row,column,playerName,false,false) end end if getElementData(localPlayer, "clan.rank") == "leader" or getElementData(localPlayer, "player.key") == "Snowwhite" or getElementData(localPlayer, "player.key") == "danksta" or getElementData(localPlayer, "player.key") == "[ET]Snowwhite" or getElementData(localPlayer, "player.key") == "Danksta" or getElementData(localPlayer, "player.key") == "[ET]Danksta" then guiSetEnabled(Clan.Button[3], true) guiSetEnabled(Clan.Button[4], true) else guiSetEnabled(Clan.Button[3], false) guiSetEnabled(Clan.Button[4], false) end else showCursor ( false ) guiSetVisible( Clan.Window[1], false ) end end end bindKey( "H", "down", toggleClanControl ) addCommandHandler("clan", toggleClanControl) addEventHandler("onClientGUIClick", guiRoot, function() if source == Clan.Button[1] then local row, column = guiGridListGetSelectedItem(Clan.Gridlist[1]) if row == -1 then return end local playerName = guiGridListGetItemText(Clan.Gridlist[1],row,column) local player = getPlayerFromName(playerName) local team = getPlayerTeam(localPlayer) local teamName = getTeamName(team) if not playerName then guiGridListRemoveRow(row) return end triggerServerEvent("addToTeam", localPlayer,playerName,teamName) end end) addEventHandler("onClientGUIClick", guiRoot, function() if source == Clan.Button[2] then local row, column = guiGridListGetSelectedItem(Clan.Gridlist[1]) if row == -1 then return end local playerName = guiGridListGetItemText(Clan.Gridlist[1],row,column) local player = getPlayerFromName(playerName) local team = getPlayerTeam(localPlayer) local teamName = getTeamName(team) if not playerName then guiGridListRemoveRow(row) return end triggerServerEvent("kickFromTeam", localPlayer,playerName,teamName) end end) function closeClan() if guiGetVisible(Clan.Window[1]) then guiSetVisible(Clan.Window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", Clan.Button[5], closeClan, false) function togglePromote( source ) -- Show the panel if not guiGetVisible( Clan.Window[2] ) then showCursor ( true ) guiSetVisible( Clan.Window[2], true ) guiMoveToBack( Clan.Window[1] ) else showCursor ( true ) guiSetVisible( Clan.Window[2], false ) end end addEventHandler ( "onClientGUIClick", Clan.Button[3], togglePromote, false ) addEventHandler("onClientGUIClick",Clan.Button[7], function() local row, column = guiGridListGetSelectedItem(Clan.Gridlist[1]) if row == -1 then return end local playerName = guiGridListGetItemText(Clan.Gridlist[1],row,column) local player = getPlayerFromName(playerName) if not playerName then guiGridListRemoveRow(row) return end triggerServerEvent("promotePlayer",localPlayer,playerName,tostring(guiGetText(Clan.Edit[1])) or "Member") guiSetVisible( Clan.Window[2], false ) showCursor ( true ) end,false) function closeClan() if guiGetVisible(Clan.Window[2]) then guiSetVisible(Clan.Window[2],false) showCursor(true) end end addEventHandler ("onClientGUIClick", Clan.Button[6], closeClan, false) function toggleDemote( source ) -- Show the panel if not guiGetVisible( Clan.Window[2] ) then showCursor ( true ) guiSetVisible( Clan.Window[2], true ) guiMoveToBack( Clan.Window[1] ) else showCursor ( true ) guiSetVisible( Clan.Window[2], false ) end end addEventHandler ( "onClientGUIClick", Clan.Button[4], toggleDemote, false ) addEventHandler("onClientGUIClick",Clan.Button[9], function() local row, column = guiGridListGetSelectedItem(Clan.Gridlist[1]) if row == -1 then return end local playerName = guiGridListGetItemText(Clan.Gridlist[1],row,column) local player = getPlayerFromName(playerName) if not playerName then guiGridListRemoveRow(row) return end triggerServerEvent("DemotePlayer",localPlayer,playerName,tostring(guiGetText(Clan.Edit[2])) or "Member") guiSetVisible( Clan.Window[3], false ) showCursor ( true ) end,false) function closeClan() if guiGetVisible(Clan.Window[3]) then guiSetVisible(Clan.Window[3],false) showCursor(true) end end addEventHandler ("onClientGUIClick", Clan.Button[8], closeClan, false) and the clan_s.lua : function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end local blip = {} addEvent("addToTeam", true) addEventHandler("addToTeam", root, function (playername, teamname) local player = getPlayerFromName(playername or "") local team = getTeamFromName(teamname or "") if player and team then local r, g, b = getTeamColor ( team ) setPlayerTeam(player, team) if not isElement(blip[source]) then blip[source] = createBlipAttachedTo(source) end local theTeam = getPlayerTeam(source) if theTeam then local r, g, b = getTeamColor(theTeam) setPlayerNametagColor(source, r, g, b) setBlipColor(blip[source], r, g, b, 255) setPlayerName(source,getPlayerName(source):gsub('#%x%x%x%x%x%x',RGBToHex(r,g,b))) outputChatBox("You've been added to "..getTeamName(team).."", player, 255, 255, 255, r,g,b,true) end end end) addEvent("kickFromTeam", true) addEventHandler("kickFromTeam", root, function (playername, teamname) local player = getPlayerFromName(playername or "") local team = getTeamFromName(teamname or "") if player and team then local red, green, blue = math.random (50, 255), math.random (50, 255), math.random (50, 255) setPlayerTeam(player, nil) setPlayerNametagColor(player, red, green, blue) outputChatBox("You've been kicked from #FFFFFF"..getTeamName(team).."#FF0000.", player, 255, 0, 0, true) end end) addEvent("promotePlayer",true) addEventHandler("promotePlayer",root, function(playername, rank) local player = getPlayerFromName(playername or "") if player then if rank then setElementData(player, "clan.rank", rank) outputChatBox("You Have Been promoted To A #FFFFFF"..tostring(rank), player, 255, 0, 0, true) end end end) addEvent("DemotePlayer",true) addEventHandler("DemotePlayer",root, function(playername, rank) local player = getPlayerFromName(playername or "") if player then if rank then setElementData(player, "clan.rank", rank) outputChatBox("You Have Been Demoted To A #FFFFFF"..tostring(rank), player, 255, 0, 0, true) end end end) function loopFix( thePlayer, _, who, lossp ) if getElementData(thePlayer, "player.key") == "Snowwhite" then if ( who ) then local LossC = tonumber (lossp) or 0 local ThePlayer = getPlayerFromParticalName ( who ) if ( ThePlayer ) then setElementData( ThePlayer,"EXP",LossC ) end end end end addCommandHandler ( "fixbug", loopFix) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end addEventHandler("onPlayerQuit", root, function() if isElement(blip[source]) then destroyElement(blip[source]) end end ) It would be great if someone finds what is the problem and help me to fix it our
  13. CLIENT: function cancelTazerDamage(attacker, weapon, bodypart, loss) if (weapon==24) then -- deagle local mode = getElementData(attacker, "handTaser") if (mode==true) then cancelEvent() end end end addEventHandler("onClientPlayerDamage", localPlayer, cancelTazerDamage) local cFunc = {} local cSetting = {} cSetting["shots"] = {} cSetting["shot_calcs"] = {} local last_shot = 1 cFunc["draw_shot"] = function(x1, y1, z1, x2, y2, z2) table.insert(cSetting["shots"], last_shot, {x1, y1, z1, x2, y2, z2}) local lastx, lasty, lastz = x1, y1, z1 local dis = getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2) cSetting["shot_calcs"][last_shot] = {} last_shot = last_shot+1 end cFunc["wait_shot"] = function() toggleControl("fire", false) setTimer(function() toggleControl("fire", true) end, 15000, 1) end cFunc["shot_check"] = function(wp, _, _, hitX, hitY, hitZ, element, startX, startY, startZ) if(wp == 24) and (getElementData(localPlayer,"handTaser"))then cFunc["shot_weapon"](hitX, hitY, hitZ, startX, startY, startZ) cancelEvent() if(source == localPlayer) then cFunc["wait_shot"]() end end end cFunc["anim_check"] = function(attacker, wep, bodypart,loss) if(wep == 24) and (getElementData(localPlayer,"handTaser"))then local playerX,playerY,playerZ = getElementPosition(localPlayer) local targetX,targetY,targetZ = getElementPosition(source) if getDistanceBetweenPoints3D(playerX,playerY,playerZ,targetX,targetY,targetZ) <= 12 then triggerServerEvent("tazerFired", getRootElement(), source) end end end addEventHandler("onClientPlayerWeaponFire", getRootElement(), cFunc["shot_check"]) addEventHandler("onClientPedDamage", getRootElement(),cFunc["anim_check"]) addEventHandler("onClientPlayerDamage", getRootElement(),cFunc["anim_check"]) addEventHandler("onClientResourceStart",resourceRoot,function() setElementData(localPlayer, "tazed",0) end) addEventHandler("onClientRender",getRootElement(),function() if getElementData(localPlayer, "tazed") == 1 then toggleAllControls(false, false, false) toggleControl("fire", false) toggleControl("sprint", false) toggleControl("crouch", false) toggleControl("jump", false) toggleControl('next_weapon',false) toggleControl('previous_weapon',false) toggleControl('aim_weapon',false) end end) SERVER: local cFunc = {} local cSetting = {} function tazerFired(target) if (isElement(target) and getElementType(target)=="player") then fadeCamera ( target, false, 1.0, 255, 255, 255 ) setElementData(target, "tazed", 1) toggleAllControls(target, false, false, false) setPedAnimation(target, "ped", "FLOOR_hit_f", -1, false, false, true) setTimer(removeAnimation, 30000, 1, target) end end addEvent("tazerFired", true ) addEventHandler("tazerFired", getRootElement(), tazerFired) function removeAnimation(thePlayer) if (isElement(thePlayer) and getElementType(thePlayer)=="player") then fadeCamera(thePlayer, true, 0.5) if getElementData(thePlayer,"isAnim") then setElementFrozen(thePlayer,true) setPedAnimation(thePlayer,"sweet","sweet_injuredloop",-1,false,false,false) else setPedAnimation(thePlayer,nil,nil) toggleAllControls(thePlayer, true, true, true) end setElementData(thePlayer, "tazed", 0) end end I do not get any errors/warnings in debugscript 3, just simply does not working the script.. What wrong in this codes? :s
  14. #Horus

    Olá, me ajuda ?

    Eu queria separar as funções de um script de bar ( Separar uma função pra cada bebida, Catuaba, Vodca e Cerveja ) pois é muito desorganizado e tambem porque coloquei um painel novo nesse script... ja tentei varias e varias vezes e todas deram errado; c.lua ( A Parte das funções que quero separar Antes ) Esse aqui funciona normalmente, mas o proximo que eu separei não funciona.. function clickEffectDrink(button,state) if button == "left" and state == "up" then if isMouseInPosition(drawDrinksBVS.bgCatuabaX, drawDrinksBVS.bgCatuabaY, drawDrinksBVS.bgCatuabaW, drawDrinksBVS.bgCatuabaH) then if (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 200) else playSoundFrontEnd(6) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end elseif isMouseInPosition(drawDrinksBVS.bgVodkaX, drawDrinksBVS.bgVodkaY, drawDrinksBVS.bgVodkaW, drawDrinksBVS.bgVodkaH) then if (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 150) else playSoundFrontEnd(6) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end elseif isMouseInPosition(drawDrinksBVS.bgCervejaX, drawDrinksBVS.bgCervejaY, drawDrinksBVS.bgCervejaW, drawDrinksBVS.bgCervejaH) then if (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 100) else playSoundFrontEnd(6) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end elseif isMouseInPosition(drawDrinksBVS.bgCloseX, drawDrinksBVS.bgCloseY, drawDrinksBVS.bgCloseW, drawDrinksBVS.bgCloseH) then if isEventHandlerAdded("onClientRender", root, drawDrinks) and isEventHandlerAdded("onClientClick", root, clickEffectDrink) then removeEventHandler("onClientRender", root, drawDrinks) removeEventHandler("onClientClick", root, clickEffectDrink) showCursor(false) end end end end c.lua ( Aqui eu refiz separando as funções das bebidas Catuaba, Vodca e Cerveja, adicionei algumas coisas a mais porque como eu disse, mudei o painel. ) function Catuaba(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3522, screenH * 0.4714, screenW * 0.4632, screenH * 0.5143) then if (not isTimer(timerExpireDrinks)) then setBlur(false) triggerServerEvent("server:onPlayerBuyDrinkBVS", localPlayer, 200) removeEventHandler("onClientRender", root, drawDrinks) showChat(true) showCursor(false) playSound("sfx/hit.mp3", false) else playSound("sfx/hit.mp3", false) outputChatBox("#1066E7Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end end end end end addEventHandler("onClientClick", root, Catuaba) function Vodca(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3522, screenH * 0.4714, screenW * 0.4632, screenH * 0.5143) then if (not isTimer(timerExpireDrinks)) then setBlur(false) triggerServerEvent("server:onPlayerBuyDrinkBVS", localPlayer, 150) removeEventHandler("onClientRender", root, drawDrinks) showChat(true) showCursor(false) playSound("sfx/hit.mp3", false) else playSound("sfx/hit.mp3", false) outputChatBox("#1066E7Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end end end end end addEventHandler("onClientClick", root, Vodca) function Cerveja(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3522, screenH * 0.4714, screenW * 0.4632, screenH * 0.5143) then if (not isTimer(timerExpireDrinks)) then setBlur(false) triggerServerEvent("server:onPlayerBuyDrinkBVS", localPlayer, 100) removeEventHandler("onClientRender", root, drawDrinks) showChat(true) showCursor(false) playSound("sfx/hit.mp3", false) else playSound("sfx/hit.mp3", false) outputChatBox("#1066E7Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end end end end end addEventHandler("onClientClick", root, Cerveja) Oque há de errado no script ? se puderem me informar o erro como sempre agradeço irmãos!
  15. Boa noite, eu estudei um pouco na wiki e fiz um script de bar, assim, o script do bar não fui eu que fiz, apenas coloquei um painel e alguns sistemas, talvez eu venda + talvez não porque fiz outro parecido só que de limpar ficha e ficou mais exclusivo.. assim vamos lá, primeiramente são 4 bares, com o interior 11, assim que entra ne qualquer um deles, tem o ped, em cima do ped coloquei um dxDrawText mandando o player pressionar a letra "M" para abrir o cursor que é a função com nome de "Nametag", e depois clicar no ped para abrir o painel menu para compra a bebida que ele deseja, mas após abrir clicar no ped e o painel menu ter aberto, a função "Nametag" ( A que manda o player pressionar a letra M e clicar no ped, ou seja o texto continua no ped mesmo com o painel-menu aberto ), e também não seta o walkingStyle.. voces poderiam me informar o erro e como resolve-lo ? c.lua --[[ ################################################ # # # RESOURCE DESENVOLVIDO por: # # < #Horus > # # # # # ################################################ ]] local ped = createPed(240, 497.283, -77.876, 998.765, 0) local ped2 = createPed(240, 497.283, -77.876, 998.765, 0) local ped3 = createPed(240, 497.283, -77.876, 998.765, 0) local ped4 = createPed(240, 497.283, -77.876, 998.765, 0) setElementInterior(ped, 11) setElementDimension(ped, 1) setElementFrozen(ped, true) setElementInterior(ped2, 11) setElementDimension(ped2, 2) setElementFrozen(ped2, true) setElementInterior(ped3, 11) setElementDimension(ped3, 3) setElementFrozen(ped3, true) setElementInterior(ped4, 11) setElementDimension(ped4, 4) setElementFrozen(ped4, true) local dxfont0_fonte = dxCreateFont("font/fonte.ttf", 10) local screenW, screenH = guiGetScreenSize() local resW, resH = 1360,768 local x, y = (screenW/resW), (screenH/resH) function setBlur(state) setElementData(localPlayer, "showBlur", state) end function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end function dxDrawLinedRectangle( x, y, width, height, color, _width, postGUI ) _width = _width or 1 dxDrawLine ( x, y, x+width, y, color, _width, postGUI ) -- Top dxDrawLine ( x, y, x, y+height, color, _width, postGUI ) -- Left dxDrawLine ( x, y+height, x+width, y+height, color, _width, postGUI ) -- Bottom return dxDrawLine ( x+width, y, x+width, y+height, color, _width, postGUI ) -- Right end function cancelPedDamage(attacker) cancelEvent() end addEventHandler("onClientPedDamage", ped, cancelPedDamage) addEventHandler("onClientPedDamage", ped2, cancelPedDamage) addEventHandler("onClientPedDamage", ped3, cancelPedDamage) addEventHandler("onClientPedDamage", ped4, cancelPedDamage) function drawDrinks() tocolor1 = tocolor(0, 0, 0, 150) if isCursorOnElement(screenW * 0.3257, screenH * 0.4115, screenW * 0.3272, screenH * 0.0469) then -- CATUABA tocolor1 = tocolor(16, 102, 231, 100) end tocolor2 = tocolor(0, 0, 0, 150) if isCursorOnElement(screenW * 0.3257, screenH * 0.4583, screenW * 0.3272, screenH * 0.0469) then -- VODCA tocolor2 = tocolor(16, 102, 231, 100) end tocolor3 = tocolor(0, 0, 0, 150) if isCursorOnElement(screenW * 0.3257, screenH * 0.5052, screenW * 0.3272, screenH * 0.0469) then -- CERVEJA tocolor3 = tocolor(16, 102, 231, 100) end tocolorF = tocolor(217, 0, 5, 0) if isCursorOnElement(screenW * 0.6426, screenH * 0.3490, screenW * 0.0221, screenH * 0.0417) then -- CLOSE tocolorF = tocolor(217, 0, 5, 150) end -- ################# BACKGROUND ################# dxDrawRectangle(screenW * 0.3140, screenH * 0.3490, screenW * 0.3507, screenH * 0.3997, tocolor(0, 0, 0, 150), false) dxDrawRectangle(screenW * 0.3140, screenH * 0.3490, screenW * 0.3507, screenH * 0.0417, tocolor(0, 0, 0, 150), false) -- ################# BUTTONS ################# dxDrawRectangle(screenW * 0.3257, screenH * 0.4115, screenW * 0.3272, screenH * 0.0469, tocolor1, false) -- CATUABA dxDrawRectangle(screenW * 0.3257, screenH * 0.4583, screenW * 0.3272, screenH * 0.0469, tocolor2, false) -- VODCA dxDrawRectangle(screenW * 0.3257, screenH * 0.5052, screenW * 0.3272, screenH * 0.0469, tocolor3, false) -- CERVEJA dxDrawRectangle(screenW * 0.6426, screenH * 0.3490, screenW * 0.0221, screenH * 0.0417, tocolorF, false) -- CLOSE -- ################# IMAGENS ################# dxDrawImage(screenW * 0.3287, screenH * 0.4180, screenW * 0.0191, screenH * 0.0352, "", 0, 0, 0, tocolor(255, 255, 255, 217), false) dxDrawImage(screenW * 0.3287, screenH * 0.5573, screenW * 0.0191, screenH * 0.0339, "", 0, 0, 0, tocolor(255, 255, 255, 217), false) dxDrawImage(screenW * 0.3257, screenH * 0.6458, screenW * 0.0265, screenH * 0.0430, "", 0, 0, 0, tocolor(254, 254, 254, 205), false) dxDrawImage(screenW * 0.3287, screenH * 0.4661, screenW * 0.0191, screenH * 0.0352, "", 0, 0, 0, tocolor(255, 255, 255, 217), false) dxDrawImage(screenW * 0.3287, screenH * 0.5143, screenW * 0.0191, screenH * 0.0352, "", 0, 0, 0, tocolor(255, 255, 255, 217), false) dxDrawImage(screenW * 0.3287, screenH * 0.6042, screenW * 0.0191, screenH * 0.0339, "", 0, 0, 0, tocolor(255, 255, 255, 217), false) -- ################# TEXTOS ################# dxDrawText("Bar Passa Tempo - MENU", screenW * 0.4280, screenH * 0.3600, screenW * 0.4324, screenH * 0.3984, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("X", screenW * 0.6500, screenH * 0.3555, screenW * 0.7610, screenH * 0.3984, tocolor(255, 255, 255, 202), 1.30, "default-bold", "left", "top", false, false, false, true, false) dxDrawText("Catuaba", screenW * 0.3522, screenH * 0.4232, screenW * 0.4632, screenH * 0.4661, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("Vodca", screenW * 0.3522, screenH * 0.4714, screenW * 0.4632, screenH * 0.5143, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("Cerveja", screenW * 0.3522, screenH * 0.5183, screenW * 0.4632, screenH * 0.5573, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("#FF0000R$ #FFFFFF200", screenW * 0.6044, screenH * 0.4245, screenW * 0.7154, screenH * 0.4674, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("#FF0000R$ #FFFFFF150", screenW * 0.6044, screenH * 0.4674, screenW * 0.7154, screenH * 0.5104, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("#FF0000R$ #FFFFFF100", screenW * 0.6044, screenH * 0.5182, screenW * 0.7154, screenH * 0.5612, tocolor(255, 255, 255, 202), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("Selecione uma bebida abaixo:", screenW * 0.4350, screenH * 0.3898, screenW * 0.4324, screenH * 0.7487, tocolor(255, 255, 255, 202), 0.8, dxfont0_fonte, "left", "top", false, false, false, true, false) end function render() local screenx, screeny, worldx, worldy, worldz = getCursorPosition() local px, py, pz = getCameraMatrix() local hit, x, y, z, elementHit = processLineOfSight ( px, py, pz, worldx, worldy, worldz ) local tx, ty, tz = getElementPosition(localPlayer) local rx, ry, rz = getElementPosition(ped) local distancia = getDistanceBetweenPoints3D(tx, ty, tz, rx, ry, rz) if not isEventHandlerAdded("onClientRender", root, drawDrink) then if (distancia < 5) then if hit then if elementHit == ped then addEventHandler("onClientRender", root, drawDrinks) showCursor(true) showChat(false) setElementData(localPlayer, "showBlur", true) end if elementHit == ped2 then addEventHandler("onClientRender", root, drawDrinks) showCursor(true) showChat(false) setElementData(localPlayer, "showBlur", true) end if elementHit == ped3 then addEventHandler("onClientRender", root, drawDrinks) showCursor(true) showChat(false) setElementData(localPlayer, "showBlur", true) end if elementHit == ped4 then addEventHandler("onClientRender", root, drawDrinks) showCursor(true) showChat(false) setElementData(localPlayer, "showBlur", true) end end end end end addEventHandler("onClientClick", root, render) local rootElement = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() local maxrange = 9 function Nametag() local pedX, pedY, pedZ = getElementPosition(ped) local sx, sy = getScreenFromWorldPosition (pedX,pedY,pedZ +1) local cameraX, cameraY, cameraZ = getCameraMatrix() if sx then if getDistanceBetweenPoints3D(cameraX,cameraY,cameraZ,pedX,pedY,pedZ) <= maxrange then if not getElementData(localPlayer, "showBlur") then dxDrawRectangle(sx - x*110,sy + y*57, screenW * 0.2514, screenH * 0.0630, tocolor(0, 0, 0, 165), false) dxDrawText("Garçom - Bebidas e Diversão;",sx - 25 ,sy + 60,screenWidth, screenHeight,tocolor ( 255, 255, 255, 230 ), 0.9,dxfont0_fonte) dxDrawText('Pressione #FF0000"M" #FFFFFFe clique no garçom para abrir o menu!',sx - 100,sy + 80,screenWidth, screenHeight,tocolor ( 255, 255, 255, 230 ), 0.8,dxfont0_fonte, "left", "top", false, false, false, true, false) end end end end addEventHandler("onClientRender",rootElement, Nametag) function closePanel(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.6426, screenH * 0.3490, screenW * 0.0221, screenH * 0.0417) then showCursor(false) showChat(true) playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, drawDrinks) setElementData(localPlayer, "showBlur", false) end end end end addEventHandler("onClientClick", root, closePanel) function Catuaba(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3257, screenH * 0.4115, screenW * 0.3272, screenH * 0.0469) then setBlur(false) elseif (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 200) else playSound("sfx/hit.mp3", false) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) removeEventHandler("onClientRender", root, drawDrinks) showCursor(false) end end end end addEventHandler("onClientClick", root, Catuaba) function Vodca(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3257, screenH * 0.4583, screenW * 0.3272, screenH * 0.0469) then setBlur(false) elseif (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 150) else playSound("sfx/hit.mp3", false) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) removeEventHandler("onClientRender", root, drawDrinks) showCursor(false) end end end end addEventHandler("onClientClick", root, Vodca) function Cerveja(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3257, screenH * 0.5052, screenW * 0.3272, screenH * 0.0469) then setBlur(false) elseif (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 100) else playSound("sfx/hit.mp3", false) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) removeEventHandler("onClientRender", root, drawDrinks) showCursor(false) end end end end addEventHandler("onClientClick", root, Cerveja) function currentEffectDrinks() ---------------------------------------------------------- timerControlDrinks = setTimer(function() setPedControlState(localPlayer, "walk", true) end, 100, 0) setWindVelocity(100, 100, 0) setCameraShakeLevel(255) ---------------------------------------------------------- timerExpireDrinks = setTimer(function() ---------------------------------------------------------- resetWindVelocity() setCameraShakeLevel(1) if isTimer(timerControlDrinks) then killTimer(timerControlDrinks) end setPedControlState(localPlayer, "walk", false) outputChatBox("O efeito da bebida acabou.", 0, 255, 0) triggerServerEvent("resetWalkingStyle",resourceRoot) ---------------------------------------------------------- end, math.random(40000, 60000), 1) end addEvent("client:currentEffectDrinks", true) addEventHandler("client:currentEffectDrinks", resourceRoot, currentEffectDrinks) function isCursorOnElement( posX, posY, width, height ) if isCursorShowing( ) then local mouseX, mouseY = getCursorPosition( ) local clientW, clientH = guiGetScreenSize( ) local mouseX, mouseY = mouseX * clientW, mouseY * clientH if ( mouseX > posX and mouseX < ( posX + width ) and mouseY > posY and mouseY < ( posY + height ) ) then return true end end return false end s.lua local markersBarPositions = { {2348.547, -1372.678, 24.398, 501.900, -67.600, 999.700, 11, 1}, -- 1 {1000.592, -919.914, 42.328, 501.900, -67.600, 999.700, 11, 2}, -- 2 {2369.240, 1984.234, 10.820, 501.900, -67.600, 999.700, 11, 3}, -- 3 {-2432.25, -183.043, 35.312, 501.900, -67.600, 999.700, 11, 4}, -- 4 } local markersBarEnter = {} local markersBarExit = {} for i=1, #markersBarPositions do local xEnter, yEnter, zEnter, xExit, yExit, zExit, intEnter, dimEnter = unpack(markersBarPositions[i]) markersBarEnter[i] = createMarker(xEnter, yEnter, zEnter+1, "arrow", 1.5, 0, 16, 102, 231) local blip = createBlip(xEnter, yEnter, zEnter, 49) setBlipVisibleDistance(blip, 300) markersBarExit[i] = createMarker(xExit, yExit, zExit+0.1, "arrow", 1.5, 255, 0, 0, 255) setElementInterior(markersBarExit[i], intEnter, xExit, yExit, zExit-1) setElementDimension(markersBarExit[i], dimEnter) function enterBarBV:~(hitElement, matchingDimension) if (getElementType(hitElement) == "player") and (matchingDimension) then local vehicle = getPedOccupiedVehicle(hitElement) local playerAccount = getPlayerAccount(hitElement) if (not vehicle) then if (playerAccount) then if (not isGuestAccount(playerAccount)) then setElementInterior(hitElement, intEnter, xExit, yExit-2, zExit) setElementDimension(hitElement, dimEnter) setElementPosition(hitElement, xExit, yExit-2, zExit) setElementRotation(hitElement, 0, 0, 180) end end end end end addEventHandler("onMarkerHit", markersBarEnter[i], enterBarBV:~) function exitBarBV:~(hitElement, matchingDimension) if (getElementType(hitElement) == "player") and (matchingDimension) then setElementInterior(hitElement, 0, xEnter, yEnter-5, zEnter) setElementDimension(hitElement, 0) setElementPosition(hitElement, xEnter, yEnter-5, zEnter) end end addEventHandler("onMarkerHit", markersBarExit[i], exitBarBV:~) end function onPlayerBuyDrinkBVS(price) local money = getPlayerMoney(client) if (money >= price) then takePlayerMoney(client, price) local atualHealth = getElementHealth(client) setElementHealth(client, atualHealth + 20) playSound("sfx/hit.mp3", false) ----------------------------------------------------- setPedWalkingStyle(client, 126) triggerClientEvent(client, "client:currentEffectDrinks", resourceRoot) ----------------------------------------------------- outputChatBox("Drink comprado com sucesso.", client, 16, 102, 231) else playSound("sfx/hit.mp3", false) outputChatBox("Você não possui dinheiro suficiente.", client, 255, 0, 0) end end addEvent("server:onPlayerBuyDrinkBVS", true) addEventHandler("server:onPlayerBuyDrinkBVS", resourceRoot, onPlayerBuyDrinkBVS) function resetWalkingStyle() setPedWalkingStyle(client, 0) end addEvent("resetWalkingStyle", true) addEventHandler("resetWalkingStyle", resourceRoot, resetWalkingStyle)
  16. Queria que quando o player coilidisse com o ultimo marker do objetivo, setasse um frozen nele junto da setTimer do fim3, para que eles não buguem e dupliquem ou tripliquem o givePlayerMoney, se poderem me dar umas explicações como sempre ksks destinos = { [1] = {1905.856, -1117.615, 25.664}, -- table com todos os destinos em ordem. [2] = {1496.891, -691.943, 94.75}, [3] = {1684.788, -2101.417, 13.834} } local Minicio3 = createMarker (2104.386, -1806.494, 12.6, "cylinder", 1, 16, 102, 231, 50) -- Cria o marker onde o player deve usar o comando. local veh = {} -- Cada elemento específico de cada jogador deve estar em uma table para ser criado e acessado corretamente. local Mfim3 = {} -- Marker final específico do player. local Bfim3 = {} -- Blip do marker final específico do player. local sourceAccount = getPlayerAccount ( source ) function inicio3 (source) if source and getElementType (source) == "player" and not getPedOccupiedVehicle (source) then -- Quando o jogador colide no marker e está sem veículo, então: outputChatBox ("#1066E7──────────────── Trabalho BvP™ ────────────────",source,255,255,255,true) -- Avisa pra ele usar o comando /trampo4 para começar o emprego. outputChatBox ("#FF0000Trabalho de Entregador de Pizzas #FFFFFF→ Neste trabalho você terá que entregar as Pizzas até aos destinos no radar. Sua recompensa é de R$2000.",source,255,255,255,true) outputChatBox (" ",source,255,255,255,true) outputChatBox ("* Digite #FF0000/emprego3 #FFFFFFpara aceitar o trabalho.",source,255,255,255,true) outputChatBox ("#1066E7───────────────────────────────────────────",source,255,255,255,true) end end addEventHandler ("onMarkerHit", Minicio3, inicio3) function startJob3 (thePlayer, cmd) if isElementWithinMarker (thePlayer, Minicio3) and not getPedOccupiedVehicle (thePlayer) then -- Ao usar o comando, só funciona se o jogador estiver no marker e estiver sem veículo. if veh[thePlayer] and isElement (veh[thePlayer]) then -- Se por acaso existir o veículo do trampo do jogador, destroi ele. destroyElement (veh[thePlayer]) veh[thePlayer] = nil end veh[thePlayer] = createVehicle (468, 2095.678, -1796.701, 13.383) -- Cria o veículo do trampo. local x, y, z = unpack (destinos[1]) -- x, y, z recebem as coordenadas do destinos[1]. Mfim3[thePlayer] = createMarker (x, y, z, "cylinder", 2, 0, 255, 0, 255, thePlayer) -- Cria o marker do objetivo do jogador na coordenada 1. setElementData (Mfim3[thePlayer], "owner", thePlayer) -- Seta esse jogador como dono do marker, para que só funcione com ele. setElementData (Mfim3[thePlayer], "trip", 1) -- Seta uma data no marker pra saber a qual coordenada ele pertence. Bfim3[thePlayer] = createBlipAttachedTo (Mfim3[thePlayer], 19) -- Cria o blip e anexa ao marker. warpPedIntoVehicle (thePlayer, veh[thePlayer]) -- Teleporta o player para o veículo do trampo. setPedSkin ( thePlayer, 20 ) dxMsg(thePlayer, "Leve as Pizzas ate a bandeira no radar! (1/"..#destinos..")!", "info") -- Avisa o player o que ele tem que fazer agora. addEventHandler ("onMarkerHit", Mfim3[thePlayer], fim3) -- Adiciona o evento que faz funcionar o marker do objetivo. end end addCommandHandler ("emprego3", startJob3) function fim3 (hitElement) if (hitElement == getElementData (source, "owner")) then -- Se o elemento que colidiu for o dono do marker, então: if veh[hitElement] and isElement(veh[hitElement]) then -- Se existe o veículo do trampo do jogador, então: if (getElementData (source, "trip") < #destinos) then -- Se a data do marker é menor que a quantidade de destinos, então: (indicando que não é a última viagem) local x, y, z = unpack (destinos[getElementData (source, "trip") + 1]) -- x, y, z recebem a próxima coordenada da table destinos. setElementPosition (source, x, y, z) -- Coloca o marker de objetivo nessa nova coordenada. setElementData (source, "trip", getElementData (source, "trip") + 1) -- Seta a nova viagem nesse marker. dxMsg(hitElement, "Você entregou as Pizzas no destino. Siga para o próximo. ("..getElementData (source, "trip").."/"..#destinos..")", "info") -- Avisa o jogador quantas viagens ele fez e quantas são no total, pra ele não pensar que está trabalhando de graça. else -- Se o marker de objetivo colidido não tem data menor que a quantidade de viagens, então: (indicando que esse é o último objetivo) dxMsg(hitElement, "Recebendo Pagamento...", "info") setTimer(function(hitElement) removeEventHandler ("onMarkerHit", Mfim3[hitElement], fim3) -- Remove o evento que ativa este marker, pois ele não será mais usado. destroyElement (veh[hitElement]) -- Destroi o veículo do trampo do jogador. givePlayerMoney (hitElement, 2000) -- Dá o dinheiro do trampo. if isElement(Bfim3[hitElement]) then destroyElement (Bfim3[hitElement]) end -- Destroi o blip anexado ao marker de objetivo. Bfim3[hitElement] = nil if isElement(Mfim3[hitElement]) then destroyElement (Mfim3[hitElement]) end -- Destroi o marker de objetivo. Mfim3[hitElement] = nil dxMsg(hitElement, "Pagamento recebido (R$ 2000)!", "sucess") -- Avisa o jogador que ele completou o trampo. end, 5000, 1,hitElement) end end end end function sair3 (thePlayer) if (veh[thePlayer]) and isElement(veh[thePlayer]) then -- Se o veículo do trampo existe, então: removeEventHandler ("onMarkerHit", Mfim3[thePlayer], fim3) -- Remove o evento que ativa o marker de objetivo. destroyElement (veh[thePlayer]) -- Destroi o veículo do trampo. destroyElement (Bfim3[thePlayer]) -- Destroi o blip de objetivo do trampo. Bfim3[thePlayer] = nil destroyElement (Mfim3[thePlayer]) -- Destroi o marker de objetivo do trampo. Mfim3[thePlayer] = nil dxMsg(thePlayer, "Você abandonou a moto e perdeu o trabalho seu bastardo!", "error") -- Avisa o jogador que ele falhou no trampo. end end addEventHandler ("onVehicleExit", getRootElement(), sair3) -- Executa essa função quando o player sair de um veículo qualquer. function quit3 () if isElement(Bfim3[source]) then destroyElement (Bfim3[source]) end if isElement(Mfim3[source]) then destroyElement (Mfim3[source]) end if isElement(veh[source]) then destroyElement(veh[source]) end Bfim3[source] = nil Mfim3[source] = nil veh[source] = nil end addEventHandler("onPlayerQuit", getRootElement(), quit3) function kill3 () if isElement(Bfim3[source]) then destroyElement (Bfim3[source]) end if isElement(Mfim3[source]) then destroyElement (Mfim3[source]) dxMsg(source, "Você se matou e perdeu o trabalho seu imbecil!", "error") end if isElement(veh[source]) then destroyElement(veh[source]) end Bfim3[source] = nil Mfim3[source] = nil veh[source] = nil end addEventHandler("onPlayerWasted", getRootElement(), kill3) function logout3 () if isElement(Bfim3[source]) then destroyElement (Bfim3[source]) end if isElement(Mfim3[source]) then destroyElement (Mfim3[source]) end if isElement(veh[source]) then destroyElement(veh[source]) end Bfim3[source] = nil Mfim3[source] = nil veh[source] = nil end addEventHandler("onPlayerLogout", getRootElement(), logout) function dxMsg(source, text, type) exports.dxmessages:outputDx(source, text, type) end
  17. Client.lua: function processLockUnlock(vehicle) if vehicle then local vehicleID = tonumber(getElementData(vehicle, "veh:id")) or -1 local vehFaction = tonumber(getElementData(vehicle, "veh:faction")) or 0 local vehOwner = tonumber(getElementData(vehicle, "veh:owner")) or -1 local vehJobID = tonumber(getElementData(vehicle, "veh:jobvehID")) or -1 local locked = isVehicleLocked(vehicle) local vehID = getElementModel(vehicle) local vehName = getVehicleRealName(vehID) if isPedInVehicle(localPlayer) then playSounds("lockin") else playSounds("lockout") end if locked then triggerServerEvent("vehicleLock", localPlayer,localPlayer, vehicle, false) else triggerServerEvent("vehicleLock", localPlayer,localPlayer, vehicle, true) end else outputChatBox("#FFFFFF Nincs kulcsod ehhez a járműhöz.", 169,139,101, true) end end local klikkTimer = false function setVehicleLockState() if klikkTimer then return end if isTimer(klikkTimerRun) then return end klikkTimer = true klikkTimerRun = setTimer(function() klikkTimer = false end,1000,1) local vehicle = getPedOccupiedVehicle ( localPlayer ) if vehicle then processLockUnlock(vehicle) else local int2 = getElementInterior(localPlayer) local dim2 = getElementDimension(localPlayer) local mx,my,mz = getElementPosition(localPlayer) local interior = getElementData(localPlayer, "interior") or false if not interior then for k,v in ipairs(getElementsByType("vehicle")) do local x,y,z = getElementPosition(v) local int = getElementInterior(v) local dim = getElementDimension(v) local dist = getDistanceBetweenPoints3D(x,y,z,mx,my,mz) if dist <= 3 and int2 == int and dim2 == dim then processLockUnlock(v) return end end end end end bindKey("k", "down", setVehicleLockState) setTimer(function() if not bindKey("k", "down", setVehicleLockState) then bindKey("k", "down", setVehicleLockState) end end, 1000, 0) Server.lua: addEvent("vehicleLock",true) addEventHandler("vehicleLock",getRootElement(),function(player,veh,value) setVehicleLocked(veh, value) veh:setData("veh:status", value) end) No errors / warnings in debugscript... if i press the [K] button, nothing happens... what wrong in this code? how to fix?
  18. nurfaizfy19

    Load Browser In Game

    Hello MTA, sorry if my English is bad I'm looking for a way to load a website in the game, for example a website that I have forums.javaliferoleplay.web.id I have a code like this function register_panel( ) local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 1280, 720 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 local window = guiCreateWindow( left, top, windowWidth, windowHeight , "Register", false ) local browser = guiCreateBrowser( 0, 28, windowWidth, windowHeight -60, false, false, false, window ) local theBrowser = guiGetBrowser( browser ) guiWindowSetSizable(window, false) requestBrowserDomains({ "forums.javaliferoleplay.web.id" }) addEventHandler( "onClientBrowserCreated", theBrowser, function( ) loadBrowserURL( source, "http://forums.javaliferoleplay.web.id/" ) end ) local close = guiCreateButton(0, 700, 1280, 50, "CLOSE", false, window) addEventHandler ( "onClientGUIClick", close, function() guiSetVisible(window, false) end ) end In the code above, the website I intended to load does not appear, but there is a dialog box asking for permission to open the link. But when opening youtube for example, the website opens normally. Can someone help me? Thanks before
  19. here's a video about the bug..: How to fix this bug? I tried many things, but unsuccessfully.. :s Here the code: Client.lua: local sX, sY = guiGetScreenSize() setElementData(localPlayer,"name",nil) GUIEditor = { button = {}, edit = {} } GUIEditor.button[1] = guiCreateButton(0.72, 0.74, 0.03, 0.04, ">", true) kuldottpmek = {} fogadottpmek = {} GUIEditor.edit[1] = guiCreateEdit(0.38, 0.74, 0.34, 0.04, ".", true) guiEditSetMaxLength(GUIEditor.edit[1], 150) local dxfont0_gothic = dxCreateFont(":mta_wintertime/gothic.ttf", 14) local screenW, screenH = guiGetScreenSize() local players = getElementsByType ( "player" ) addEventHandler("onClientRender", root, function() local players = getElementsByType ( "player" ) local elem = 0 local fpm = 0 local kpm = 0 local uzenet = guiGetText(GUIEditor.edit[1]) dxDrawRectangle(screenW * 0.3722, screenH * 0.2722, screenW * 0.3833, screenH * 0.5100, tocolor(0, 0, 0, 162), false) dxDrawRectangle(screenW * 0.1757, screenH * 0.2722, screenW * 0.1896, screenH * 0.5100, tocolor(0, 0, 0, 162), false) dxDrawText("Játékoslista", screenW * 0.1764, screenH * 0.2722, screenW * 0.3653, screenH * 0.3167, tocolor(255, 255, 255, 255), 1.00, dxfont0_gothic, "center", "center", false, false, false, false, false) for id,player in ipairs(players) do local plname = getPlayerName(player) elem = elem + 1 dxDrawText(plname, screenW * 0.1764, screenH * 0.2500+(elem*70), screenW * 0.3653, screenH * 0.3578, tocolor(255, 255, 255, 255), 0.65, dxfont0_gothic, "left", "center", false, false, true, true, false) dxDrawRectangle(screenW * 0.1764, screenH * 0.2850+(elem*35), screenW * 0.1889, screenH * 0.0367, tocolor(0, 0, 0, 162), false) end dxDrawText(getElementData(localPlayer,"name") or "Válassz játékost", screenW * 0.3722, screenH * 0.2722, screenW * 0.7556, screenH * 0.3167, tocolor(255, 255, 255, 255), 1.00, dxfont0_gothic, "center", "center", false, false, false, true, false) dxDrawText(getElementData(localPlayer,"name") and "Elérhető most" or "", screenW * 0.5278, screenH * 0.3056, screenW * 0.6014, screenH * 0.3411, tocolor(255, 255, 255, 255), 0.65, dxfont0_gothic, "center", "center", false, false, false, true, false) dxDrawRectangle(screenW * 0.3722, screenH * 0.3467, screenW * 0.3833, screenH * 0.3844, tocolor(0, 0, 0, 162), false) for k,v in ipairs(kuldottpmek) do kpm = kpm + 1 dxDrawRectangle(screenW * 0.3722, screenH * 0.2775+(kpm*62), screenW * 0.3833, screenH * 0.0633, tocolor(94, 192, 254, 162), false) dxDrawText("Te:", screenW * 0.3729, screenH * 0.1430+(kpm*124), screenW * 0.7556, screenH * 0.4367, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "center", false, false, false, true, false) dxDrawText(v, screenW * 0.3729, screenH * 0.3050+(kpm*62), screenW * 0.7556, screenH * 0.4733, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, true, true, false, false) for k,v in ipairs(fogadottpmek) do kpm = kpm + 1 dxDrawRectangle(screenW * 0.3722, screenH * 0.2775+(kpm*62), screenW * 0.3833, screenH * 0.0633, tocolor(255, 255, 254, 162), false) dxDrawText(getElementData(localPlayer,"name")..":", screenW * 0.3729, screenH * 0.1430+(kpm*124), screenW * 0.7556, screenH * 0.4367, tocolor(110, 110,111, 200), 1.00, "default-bold", "left", "center", false, false, false, true, false) dxDrawText(v, screenW * 0.3729, screenH * 0.3050+(kpm*62), screenW * 0.7556, screenH * 0.4733, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, true, true, false, false) end end end ) function onClientClick(button, state) local elem = 0 if button == "left" and state == "down" then for k, v in ipairs(players) do local plname = getPlayerName(v) elem = elem+1 if isInBox(screenW * 0.1764, screenH * 0.2850+(elem*35), screenW * 0.1889, screenH * 0.0367) then if plname == getPlayerName(localPlayer) then return end setElementData(localPlayer,"name",plname) kuldottpmek = {} fogadottpmek = {} end end end end addEventHandler("onClientClick", root, onClientClick) function isInBox(xS,yS,wS,hS) if(isCursorShowing()) then local cursorX, cursorY = getCursorPosition() cursorX, cursorY = cursorX*sX, cursorY*sY if(cursorX >= xS and cursorX <= xS+wS and cursorY >= yS and cursorY <= yS+hS) then return true else return false end end end function trig1() if getElementData(localPlayer,"name") == nil then return end local nev =getElementData(localPlayer,"name") or "" local targetPlayer = getPlayerFromName ( nev ) if targetPlayer then local uzenet = guiGetText(GUIEditor.edit[1]) table.insert(kuldottpmek,uzenet) end end addEvent("uzenet",true) addEventHandler("uzenet",root,trig1) function trig2() if getElementData(localPlayer,"name") == nil then return end local nev =getElementData(localPlayer,"name") or "" local targetPlayer = getPlayerFromName ( nev ) if targetPlayer then local uzenet = guiGetText(GUIEditor.edit[1]) table.insert(fogadottpmek,uzenet) end end addEvent("uzenet2",true) addEventHandler("uzenet2",root,trig2) function test() if getElementData(localPlayer,"name") == nil then return end local uzenet = guiGetText(GUIEditor.edit[1]) triggerServerEvent("pmuzenet",localPlayer,getLocalPlayer(),uzenet) end addEventHandler("onClientGUIClick",GUIEditor.button[1],test,false) Server.lua: function privateMessage(thePlayer) local sendToName = getElementData(thePlayer,"name") local toPlayer = getPlayerFromParticalName (sendToName) triggerClientEvent(thePlayer,"uzenet",toPlayer) triggerClientEvent(toPlayer,"uzenet2",thePlayer) setElementData(toPlayer,"fogadott",true) setElementData(thePlayer,"fogadott",false) end addEvent("pmuzenet",true) addEventHandler("pmuzenet",root,privateMessage) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end
  20. Hello to everyone. My name is Jahseh, i need a developer for my MTA french roleplay server. I can speak french and english. The goal is to make me some "job script" or anything else do make it more original than others servers or repair some script than doesn't work well. You will send the script to me or showing me your experiences on scripting and you will get paid. It depends on what you gonna do on my server, we will talk about money together. If you are interested email me : Kayziopro@gmail.com Or just come on my teamspeak : horizonroleplay.ts3serv.com I don't have many experiences on scripting, i can just modify a little bit but i already got a gamemode translated in french and fully playable ! Thanks a lot ! See you soon 😉
  21. I want create a dx private message system, like the fb messenger.. But how to make it possible? Or where can i download a script like this? sorry for my bad english..
  22. function asdasdsas() playSound("http://www.convertmp3.io/fetch/?video=https://www.youtube.com/watch?v=iq7q82Cd6RI") end addCommandHandler("test",asdasdsas) what wrong? the API working fine, but the playSound not.. how to fix?
  23. Vazern

    [HELP] Weapon Fire Shader

    Hello guys! I started with shaders today, I made a script to apply a texture to the weapons fire, but it is not working, nor does it give any error in the debug. Client-side shader = dxCreateShader("shader/shader.fx") fire_fx = dxCreateTexture("files/fire.png") function replaceFireFX() engineApplyShaderToWorldTexture(shader, "muzzle_texture4") dxSetShaderValue(shader, "gTexture", fire_fx) end addEventHandler("onClientResourceStart", resourceRoot, replaceFireFX) addEventHandler("onClientPlayerJoin", root, replaceFireFX) FX-Code texture gTexture; technique TexReplace { pass P0 { Texture[0] = gTexture; } } fire.png
  24. DeadthStrock

    Immortal Peds 0_0

    Hello ! I have a probblem. Everytime when I creating a ped in the server using 'createPed' function, the ped that creating can't be killed [ immortal ]. I don't like that way. The ped should be able to killed. Did you know to fix this ? createPed(0, 0, 0, 5)
  25. Quando o player chegar no marker, ao invez de pegar o trabalho de uma vez, ele ter q digitar o comando do addCommandHandler Obs: A Mensagem de quando ele passa em cima do marker mandando o player digitar o tal comando eu ja sei fazer.. mas tentei de varias formas adicionar o addCommandHandler e fracassei! Eu tambem queria saber, como faço pro marker do "Mfim4" sumir após o player completar o trabalho! O Marker do Mfim4 fica no lugar, mesmo sem a pessoa estar no trabalho e ele nao sai server.lua local Minicio4 = createMarker (1038.02332, -1337.93970, 12.8, "cylinder", 1, 16, 102, 231, 100) local Mfim4 = createMarker ( 2801.29663, -1088.36243, 30.72142 -1, "cylinder", 2, 0 ,255 ,0, 255 ) local Bfim4 = createBlipAttachedTo ( Mfim4, 19 ) setElementVisibleTo ( Bfim4, root, false ) veh = {} function incio4 (source) if isElementWithinMarker(source, Minicio4) then if veh[source] and isElement( veh[source] ) then destroyElement ( veh[source] ) veh[source] = nil end x,y,z = getElementPosition(source) Trabalho = true veh[source] = createVehicle(498,1009.50598, -1355.16431, 13.34428) setElementVisibleTo ( Bfim4, source, true ) warpPedIntoVehicle ( source, veh[source] ) dxMsg(source, "Leve as rosquinhas ate a bandeira no radar!", "info") end end addEventHandler( "onMarkerHit", Minicio4, incio4 ) function fim4 (source) if veh[source] and isElement(veh[source]) then destroyElement (veh[source]) givePlayerMoney(source,2500) -------------- Caso queira mudar o dinheiro que o player vai ganhar ao finalizar o trabalho setElementVisibleTo ( Bfim4, source, false ) setElementVisibleTo ( entregafinalizar, source, false ) dxMsg(source, "Você entregou as rosquinhas a fabrica e ganhou R$2500!", "sucess") else end end addEventHandler("onMarkerHit",Mfim4 ,fim4) function sair4 (source) if (veh[source]) and isElement(veh[source]) then setElementVisibleTo ( Bfim4, source, false ) destroyElement (veh[source]) dxMsg(source, "Você saiu do veiculo e perdeu o trabalho!", "error") else end end addEventHandler ( "onVehicleExit", getRootElement(), sair4 ) function dxMsg(source, text, type) exports.dxmessages:outputDx(source, text, type) end O Client eu fiz um script text que fica esrito em cima do marker o nome do trabalho mas isso nao tem nada haver ent n colocarei!