Jump to content

Yazir

Members
  • Posts

    101
  • Joined

  • Last visited

Everything posted by Yazir

  1. Hello! I have a problem that i couldn't solve for the past month. I am making a gamemode. On start of the round i spawn players in different dimension in air, with parachutes (given by giveWeapon). They can pick up weapons and walk around the map, but sometimes player don't see other player's (player2) weapon and even if the player2 is shooting at him, he doesn't deal any damage. What could be the issue? Please help me. I have tried many various things like manually giving weapon to a player, setting his weapon and sending a message to players to update player2 but with no result. Tried moving/spawning into other dimension in one place then moving them in air. Or the same but spawning far away (thought it could be some streaming issue). No results. Setting giveWeapon's set as current to false seemed like it kinda made the issue happen less often. Weapons that are given when the player is nearby are visible.
  2. That will be a tough one then. I will still wait for a closer answer because I know nothing about shaders in mta.
  3. Hello! I would like to make a skin system but i can't find any information about if it's possible to change the same weapon skin for different players. Example: There are 3 players with AK, all of them have different weapon skin and everyone can see it.
  4. if anybody could test it on their machines, I would be gratefull.
  5. You can modify it to fit your needs.
  6. Hello! I've downloaded latest Slothbot resource and spawned counple bots. Everything was fine till i noticed that if there's no obstacle between me and enemy, his firing won't make a projectile (or it does, but it looks random). In result players can stand in front of a slothbot while he is shooting at him at point blank range and the bullet projectiles aren't spawning.
  7. function sethp(player, cmd, arg1, arg2 ) if getPlayerFromName( arg1 ) and type(tonumber(arg2)) == "number" then setElementHealth( getPlayerFromName(arg1), tonumber(arg2)) end end addCommandHandler( "sethp", function sethp) Not tested though.
  8. Oh, I'm sorry I was so dumb. I see how it works now.
  9. expBar = dxDrawRectangle(screenW * 0.8562, screenH * 0.1731, screenW * 0.0906, screenH * 0.0139, tocolor(194, 129, 26, 255), true) So this won't work if it is as you say. I can set width to a variable then change the variable to change bar and it will update dynamically?
  10. I'll have a look on that. I have a problem with something else. I've drawn an rectangle with dxDrawRectangle, do you know how i can change it's size?
  11. @lordhenry Yes i use createColCuboid @Dealman I might try that. Is there a way to print out various element's data?
  12. https://community.multitheftauto.com/index.php?p=resources&s=details&id=1248
  13. @loki2143 I've checked it today and it seems like even after changing HP serverside, clientside still works normally. It still changes hp. It's not a problem but just saying.
  14. Hello! I have a problem - I need to retrieve size of cuboids. How can i do that, I can only retrieve it's position. Also is there any simple way to make cuboids? Like making own definition to editor?
  15. function meChat(thePlayer, cmd,arg1,arg2,arg3,arg4,arg5) ProxDetector(30, thePlayer, arg1, arg2, arg3, arg4, arg5) end addCommandHandler("do", meChat) function ProxDetector(radius, thePlayer,arg1,arg2,arg3,arg4,arg5) local text = table.concat({...}," ") local oldposx, oldposy, oldposz = getElementPosition(thePlayer) for k, v in pairs(getElementsByType("player")) do local posx, posy, posz = getElementPosition(v) if getElementDimension(v) == getElementDimension(thePlayer) then local getRadius = getDistanceBetweenPoints3D(oldposx, oldposy, oldposz, posx, posy, posz) if (getRadius < radius / 16) then outputChatBox(getPlayerName(thePlayer).." "..text, v, arg1, false) elseif (getRadius < radius / 8) then outputChatBox(getPlayerName(thePlayer).." "..text, v, arg2, false) elseif(getRadius < radius / 4) then outputChatBox(getPlayerName(thePlayer).." "..text, v, arg3, false) elseif(getRadius < radius / 2) then outputChatBox(getPlayerName(thePlayer).." "..text, v, arg4, false) elseif(getRadius < radius) then outputChatBox(getPlayerName(thePlayer).." "..text, v, arg5, false) end end end return true end If rest of your code is right try this. I see it still won't work. https://wiki.multitheftauto.com/wiki/RGBToHex Add this behind every outputchatbox with arg.
  16. function onClientRender( ) local x,y,z = getElementPosition( localPlayer ) setCameraMatrix(x, y + 20, z + 2, x, y, z) end addEventHandler( "onClientRender", root, onClientRender )
  17. Hello there. I have been wondering if using functions like setElementHealth clientside is safe and if not, why there is such function for client and would it be effective with connection to serversided anti-cheat?
  18. https://wiki.multitheftauto.com/wiki/Scripting_Introduction I can help you with an example of that camera, but tell me what is it supposed to first.
  19. Means you didn't close a bracket ( I'm looking at the code and I don't really know what you want to do.
×
×
  • Create New...