-
Posts
6,061 -
Joined
-
Last visited
-
Days Won
208
Everything posted by IIYAMA
-
Try to run the play gamemode instead of roleplay and test the script. Most roleplay gamemodes do have anti weapon cheat.
-
You sure you don't run a gamemode with anti cheat next to it? And you aren't trying to give the weapon clientside?
-
But what is the problem? I don't know what to look for.
-
You sure? Because isLineOfSignClear does not require a callback. addEventHandler("onClientVehicleDamage",root,function(attacker,wep,loss,x,y,z,tyreid) if (wep == 63 or wep == 51 or wep == 19) then local aX,aY,aZ = getElementPosition(attacker); local tX,tY,tZ = getElementPosition(source); iprint(isLineOfSightClear(tX,tY,tZ,aX,aY,aZ,true,false,false,true),aX,aY,aZ,tX,tY,tZ) if not isLineOfSightClear(tX,tY,tZ,aX,aY,aZ,true,false,false,true) then cancelEvent(); end end end); blowVehicle does not support the second argument clientside, only serverside. And I wouldn't recommend it to do it clientside because of desync.
-
yea, true Explosions are forced to be sync. Last thing: (clientside only) bool createExplosion ( float x, float y, float z, int theType [, bool makeSound = true, float camShake = -1.0, bool damaging = true ] ) Set damaging to false after recreation. P.s. car explosions might look different.
-
Possible way to cancel damage and still see the effect. https://wiki.multitheftauto.com/wiki/OnClientExplosion https://wiki.multitheftauto.com/wiki/CreateExplosion Might cause a little temporary desync with other players. (If you cancel the event and other players are near you.) If you saw this at the server from bigbadbutler (chaos.de), then you have to know that he used custom health instead of normal health which is a very different approach.
-
I don't understand your question, please rewrite last part. Not required: setWeaponAmmo (thePlayer, 38, 500) Change: giveWeapon (thePlayer, 38, 1000, true) Adding the script to two sides is not correct, unless you know what you are doing. <meta> <script src="script.lua" type="server" /> <!--<script src="script.lua" type="client" />--> </meta>
-
@Matevsz Why don't you start with learning how to interact with a table? Your table structure is incorrect created based on the data that is inside it. Either put more data inside each item(sub table) or make each item the value(number) and not a sub-table. If you do not understand about a word of what I just said, start this: Or boring, but useful: http://lua-users.org/wiki/TablesTutorial
-
Even so you will need to brute force it, because it a one way encryption. passwordVerify can't convert them back to original, it can only check if a hash is the same as the original password. Which means you need the original password first. @quindo oh you were quicker haha I would say: Brute force + this function = ~2030+. (Not sure how long that would take) After all, if you want to make it more harder, you can use teaEncode on top of it. (which I do) https://wiki.multitheftauto.com/wiki/TeaEncode Problem solved.
-
I updated some content. If you find some typo's/etc Feel free to mention it. It is not my mother language after all. Thank you for the support guys! You are the best!
-
Line 5. for i = 0, 16 do local upgrade = getVehicleUpgradeOnSlot (source, i) if ( upgrade ) then addVehicleUpgrade (source, i) end end What do you want to do here? Because I doubt this is what you want. Maybe something like this: local upgrades = getElementData (source, "upgrades") if upgrades and type(upgrades) == "table" then iprint("upgrades found") for i=1, #upgrades do if upgrades[i] then addVehicleUpgrade (source, upgrades[i]) end end else iprint("no upgrades found") end (of course you need to set the elementdata first before this is going to work) Untested Line 48. Please check the syntax of setElementData. You have now filled in one argument, but you need to fill in at least 3. https://wiki.multitheftauto.com/wiki/SetElementData Line 57. local car = getElementData(source, "hisCar") and setElementData (getVehicleUpgrades (source, "hisCar"))
-
https://wiki.multitheftauto.com/wiki/GetBoundKeys
-
With: https://wiki.multitheftauto.com/wiki/AddVehicleUpgrade Here you can find all vehicle functions: https://wiki.multitheftauto.com/wiki/Server_Scripting_Functions#Vehicle_functions
-
Don't ruin the typography Not sure which typo hater invented this option.
-
Just keep the usage at a limit and you will be fine.
-
I appreciate it, if you take me seriously. If you don't show some me motivation(for example by not showing what you tried), then please don't be so surprised. If you think that I get paid to help you, then you are slightly mistaken. I am helping you because I like to help people who want to learn. thePlayer, does not exist in this code. It is fiction. It is not here: And not here: https://wiki.multitheftauto.com/wiki/OnPlayerDamage But there is attacker which you can use over thePlayer. Which is actually a parameter of this event and sample. I recommend you to write it like this: if attacker and getElementType(attacker) == "player" then First it will check if the attacker variable has a value which is not nil/false and then it checks if the attacker is a player.
-
local testEventHandler = function (...) iprint("eventName:", eventName, "has been executed with arguments:", ...) end local addEventHandler_ = addEventHandler function addEventHandler (...) addEventHandler_(...) local arguments = {...} arguments[3] = testEventHandler -- replace the function addEventHandler_(unpack(arguments)) end (untested) For events, you might be able to figure it out with wrappers.
-
Don't post such useless reply and show us what you tried. You have already posted 255 posts and you still can't figure out that you have to try in order to walk, even a baby understands that. ! Here you have two tutorials: https://www.tutorialspoint.com/lua/if_else_statement_in_lua.htm
-
Good, lets get started.
-
Oke now look back at the code I posted, do you think you implement line 3 from my copy in your code?
-
Getting team of nothing = warning What is <nothing>? And how to check that: https://stackoverflow.com/questions/9141217/empty-variable-check
-
function hill_Enter ( thePlayer, matchingDimension ) if getElementType(thePlayer) == "player" then -- check if the hit element is actually a player local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) As @Blast3r said.