-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
Because you haven't found it yet. The boss is probably created serverside, because it has to be synced with all other players. I do not know the script, neither I am going to spend time searching it for you (I don't have that luxury either). This will be your first research case, where you have to search and find a component you want to edit. Did you know that I spend more than 30 hours researching a single resource? (one of the first large resources I came in contact with) While researching I started to edit things on the way, which makes researching a bit more interesting. Tell me @TorNix~|nR, how much energy and time are you going to spend on achieving this?
-
Before you can try, you have to understand else those 100 times are for nothing. So tell me what did you learn from the code?
-
You will have to study the script that is creating the `boss`, because this is just bull:~ code and will not get you anywhere. Check for export functions or custom events you could trigger.
-
edit line 1, to: sha1 = { Edit line 297, to: -- nothing
-
ONLY the file " sha1.lua", not a folder. Just put it in the root/top layer of the resource where you are going to using this sha1 function. Then open the meta.xml of the resource. (which is also in the root/top layer) And add there between the meta tags: <meta>HERE</meta> This: <script src="sha1.lua" />
-
I really hope you didn't copy the Github comments with it. Because the code you posted contains them, if so try to copy the raw format of it. Raw format: https://raw.githubusercontent.com/kikito/sha1.lua/master/sha1.lua Replace:(it is in your code, seek and find) sha1(password) With: sha1.sha1(password) Make sure to check if the code you download is working. :
-
local sounds = {} function onSay1() if isElement(source) then local x, y, z = getElementPosition(source) local sound = playSound3D('say1.mp3',x,y,z) setSoundMaxDistance(sound, 25) sounds[#sounds + 1] = {sound = sound, player = source} end end addEvent("onSay1",true) addEventHandler("onSay1", root, onSay1) addEventHandler("onClientRender", root, function () if #sounds > 0 then for i=#sounds, 1, -1 do local soundData = sounds[i] local sound = soundData.sound local player = soundData.player if isElement(sound) and isElement(player) then local x, y, z = getElementPosition(player) setElementPosition (sound, x, y, z) else table.remove(sounds, i) end end end end) triggerClientEvent (root, "onSay1", player) Something like this. (untested)
-
This is all there is.
-
onClientPreRender < (do not use attachElements)
-
How about attaching the player and ped to the car while doing the animation?
-
Re-writting it in your own style is a good way of learning how the code works.
-
https://wiki.multitheftauto.com/wiki/GetVehicleHandling or https://wiki.multitheftauto.com/wiki/GetModelHandling or https://wiki.multitheftauto.com/wiki/GetOriginalHandling At key/index. maxVelocity Combine with the post of the @Unknown-guy.
-
siren-system Not enough context to help you with this. For the interior. Use createElement and set it's children. local newElement = createElement("interiorEntrance", "interiorEntrance:" .. interiorID) for i=1, 30 do local marker = createMarker (...) setElementParent(marker, newElement) end destroyElement(newElement) -- will also destroy it's children. Syntax createElement: element createElement ( string elementType, [ string elementID = nil ] )
-
Put this in your meta.xml <oop>true</oop> As I said before, do not mix oop in your script, unless you know what you are doing.
-
https://wiki.multitheftauto.com/wiki/RemovePedFromVehicle
-
function dxOutputMessage(message, player, r, g, b) -- this works for server side trigger from another resource triggerClientEvent(player, "dxMessage.dxOutputMessage", player, message, r, g, b); end function outputMessage(message, player, r, g, b) dxOutputMessage(message, player, r, g, b); end addEvent("dxMessage.outputMessage", true); addEventHandler("dxMessage.outputMessage", root, function(message, r, g, b) outputMessage(message, client, r, g, b); -- and here end); It is not recommended to mix oop syntax in your code, unless you want to learn that,
-
Please follow the createVehicle syntax vehicle createVehicle ( int model, float x, float y, float z [, float rx, float ry, float rz, string numberplate, bool bDirection, int variant1, int variant2 ] ) https://wiki.multitheftauto.com/wiki/CreateVehicle You have to fill in the model and it's position (x, y, z). So for example: createVehicle(400, 0, 0, 10) This will create a vehicle with the skin/model 400 in the middle of the map. And if that doesn't work, please check if that part of the code gets executed.
-
Nice goal. And the problem is? ...
-
local sound function say1() if isElement(sound) then stopSound (sound) end local x, y, z = getElementPosition(localPlayer) sound = playSound3D('say1.mp3',x,y,z) setSoundMaxDistance(sound, 25) end addCommandHandler('say1', say1) ----------------------------------------------------- addEventHandler("onClientRender", root, function () if isElement(sound) then local x,y,z = getElementPosition(localPlayer) setElementPosition (sound, x, y, z) end end) There is no source available in those functions. Not here: https://wiki.multitheftauto.com/wiki/AddCommandHandler And not here: https://wiki.multitheftauto.com/wiki/OnClientRender
-
It has to do with weather or/and time. As you can see, it is getting dark there. There are no functions for that.
-
Insert it in `List` like this. The variable `player` is used as key, which leads to the data(another table). Saving List[player] = {Value, Value2, Value3} Loading local data = List[player] local value1 = data[1] local value2 = data[2] local value3 = data[3] Looping for player, data in pairs(List) do local value1 = data[1] local value2 = data[2] local value3 = data[3] end Please do not abuse using the predefined variable `source` inside of an addCommandHandler. Just simple: function ShowRank (player) Since you already know that it is a player (or false if it is activated by script.)
-
I wouldn't hate you for that, I am a human after all. But I do hope you are a human too and let one of our efforts not vain.
-
yes, but if you do that, you must make sure that the receiver resource is always running while using the other resource.
- 13 replies
-
- 1
-
-
- serverside
- clientside
-
(and 2 more)
Tagged with:
-
And I shouldn't forget to tell you that the resource must be running as well.
- 13 replies
-
- serverside
- clientside
-
(and 2 more)
Tagged with:
