Jump to content

Neproify

Members
  • Posts

    29
  • Joined

  • Last visited

Posts posted by Neproify

  1. 2 hours ago, fastman92 said:

    I'm getting these errors:

     

    
    1>------ Build started: Project: DirectX9GUIRenderer, Configuration: Debug Win32 ------
    2>------ Skipped Build: Project: breakpad, Configuration: Debug Win32 ------
    2>Project not selected to build for this solution configuration 
    3>------ Build started: Project: Client Core, Configuration: Debug Win32 ------
    1>cl : Command line warning D9025: overriding '/MTd' with '/MT'
    1>  d3d9texture.cpp
    1>e:\projects\mtasa-blue\vendor\cegui-0.4.0-custom\src\renderers\directx9guirenderer\d3d9texture.cpp(31): fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory
    3>cl : Command line warning D9025: overriding '/MTd' with '/MT'
    1>  d3d9renderer.cpp
    3>  StdInc.cpp
    3>  Compiling precompiled header.
    3>
    3>e:\projects\mtasa-blue\client\core\stdinc.h(16): fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory
    1>e:\projects\mtasa-blue\vendor\cegui-0.4.0-custom\src\renderers\directx9guirenderer\d3d9renderer.cpp(31): fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory
    1>  Generating Code...
    4>------ Build started: Project: GUI, Configuration: Debug Win32 ------
    4>cl : Command line warning D9025: overriding '/MTd' with '/MT'
    4>  StdInc.cpp
    4>  Compiling precompiled header.
    4>
    4>e:\projects\mtasa-blue\client\gui\stdinc.h(13): fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory
    ========== Build: 0 succeeded, 3 failed, 36 up-to-date, 1 skipped ==========

     

    41a637516952766.jpg 

    I have DirectX SDK installed.

    65a30d516953675.jpg 

    What should I do?

     

     

    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. 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] 
    

  7. 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?

  8. 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?

  9. 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

  10. 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" /> 
    

  11. 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...

  12. 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?

  13. 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!

    • Like 1
×
×
  • Create New...