Jump to content

Neproify

Members
  • Posts

    29
  • Joined

  • Last visited

Everything posted by Neproify

  1. Check if your DXSDK_DIR environment variable is pointing to 2010 version. I had this problem too.
  2. Hello. I created GuiBrowser for my login. It works good, but i have small problem with it. It doesn't take mouse and keyboard input from player. I need to restart resource(auth in my case), and then it takes input again. Can anyone help me? local loginWindow = nil local screenWidth, screenHeight = guiGetScreenSize() addEventHandler("onClientResourceStart", resourceRoot, function() setDevelopmentMode(true, true) setPlayerHudComponentVisible("all", false) loginWindow = GuiBrowser(screenWidth / 2 - 150, screenHeight / 2 - 150, 300, 300, true, true, false) addEventHandler("onClientBrowserCreated", loginWindow, function() loginWindow:getBrowser():toggleDevTools(true) loginWindow:getBrowser():loadURL("http://mta/local/login.html") showCursor(true) guiSetInputEnabled(true) end) end)
  3. Hello, I want to disable vehicle damage from player fists. I do this like that: addEventHandler("onClientVehicleDamage", root, function(attacker, weapon, loss, x, y, z, tyre) if weapon == 0 then cancelEvent() source:setDamageProof(true) setTimer(function(source) source:setDamageProof(false) end, 200, 1, source) end end) But it don't work. The health of vehicle is okay, but panels and doors are damaged. Can anyone help me?
  4. First - you need screen app: apt-get install screen Next you need to go to your server home(where you have mta-server or mta-server64). Then type: screen -S mtaserver ./mta-server or screen -S mtaserver ./mta-server64 "mtaserver" is screen name, you can type anything you want(for example mtadm). It will start screen with mta server. You can type commands in console, etc. When you want to close console(but not server!) just click ctrl+a+d on your keyboard. This shortcut deattach you from screen. If you want to return to server console type: screen -x mtaserver Again - "mtaserver" is name of your screen. If you want to stop server just go to console and type "shutdown".
  5. Thank you for help, but error still occurs. I tried update, upgrade and dist-upgrade. @edit I used strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX And i've got this versions: GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_3.4.17 GLIBCXX_DEBUG_MESSAGE_LENGTH Maybe I need dev version of gcc? @edit2 I installed gcc-4.8 and now this error occurs: [09:23:20] MODULE: Unable to load mods/deathmatch/modules/ml_bcrypt_32.so (/home /neproify/mtasa/mods/deathmatch/modules/ml_bcrypt_32.so: undefined symbol: _strd up) It looks it's problem with code. I changed 245 line from this file: https://github.com/pzduniak/ml_bcrypt/b ... /wrapper.c from _strdup to strdup and it compiles and run fine.
  6. Hello, I installed bcrypt module(https://github.com/pzduniak/ml_bcrypt). My vps is running debian 7.0 64bit. Logs: [06:46:13] MODULE: Unable to load mods/deathmatch/modules/ml_bcrypt_32.so (/usr/ lib/i386-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /home/neproify/mtasa/mods/deathmatch/modules/ml_bcrypt_32.so)) This occur on both 32 and 64 bit servers.
  7. Okay, thank you. It works. To anyone who have this problem: Download bootstrap(and jquery) files, then paste them on server, add them in meta.xml. Use it in html with path like this: [url=mtalocal://bootstrap/bootstrap.min.js]mtalocal://bootstrap/bootstrap.min.js[/url]
  8. In CEF presentation video, Jusonex used bootstrap in CEF for creating login GUI. In normal browser that works.
  9. Hello, i'm trying to use bootstrap in my script, so I created this lua code: setDevelopmentMode(true, true) local screenWidth, screenHeight = guiGetScreenSize() local loginGui = GuiBrowser(screenWidth / 2 - 225, screenHeight / 2 - 210, 450, 420, true, false, false) local loginBrowser = loginGui:getBrowser() addEventHandler("onClientBrowserCreated", loginBrowser, function() loginBrowser:loadURL("html/login.html") showCursor(true) end) And this html code: <html> <head> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css"> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> </head> <body> <h1>Hello, world!</h1> <button class="btn btn-primary">Test</button> </body> </html> And it looks like that: http://prntscr.com/7dcuor So, bootstrap don't load. Anyone got this problem?
  10. Hello, I'm trying to rewrite my resources to OOP. This code: addCommandHandler("aduty", function(player) local globalInfo = player:getData("globalInfo") globalInfo.name = string.gsub(globalInfo.name, " ", "_") globalInfo.name = string.gsub(globalInfo.name, "ś", "s") globalInfo.name = string.gsub(globalInfo.name, "ć", "c") local charInfo = player:getData("charInfo") local accountName = player.account:getName() --if isObjectInACLGroup("user."..accountName, aclGetGroup("Admin")) then if ACLGroup.get("Admin"):doesContainObject("user."..player.account:getName()) then if not player:getData("adminduty") then player:setName(globalInfo.name) player:setData("adminduty", true) else player:setName(charInfo.name) player:setData("adminduty", false) end --elseif isObjectInACLGroup("user."..accountName, aclGetGroup("Support")) then elseif ACLGroup.get("Support"):doesContainObject("user."..player.account:getName()) then if not player:getData("supportduty") then player:setName(globalInfo.name) player:setData("supportduty", true) else player:setName(charInfo.name) player:setData("supportduty", false) end end end) outputing this error: admin.lua:9: attempt to call method 'doesContainObject' (a nil value) I don't know why. Can anyone help me?
  11. Neproify

    Low FPS.

    I've got this problem from last sunday. Before sunday it was okay. @edit Hmmm... It looks, there is windows 10 10130. I try to update it.
  12. Neproify

    Low FPS.

    Hello everyone. I can't find correct forum, so I've posted here. After last updates I've got 15 fps in menu. When I join the server, there is this same. I know 3 other players, who has this same problem. My PC: AMD Athlon 64 x2 2.5 GHZ Nvidia Geforce GT 430 3 GB RAM Windows 10 64 bit
  13. In IPB 3 - yes. IPB 4 use crypt function.
  14. I need that, because IPB 4 use it for password hashes, and in my script(created for IPB 3) I created account system based on forum accounts.
  15. Hello, can I encrypt password with blowfish encryption in lua?
  16. Hello. I have code like that: function Player:show(text) triggerClientEvent(self, "notifications:show", root, text) end How to export it? <export function="Player:show" type="server" /> or <export function="show" type="server" />
  17. Neproify

    Image GUI

    I have a problem. I wanna to create image gui like this: http://scr.hu/2g1e/5p5l0 I know how to show the images, itd. But i don't know how to script the text label. Anyone know that?
  18. Okay, so I must do table with colors. Thanks!
  19. Hi! I have one small question. setVehicleColor need colors in RGB format... But Vehicle Colors on wiki has number colors(for example 126 is pink). One of this "informations" must be okay. So, can I use color number?
  20. Nope. Query in phpmyadmin(I use: UPDATE `rp_characters` SET `skin`=0 AND `money`=0 WHERE `UID`=1) Is correct. It works. But in MTA this same query doesn't work... But why?
  21. Now the money variable is... Correct. I setPlayerMoney serverside, not clientside, like before. But now i have other problem. The query to database: 2014-09-24 20:11:24.861: [script] SUCCESS: Affected rows:0 [Query:UPDATE `rp_characters` SET `skin`=0 AND `money`=0 WHERE `UID`=1] Is "success", but I don't see changes in phpmyadmin...
  22. Hi! I have code like this: addEventHandler("onPlayerQuit", root, function() local charInfo = getElementData(source, "charInfo") if not charInfo then return end local money = getPlayerMoney(source) outputDebugString(money) exports.rp_db:zapytanie("UPDATE rp_characters SET skin=? AND money=? WHERE UID=?", charInfo.skin, getPlayerMoney(source), charInfo.UID) end) And the money variable is 0... When I got $500 In Game... So, what's problem?
  23. You have the code. Just edit it.
  24. Hello! Today I show you how to compile LUA files in Sublime Text 3. It's really simple. This tutorial is for Windows system. First, you must download the luac file from: https://nightly.multitheftauto.com/files/luac_mta.exe Now copy that to the mods/deathmatch directory in your mta server. Next go to C:\Users\username\AppData\Roaming\Sublime Text 3\Packages\User and create file named: mta.sublime-build When you do it, open file and paste text like that: { "cmd": ["DEL $file_base_name.luac"], "cmd": ["C:\\Program Files (x86)\\MTA San Andreas 1.4\\server\\mods\\deathmatch\\luac_mta.exe", "-o", "$file_base_name.luac", "$file_base_name.lua"], "working_dir": "${file_path}", } Just change the directory to luac_mta.exe file if it isn't default. Now, back to the Sublime Text 3, go to Tools->Build Systems and click on mta. Now when you build file, compiled file will be delete, next it will be compiled. If you wanna to change the hotkey for build system just do it: Open the .sublime-keymap based on your OS. Enter the following: [ { "keys": ["f5"], "command": "build" } ] You can change f5 to any key. And now... You can compiling LUA files in Sublime Text 3!
  25. I wanna to add one answer. If you can't find the appdata folder you can just write "%appdata%" in the directory when use windows explorer. Then you will be in the AppData/Roaming folder.
×
×
  • Create New...