-
Posts
1,060 -
Joined
-
Last visited
-
Days Won
9
Everything posted by Addlibs
-
You can't really un-hash MD5.
-
His code is correct. It was supposed to be 'source', not 'root'.
-
1) getElementData(localPlayer, "username") returns a boolean value (most probably 'false'). 'false [bool]' cannot be concatenated (joined up) with a string, unless you tostring() it, e.g. ""..tostring(getElementData(localPlayer, "username")).."" 2) It seems redundant (and probably inefficient) to concatenate a value to 2 empty strings... You could just go ahead and type getElementData(localPlayer,"username") instead of ""..getElementData(localPlayer,"username").."" I'm assuming you've shared a section of the code (some lines seem to be pleonastic, or do not have a starting point — e.g. you have an 'end' which doesn't start anywhere) as it doesn't seem one bit complete.
-
That debug error is not related to this issue. That's from scripting extensions from map editor.
-
Well.. You can do onClientResourceStart resourceRoot triggerServerEvent requestDFFs and the make the server read the file stored in the resource folder (not added to meta.xml, so that it won't be downloaded by the client), send it to the client (probably encoded, so that hackers cannot "pull" data from networking), decode it in the client, and load it into DFF form by raw data.
-
You could bindKey("enter_passenger"), find if player is in a specific distance, and then tell your code that the player is now in that vehicle. Your code could handle setElementPosition of player, disabling collisions, setElementRotation of player (well, not necessary in Rhinos as you don't get to see the person inside), and setCameraTarget
-
Edit: Just realised this is about the rocket launcher, not the Hydra rockets.
-
thefile = fileOpen( < File > ) content = fileRead(thefile) encodedContent = teaEncode(content, < Key >) But I don't see why you would do that - sooner or later you will need to decode the file, save it, load it through engineLoadDFF and then maybe delete the decoded one. MTA currently doesn't support loading DFF files into buffer to create a 'DFF' element out of it. If you want to encode it into a standard base64 (without tiny encryption algorithm), then use base64Encode and base64Decode, but as said earlier, it's quite useless for DFF files.
-
This resource might help you: https://community.multitheftauto.com/in ... ls&id=3090
-
3D (with perspective)? Or just in a world position?
-
Actually, /register is a Lua command, handled by the admin panel Lines 447-468 of admin/server/admin_server.lua
-
You could try setting element data seatbelt to false just before throwing the player out
-
function onAttemptExit(thePlayer) if getElementData(thePlayer, "seatbelt") then cancelEvent(true) outputChatBox("You cannot exit the vehicle while you're wearing your seatbelt.", thePlayer, 255, 0, 0) end end addEventHandler("onVehicleStartExit", root, onAttemptExit)
-
The first paragraph does not make any sense to me.
-
More details on these errors should be really useful, you know?
-
Line 6 through to 19 is in a pairs loop of the table "Chats", I assume the table has 2 values inside it. 2 value stacks are inserted as childs of just 1 XML nodes. I assume you were aiming to have a specific node for Chats[1] and another one for Chats[2], and within each, their respective childs, right?
-
He wanted to mute MTA sound elements (custom radio through .pls) whilst something else plays.
-
This error means that one player tries to change another's element data. It's not an "error" as such, just a warning that the corresponding onElementDataChange was cancelled, and element data was not changed. To avoid such problems you should change element data through server or the client whose element data you're changing. One client cannot change another's data, only it's own. If you are not interested in having to edit the race game mode's codes, there is a way to get rid of these errors, but a the same time you make your server less secure. I am not sure if this is possible to get rid of "Race Security" errors, but you definitely can get rid of "Admin Security" errors; go into admin panel settings (Admin panel > Resources > Double click on 'admin') and lower the securitylevel setting (2 = All checks | 1 = Some checks | 0 = No checks). Setting this to 0 (or 1) should get rid of (most) "Admin Security" "errors."
-
Explain what you're looking for in a bit more detail. We can't help you if we don't understand your aim.
-
local previousVolumes = {} function muteSounds(except, eVol, oVol) --sound except — Which sound should stay un-muted --float eVol — Volume of the 'except,' how loud the un-muted sound should be --float oVol — How loud should all other sounds be (this should be lower than eVol, in your case) for k, v in ipairs(getElementsByType("sound")) do previousVolumes[v] = getSoundVolume(v) --Remember the previous volume so that you can return it when done if v == except then setSoundVolume(v, eVol) else setSoundVolume(v, oVol) end end end function unmuteSounds() for k, v in pairs(previousVolumes) do if isElement(k) then --Check if the sound element still exists setSoundVolume(k, v) --Reset the sound back to normal end end previousVolumes = {} --Reset the table end
-
This is about calling the function. Exports are OOP styled but exported function cannot. The OOP syntax is for the following usage: getResourceFromName("resource"):call("exportedFunction", 1, "2", "three") --or Resource.getFromName("resource"):call("exportedFunction", 1, "2", "three") --instead of call(getResourceFromName("resource"), "exportedFunction", 1, "2", "three")
-
The code above cancels all damage made without an attacker, not necessarily just falling damage.
-
As far as I'm aware, you also need to enable a module through console commands or mtaserver.conf