Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/02/21 in all areas

  1. Oh yes forgot server side onDamage can’t be canceled!
    2 points
  2. You probably did it correctly, the only problem is that this event cannot be cancelled. Since the damage has already happened on clientside a while(few milliseconds) ago. This event represents a reflection of the past, not the moment the player got damaged. The now moment: onClientPlayerDamage
    2 points
  3. yes, i didn't see his comment before I replied, thanks y'all @IIYAMA error is : line 6: = expected near getPedArmor() it gives an error even though I put the = , and <= 0 means if less than 0 right? addEvent "onPlayerHeadshot" addEventHandler("onPlayerDamage", getRootElement(), function (attacker, weapon, bodypart, loss) if bodypart == 9 then If getPedArmor(source) <= 0 then local result = triggerEvent("onPlayerHeadshot", source, attacker, weapon, loss) if result == true then setElementHealth(source, getElementHealth(source)-20) if weapon == 34 then setElementHealth(source, getElementHealth(source)-100) end end end end ) check my edit: @IIYAMA @Tekken
    1 point
  4. Yes, @Tekken just gave you that one a few seconds ago.
    1 point
  5. If getPedArmor(source) > 0 then When in doubt always check wiki GetPedArmor returns a float that can be from 0 to 100 of i recall correctly
    1 point
  6. A little example local sx, sy = guiGetScreenSize(); local scaleX,scaleY = 1920/sx, 1080/sy; -- replace 1920 and 1080 with your resolution! function draw() -- Let's say we want to create a button on the right side 20px away from the screen at 150px from the bottom; local xpos = 20*scaleX; local ypos = 150*scaleY; local text = "PRESS ME!"; local tx, ty = dxGetTextSize(text, 0, 1, 1, Roboto, true); dxDrawText(text, sx-tx-xpos, sy-ty-ypos, sx-xpos, sy-ypos, tocolor(255,255,255,255), 1, Roboto, "center", "center", false, false, false, true); end addEventHandler("onClientRender", root, draw); Take a look at this tutorial: Hope that helped you!
    1 point
  7. This is a [beta] release for the turret resource. The resource is about creating turrets in your world and assigning owners to it (account-names). Followers/profile visitors will be able to download the resource before anybody else. See [BETA] download below. The resource will be available on the community once all ? are found and important features (from you guys?) are implemented. Feature list: Custom rockets (Customizable through Lua scripting) The behaviour of rockets are writing from scratch. Heat-seeking ones even support re-sync position/orientation. Turret creation and management Replace all rockets with custom ones (Feature can be enabled/disabled through the resource settings) Easter egg Can be found within area69. Once triggered something will change in the game. Resource settings in admin panel: The available settings will enable and disable the replacements of default rockets with custom rockets. On foot (recommended ping < 150) Vehicle (recommended ping < 80) If the recommendations are not met, nothing bad will happen as you can't get hit by your own rockets, but it might look a bit weird for the rocket creator ?. The rockets are created serverside, this means that the one that creates them will notice a delay[ping] between firing and seeing the rocket. For the other players the moment of creation should look OK. Open GUI? Login as admin Command: /turret Features: Add/remove turret Multi user support (limited to 1 editor for each turret) Set position/orientation Add/remove turret owners (account-names) Pros custom rockets Re sync heat-seeking rockets Multi syncers More reliable rocket speed. People with low FPS will see the same speed as players with high FPS. Customizable without GTA restrictions. Can be created serverside. Cons custom rockets More CPU will be used to compute the custom behaviour of the projectiles. (Serverside as well as clientside) More data will be transferred between client and server. Not streamable from clientside. (Creates a delay[ping] for the rocket creator) Developers: @Ayush Rathore (database) IIYAMA ? Special thanks to: @majqq @Ayush Rathore @ViRuZGamiing @Shux [BETA] Resource download: turrets.zip Enjoy. Don't forget to leave some feedback! Hint for the easter egg, if you can't find it. ?
    1 point
×
×
  • Create New...