Leaderboard
Popular Content
Showing content with the highest reputation on 07/02/21 in all areas
-
It's not just something that is in the area 51, it can fail anywhere underground. I can't put markers everywhere, but thanks for your idea. if getDistanceBetweenPoints3D ( x,y,z, zx,zy,zz ) < 50 and not isElementLocal (zomb) then This solved my problem2 points
-
I use the same script for zombies and i dont get this error too.2 points
-
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. ?2 points
-
1 point
-
It's either interference from something else on your server (yes - a resource) or you are not fully aware of your admin panel's modification status. It's kinda obvious, as no one around here has ever seen (as in: spoke about) that issue you're describing, and it also cannot be reproduced on a clean server that runs default resources, and the latest version of admin panel. As others that can help you don't have any starting point to identify script interference, you'll have to do some digging by yourself. Then if you find a suspect or the problematic resource, you can open up a topic in Scripting section, if you cannot fix it by yourself.1 point
-
Oh, sorry! I thought you had missing stuff. About the saving here is how it will happen: setAccountData (account, "weaponID7", getPedWeapon (source, 7)) if getPedWeapon(source, 7) == 37 then -- if the player has flamethrower setAccountData (account, "weaponAmmo7", getPedTotalAmmo (source, 7)/10) else setAccountData (account, "weaponAmmo7", getPedTotalAmmo (source, 7)) end --and the rest of the code... You won't have to edit anything on the load part as the flame ammo is already divided and it should be all good.1 point
-
Replace the FPS line in the table with this to prevent the errors. { name = "FPS", width = 40, data = function (element) return getElementData ( element, "FPS" ) or "N/A" end }, It doesn't show the FPS at first because the player just joined and it will take some time to start measuring it. So if there is no value set for the data "FPS" then it will show "N/A" instead.1 point
-
Thread's been moved into the Scripting section for best results. The text was unreadable in white theme and is now fixed.1 point
-
It is not the zombie resource alone that causes the error. Another resource is making clientside peds, this combination will make it possible for the error to appear. If you do not have clientside created peds in your server, then you will not be able to get this error.1 point
-
if getDistanceBetweenPoints3D ( x,y,z, zx,zy,zz ) < 50 and not isElementLocal (zomb) then I guess it is because the ped is created clientside. I haven't seen this error before to be honest.1 point
-
Yes, looks that ped cant determine where is the player. Simple solution: Create a big marker inside radar room and with isElementWithinMarker you dont execute zombieHeared event.1 point
-
1 point
-
Oh sorry, I meant this one: https://wiki.multitheftauto.com/wiki/Shader_examples#dxDrawCircle but you still need that image to make the borders smooth.1 point
-
function createText1 ( ) if getElementData(localPlayer, "logedin") then if (getElementData (localPlayer, "hideTable") or {}).icons then return true end if getElementData(getLocalPlayer(), "brokenbone", true) then dxDrawImage(screenWidth * 0.94, screenHeight * 0.73, screenHeight * 0.065, screenHeight * 0.065, "brokenbone.png", 0, 0, 0, tocolor(255, 255, 255)) end ------------------------------- BLOOD ------------------------------- if getElementData(getLocalPlayer(), "blood") >= 10000 and getElementData(getLocalPlayer(), "blood") <= 12000 then elementblood1 = dxDrawImage(screenWidth * 0.86, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "blood/5.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "blood") >= 8000 and getElementData(getLocalPlayer(), "blood") <= 10000 then elementblood1 = dxDrawImage(screenWidth * 0.86, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "blood/4.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "blood") >= 6000 and getElementData(getLocalPlayer(), "blood") <= 8000 then elementblood1 = dxDrawImage(screenWidth * 0.86, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "blood/3.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "blood") >= 4000 and getElementData(getLocalPlayer(), "blood") <= 6000 then elementblood1 = dxDrawImage(screenWidth * 0.86, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "blood/2.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "blood") >= 2000 and getElementData(getLocalPlayer(), "blood") <= 4000 then elementblood2 = dxDrawImage(screenWidth * 0.86, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "blood/1.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "blood") >= 100 and getElementData(getLocalPlayer(), "blood") <= 2000 then elementblood2 = dxDrawImage(screenWidth * 0.86, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "blood/0.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "bleeding") > 0 then dxDrawImage(screenWidth * 0.86, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "blood/bleeding.png", 0, 0, 0, tocolor(210, 10, 16)) end if getElementData(getLocalPlayer(), "infection") then dxDrawImage(screenWidth * 0.86, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "infection.png", 0, 0, 0, tocolor(255, 0, 0,fading)) end ------------------------------- BLOOD ------------------------------- ------------------------------- food ------------------------------- if getElementData(getLocalPlayer(), "food") >= 80 and getElementData(getLocalPlayer(), "food") <= 100 then elementblood1 = dxDrawImage(screenWidth * 0.94, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "food/5.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "food") >= 60 and getElementData(getLocalPlayer(), "food") <= 80 then elementblood1 = dxDrawImage(screenWidth * 0.94, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "food/4.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "food") >= 40 and getElementData(getLocalPlayer(), "food") <= 60 then elementblood1 = dxDrawImage(screenWidth * 0.94, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "food/3.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "food") >= 20 and getElementData(getLocalPlayer(), "food") <= 40 then elementblood1 = dxDrawImage(screenWidth * 0.94, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "food/2.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "food") >= 10 and getElementData(getLocalPlayer(), "food") <= 20 then elementblood2 = dxDrawImage(screenWidth * 0.94, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "food/1.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "food") >= 0 and getElementData(getLocalPlayer(), "food") <= 10 then elementblood2 = dxDrawImage(screenWidth * 0.94, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "food/0.png", 0, 0, 0, tocolor(162, 161, 161)) end ------------------------------- food ------------------------------- ------------------------------- drink ------------------------------- if getElementData(getLocalPlayer(), "thirst") >= 80 and getElementData(getLocalPlayer(), "thirst") <= 100 then elementblood1 = dxDrawImage(screenWidth * 0.90, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "drink/5.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "thirst") >= 60 and getElementData(getLocalPlayer(), "thirst") <= 80 then elementblood1 = dxDrawImage(screenWidth * 0.90, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "drink/4.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "thirst") >= 40 and getElementData(getLocalPlayer(), "thirst") <= 60 then elementblood1 = dxDrawImage(screenWidth * 0.90, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060,"drink/3.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "thirst") >= 20 and getElementData(getLocalPlayer(), "thirst") <= 40 then elementblood1 = dxDrawImage(screenWidth * 0.90, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "drink/2.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "thirst") >= 10 and getElementData(getLocalPlayer(), "thirst") <= 20 then elementblood2 = dxDrawImage(screenWidth * 0.90, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "drink/1.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "thirst") >= 0 and getElementData(getLocalPlayer(), "thirst") <= 10 then elementblood2 = dxDrawImage(screenWidth * 0.90, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "drink/0.png", 0, 0, 0, tocolor(162, 161, 161)) end ------------------------------- TEMPERATURA ------------------------------- dxDrawImage(screenWidth * 0.82, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "temperature/t2.png", 0, 0, 0, tocolor(162, 161, 161)) if getElementData(getLocalPlayer(), "temperature") <=35 then elementtemp2 = dxDrawImage(screenWidth * 0.82, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "temperature/t5.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "temperature") >= 35 and getElementData(getLocalPlayer(), "temperature") <=36 then elementtemp2 = dxDrawImage(screenWidth * 0.82, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "temperature/t4.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "temperature") >= 36 and getElementData(getLocalPlayer(), "temperature") <=37 then elementtemp4 = dxDrawImage(screenWidth * 0.82, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "temperature/t3.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "temperature") >= 37 and getElementData(getLocalPlayer(), "temperature") <=38 then elementtemp = dxDrawImage(screenWidth * 0.82, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "temperature/t3.png", 0, 0, 0, tocolor(162, 161, 161)) end if getElementData(getLocalPlayer(), "temperature") >= 38 then elementtemp = dxDrawImage(screenWidth * 0.82, screenHeight * 0.900, screenHeight * 0.060, screenHeight * 0.060, "temperature/t3.png", 0, 0, 0, tocolor(162, 161, 161)) end -------------------------------FPS------------------------------- if getElementData(getLocalPlayer(), "FPS") >= 35 and getElementData(getLocalPlayer(), "FPS") <=45 then dxDrawImage(screenWidth*0.94, screenHeight * 0.635, screenHeight * 0.065, screenHeight * 0.065, "net2.png", 0, 0, 0, tocolor(255, 255, 0,fading)) end if getElementData(getLocalPlayer(), "FPS") >= 50 and getElementData(getLocalPlayer(), "FPS") <=60 then dxDrawImage(screenWidth*0.94, screenHeight * 0.635, screenHeight * 0.065, screenHeight * 0.065, "net3.png", 0, 0, 0, tocolor(92, 141, 71,fading)) end if getElementData ( localPlayer, "clothHead" ) and getElementData ( localPlayer, "clothHead" ) ~= 0 then dxDrawImage(screenWidth * 0.90, screenHeight * 0.81, screenHeight * 0.065, screenHeight * 0.065, "bpvest1.png", 0, 0, 0, tocolor(162, 161, 161,fading) ) end if getElementData ( localPlayer, "clothBody" ) and getElementData ( localPlayer, "clothBody" ) ~= 0 then dxDrawImage(screenWidth * 0.94, screenHeight * 0.81, screenHeight * 0.065, screenHeight * 0.065, "bpvest.png", 0, 0, 0, tocolor(162, 161, 161,fading) ) end end end1 point
-
1 point
-
Add this at the very top of the onClientRender event if getElementData(getLocalPlayer(),"logedin") then That happens because the player it's not yet logged in thus it doesn't have the "blood" element data set to it!1 point
-
He can have a variable client sided like: local isLoggedIn = false; if isLoggedIn then ...bla bla bla end and only manage peds for players that have this variable true and when login set the variable true, this should work, right?1 point
-
You have to apply the same method I’ve showed you, with tables. All I can do It’s to encourage you to learn how tables work! Just follow the example I gave you. Good luck!1 point
-
Unfortunately there are no guaranties that it will be a success. All you can do is making sure that you bring a lot of people in to your project. That way you can validate your concept(s) before you are actually going to building it. And a lot of trial and error testing is important. That being said, a lot of patiences until you got your concept and prototype-gamemode right is key here.1 point
-
Hey! Thanks for the reply! Well, gamemode complexity really is no issue.. ( I already have an rpg template I made for fun, works really well, but I do not intend to make an rpg [that template was more of a way to learn MTA documentation again, since I didn't use lua nor MTA functions in a long time..] ) the thing I'm worried about is player base and interest in something new or at least bit different approach on old gamemodes :S..1 point
-
The syncer (which can be anybody as long as the ped is streamed in for that player) will synchronized the following: Position Rotation Velocity < probably ??? unknown stuff, I did not test everything ??? The most other things are not synchronized. For example: Control state (triggerClientSide/elementData required) Model (unless set by serverside) Dimension/interior (unless set by serverside) See next page You have to keep track of the ped control states on serverside. You can use tables for that or even elementData, just pick what you can work with. But you probably want to start with keeping track of loaded players. The following code is used in the beta resource that I shared not long ago. local players = getLoadedPlayers() -- table {player, player, player} triggerClientEvent (players, "event-name", ped, "walk", true) --------------------- local loadedStatus = isPlayerLoaded (player) -- true/false Client Server My dataManagement Library used in the script above, might be a little bit complex but feel free to use:1 point
-
What is a Helper? Helpers are regular members of the Community who dedicate some of their time to help others. They are recognized by MTA for standing out as friendly and helpful support for scripting, technical and other topics. Helpers serve as role models for the Community and are easily approachable for general advice, problem solving or pointing to the right direction. Helpers can move threads into the correct sections, but cannot assist with moderation, unless they are also a Moderator. They can be identified by their unique rank and colored name. How can I become a Helper? Helpers are recruited through invitation only. There is no way to apply for this role, however we are on constant lookout for, and pick members who provide solid, helpful advice over a longer period of time. To make communication easier between MTA Staff and Helpers, they have their own private channels to liaise and discuss general Forum and Discord issues. It is required to have a Forum account in order to become a Helper, but there are no activity requirements. List of Helpers Tekken iDannz The_GTA DiSaMe Vampire Abasalt_Yar efex Selective Wallace HyperByte1 point
-
@Zango Nope, it will just stop working now (will never open) because the source of onClientMarkerHit is the marker which got hit, not the element hitting the marker. @Patlik You have to check if the hitPlayer (provided as 1st parameter of the handler function) is equal to the localPlayer element (and checking matchingDimenssion is a best practice too): function MKH_OPEN (element, matchingDimension) if element ~= localPlayer or not matchingDimension then return end if not atm[source] then return end if guiGetVisible(GUIEditor.window[1]) then -- I've also removed `== true` there as it is redundant guiSetVisible(GUIEditor.window[1], false) showCursor(false) else guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end addEventHandler("onClientMarkerHit", root, MKH_OPEN)1 point
-
NEW/CUSTOM WEAPONS This resource allow you to add weapons, you can add new type of weapons, for while its just for rifles that replace M4 V1.0 8 Weapons ( Rifle ) Different sounds. HOW TO USE F2 open panel, you just need to select the weapon. How to add weapons. Open both scripts client and server Add the name of weapon that you want in table {"AUG",4394} > Name, and Object ID that you will replace it Take the skin of weapon put in models folder and in meta.xml The name of dff and txd must be the same of weapon in table ( without space ) in table you can put space. Make the same with the .wav sound. FUNCTION TO EXPORT giveNewWeapon(player,WEAPONAME) --Example. function givewep(player) giveNewWeapon(player,"M4A1") end DOWNLOAD: https://community.multitheftauto.com/index.php?p=resources&s=details&id=181491 point
-
Çok iyi bir insan, çok sakin, çok düşünceli kesinlikle daha iyi yerleri hak ediyor. Ben onu çok seviyorum ama o beni sevmiyor. Ama ben onu öyle kabullendim. Beton yetmez reis0 points
