Jump to content

Forums

    1. Multi Theft Auto: San Andreas 1.x

      1. Support for MTA:SA 1.x

        HELP! HELP! Need help? Post here.

        52.9k
        posts
      2. User Guides

        These guides are a good place to start learning how to achieve certain things within MTA in an efficient and well mannered way.

        11
        posts
      3. Open Source Contributors

        This space is for contributors to discuss the development of MTA. No user suggestions/support.

        1.2k
        posts
      4. Suggestions

        Suggestions and requests go here. Please note that actual feature requests must be filed on our GitHub.

        7.6k
        posts
      5. Ban appeals

        Use this forum to appeal your GLOBAL MTA:SA bans. Permanent bans only - appeals for timed ones (eg. 24 hours) will be refused.

        Do not use it for appealing server-specific bans as we do not have power over these specific servers.

        1.9k
        posts
    2. General MTA

      1. News

        News and updates on Multi Theft Auto.

        9.6k
        posts
      2. Media

        User-made screens and movies go here.

        4.4k
        posts
      3. Site/Forum/Discord/Mantis/Wiki related

        Share your comments & concerns about our services.

        5.3k
        posts
      4. MTA Chat

        MTA related chat that is NOT support related!

        2k
        posts
      5. 326.3k
        posts
    3. MTA Community

      1. Scripting

        All Lua scripting topics related to Multi Theft Auto.

        257.2k
        posts
      2. Maps

        Discussions for maps on various gamemodes.

        13.2k
        posts
      3. Resources

        Everything else about resources.

        28k
        posts
      4. Other Creations & GTA modding

        This section includes things such as GUI themes, forum userbars, user-created MTA logos, etc. Also contains topics which cover general GTA modding areas that can be used in MTA, such as modelling.

        2.2k
        posts
      5. Competitive gameplay

        Discussions about various MTA-related competitive gameplay events. Also gang (clan) forums.

        26.7k
        posts
      6. Servers

        Looking for a server to play on? Looking for someone to host your server? Looking for a place to discuss with other server owners? Here's where to look.

        15k
        posts
    4. Other

      1. General

        Non-MTA discussions. Anything you want.

        38k
        posts
      2. Multi Theft Auto 0.5r2

        Discussion regarding Multi Theft Auto 0.5r2 for GTAIII and Vice City.

        640
        posts
      3. Third party GTA mods

        Showcase for single player mods and requests.

        771
        posts
    5. Archive

      1. 144k
        posts
      2. Trash

        These posts have broken forum rules. They are stored here temporarily so offending users can see what they have done wrong.

        1.9k
        posts
        • Tut
    • Posts

      • Marilith
        yes, the code is in the hitmarker script: function fireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement)     if hitElement then             if getElementType(hitElement)=="player" then         screenX, screenY = getScreenFromWorldPosition(hitX, hitY, hitZ)         if not screenX then return end          if isDrawing then return end          isDrawing = true                     if (weapon == 34) then triggerServerEvent("kilLDayZPlayer", hitElement)           end          if (weapon == 34) then setElementData(localPlayer,"murders",getElementData(localPlayer,"murders")+1) end                  local sound = playSound("hitmarker-sound.wav")         setSoundVolume( sound , 1)                   addEventHandler("onClientRender", root, drawHitMarker)          if drawTimer and isTimer(drawTimer) then             killTimer(drawTimer)         end                                                                       drawTimer = setTimer(function()              isDrawing = false             removeEventHandler("onClientRender", root, drawHitMarker)          end, 500, 1)                   addEventHandler ( "onPlayerDamage", root, playerDamage_text )      end     end end--func addEventHandler("onClientPlayerWeaponFire", localPlayer, fireFunc)  
      • Citizen
        Where did you put that code ? can you show more of the script so we can see the context ? if you have the attacker available as a variable, you have to add it in your triggerServerEvent:   triggerServerEvent("kilLDayZPlayer", hitElement, attacker) -- assuming attacker is the variable that holds the player element who attacked  
      • DzinyMaster
        Serial numbers  allowing hacking identifier ID soon replace PlayerMTASA
      • Tut
        Moving this thread into the Scripting section for you - the Tutorials section is for tutorials on scripting in MTA
      • Marilith
        I made a script with killdayzplayer that triggers a server event to kill the other player whenever he is hit by a sniper as a method of removing the shot you miss and kill anyway. if (weapon == 34) then triggerServerEvent("kilLDayZPlayer", hitElement), in this case hitElement =="player" then identify the other player and it works. but with this method there is no "killer" so kill messages appear that the player was killed by unknown. I tried a few things but everything went wrong, does anyone have a solution?   https://i.imgur.com/I2dzgln.mp4  

    Twitter Feed

    ×
    ×
    • Create New...