Jump to content

Sharingan

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by Sharingan

  1. It's impossible what you're saying, because FPS is Frames per second and you can't calculate how many fps are in a frame. But, It's possible calculate how many Frames pass per second, I'm saying, FPS.
  2. Thanks man, but I've just found some resource. For some people that they has the same problem, the link is: https://community.multitheftauto.com/index.php?p= ... ls&id=2540 Mods, you can close this.
  3. Is possible to attach an object to a certain bone of the player?
  4. You didn't understand, I shot his head and there's no damage taken. If I shot him from above, he doesn't get any damage but the car gets damage. I mean when you are in a vehicle the health and the armour is not synced. By the way, when he is in that position in DB, he cannot be damaged
  5. Both bugs work on bikes. Sorry for my bad english and the video, i had no time to do it.
  6. Definitely I don't like those thick borders. I want an exact hud.
  7. Yo hice un post preguntando eso, fijate en la sección scripting.
  8. Put into the resource headshot sound (headshot.wav). Now, open meta.xml and add this after the first line. "headshot.wav" /> Open your client side script, and add this to "onClientPlayerWasted" event: function someName ( killer, weapon, bodypart ) if(killer == getLocalPlayer()) then local sound = playSound("headshot.wav") end end addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), someName ) --add an event for the local player only Headshot sound: http://www.mediafire.com/?5v9m65rpajycmae
  9. textlib? What is that? Are there some libraries for MTA?
  10. Well, you didn't understand me. I mean client-sided (it takes from your internet bandwith) but that everyone can see them.
  11. Hello guys, I'm trying to do a HUD, but i got a little problem. I don't know how to add borders in Texts. I'll show you some images: I tried to do borders putting behind another dxdrawtext: It looks like this without borders: I want something like this: Here's my simple code: dxDrawText(tostring (inclip),sWidth-414,sHeight-47,sWidth-369,sHeight-18,tocolor(127,127,127,255),1.0,"pricedown") dxDrawText(tostring (ammo2),sWidth-375,sHeight-47,sWidth-272,sHeight-12,tocolor(255,255,255,255),1.0,"pricedown") Sorry for my bad english, I'm still learning.
  12. I would like that peds can be client-side. I mean creating by client, like players. When you spawn in a zone, al least 20 peds will spawn in the zone that you are, and the peds take player's bandwith not server's, like GTA IV Multiplayer. Please, tell what do you think about this. If MTA Team would do it, MTA gonna own.
  13. I didn't know that, thanks will briggs ^^.
  14. "0" head="15" chest="10" leg="80"> The correct form is: "0" head="15" chest="10" leg="80"/> That wasn't the only problem, there were some syntax errors like: if getElementHealth(source) <= customDamageHead[weapon]) then --I put a parenthesis before "then" --correct way: if getElementHealth(source) <= customDamageChest[weapon] then
  15. Thanks but the problem was in custom.damage.xml.
  16. Hello every one, I checked semi-weapons resource and I edited it. The code doesn't work, I don't know why. The damage is different when you shoot in differents bodyparts. Here is the code: local allowedWeapons = {} local damageModified = {} local customDamageHead = {} local customDamageChest = {} local customDamageLeg = {} addEventHandler("onClientResourceStart", getRootElement(), function (startedResource) if (startedResource == getThisResource()) then local xml = xmlLoadFile("config/custom.damage.xml") for i, node in ipairs(xmlNodeGetChildren(xml)) do if (xmlNodeGetName(node) == "weapon") then table.insert(damageModified, tonumber(xmlNodeGetAttribute(node, "id")), true) table.insert(customDamageHead, tonumber(xmlNodeGetAttribute(node, "id")), tonumber(xmlNodeGetAttribute(node, "head"))) table.insert(customDamageChest, tonumber(xmlNodeGetAttribute(node, "id")), tonumber(xmlNodeGetAttribute(node, "chest"))) table.insert(customDamageLeg, tonumber(xmlNodeGetAttribute(node, "id")), tonumber(xmlNodeGetAttribute(node, "leg"))) end end end end ) addEventHandler("onClientPlayerDamage", getRootElement(), function (attacker, weapon, bodypart, loss) cancelEvent() if isElement(attacker) and getElementType(attacker) == "player" then if damageModified[weapon] == true then if bodypart == 9 then if getElementHealth(source) <= customDamageHead[weapon]) then killPed(source, attacker, weapon, bodypart) else setElementHealth(source, getElementHealth(source)-customDamageHead[weapon]) end elseif bodypart == 3 or bodypart == 4 then if getElementHealth(source) <= customDamageChest[weapon]) then killPed(source, attacker, weapon, bodypart) else setElementHealth(source, getElementHealth(source)-customDamageChest[weapon]) end else if getElementHealth(source) <= customDamageLeg[weapon]) then killPed(source, attacker, weapon, bodypart) else setElementHealth(source, getElementHealth(source)-customDamageLeg[weapon]) end end end elseif isElement(attacker) and getElementType(attacker) == "vehicle" then local damage = loss*5 if(getElementHealth(source) <= damage) then killPed(source, attacker, weapon, bodypart) else setElementHealth(source, getElementHealth(source)-damage) end else local damage = loss*3 if(getElementHealth(source) <= damage) then killPed(source, attacker, weapon, bodypart) else setElementHealth(source, getElementHealth(source)-damage) end end end ) and config/custom.damage.xml: "0" head="15" chest="10" leg="80"> "1" head="20" chest="15" leg="10"> "2" head="25" chest="20" leg="17"> "3" head="22" chest="17" leg="15"> "4" head="30" chest="25" leg="15"> "5" head="30" chest="30" leg="30"> "6" head="25" chest="25" leg="25"> "7" head="20" chest="20" leg="20"> "8" head="35" chest="35" leg="35"> "9" head="8" chest="5" leg="4"> "10" head="10" chest="10" leg="10"> "11" head="10" chest="10" leg="10"> "12" head="10" chest="10" leg="10"> "13" head="10" chest="10" leg="10"> "14" head="10" chest="10" leg="10"> "15" head="20" chest="20" leg="20"> "22" head="40" chest="20" leg="15"> "23" head="45" chest="25" leg="20"> "24" head="100" chest="40" leg="30"> "28" head="60" chest="22" leg="12"> "29" head="70" chest="30" leg="18"> "30" head="90" chest="37" leg="20"> "31" head="80" chest="33" leg="18"> "32" head="57" chest="20" leg="10"> "33" head="100" chest="40" leg="30"> "34" head="100" chest="100" leg="80"> "38" head="60" chest="20" leg="15"> "46" head="15" chest="10" leg="80">
  17. OK, Maybe I can do it with getting the muzzle flash position and bones. Sorry if I'm annoying.
  18. Hello, I'm doing a real drop weapon system. I wonder if there's a function to get the position of the weapon in the map.
  19. OK, Thank you everyone.
  20. I have a question, how do I increase the damage of weapons? If I do this, Is it right?: funcion WeaponDamage(attacker, weapon, bodypart, loss) if(weapon == 30 or weapon == 31) then setElementHealth(source, getElementHealth(source)-(loss*2)) end end addEventHandler("onPlayerDamage",getRootElement(),WeaponDamage) In this case I want to duplicate the damage of M4 and AK-47.
  21. The problem is MTA isnt too known like SA-MP. If MTA would have many and good servers, MTA owns.
×
×
  • Create New...