myonlake
Members-
Posts
2,312 -
Joined
-
Days Won
41
Everything posted by myonlake
-
Hello once again, I am trying to make a script that changes your camera position all the time, but this one has bad arguments. -- Player on-join function onJoin() fadeCamera(source, true, 5) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox("Welcome to testing server.", source, 255, 255, 255, true) outputChatBox(" ", source, 255, 255, 255, true) setCameraMatrix(source, -1687, 1313, 25, -1529, 1235, 1) setTimer(function() fadeCamera(source, false, 3) end, 6000, 1) setTimer(camera_1, 7000, 1, source) end addEventHandler("onPlayerJoin", getRootElement(), onJoin) -- Camera 1 function camera_1() fadeCamera(source, true, 3) setCameraMatrix(source, -1469, 760, 59, -1610, 832, 8 ) setTimer(camera_2, 7000, 1, source) setTimer(function() fadeCamera(source, false, 3) end, 6000, 1) end -- Camera 2 function camera_2() fadeCamera(source, true, 3) setCameraMatrix(source, -1852, 1100, 168, -1080, 454, 2) setTimer(camera_1, 7000, 1, source) setTimer(function() fadeCamera(source, false, 3) end, 6000, 1) end
-
Uh, forget it, I just understood one thing..
-
Yeah, and if there was a scripter who would like to help you, you would need to pay him REAL money, not some in-game money or admin privileges...
-
Hello, I guess I am too tired (once again) to understand this one. I am trying to see if the player is the killer of someone. function onKill(ammo, killer, weapon, bodypart) if killer == thePlayer then outputChatBox("You killed a player", thePlayer, 255, 255, 255, false) end end addEventHandler("onPlayerWasted", getRootElement(), onKill) Let me guess, it's just one of those tiny things that I've made wrong/forgotten.. This is just for one bigger script that I'm doing.
-
Well, I make a pedestrian with a command, it saves the following XML node in the file. <pedestrians> <ped id="1" /> </pedestrians Does the script understand the pedestrian that I just gave an ID. If I destroyElement it? Does it understand to delete it or will it output an error?
-
If I put a pedestrian in a XML file, and if I want to like, destroy it, does the script understand to destroy the pedestrian or does it just output me an error of invalid value in destroyElement?
-
Hello, Is it possible to destroy a pedestrian? I will post my script if true.
-
Re-install your GTA, that's the only choise.
-
If you do a map, you definetly don't patch it to a .zip file. You just leave it alone. Same thing for all the other resources, I am just using unpatched files, server doesn't read the patched files so well everytime. That's what I've learned with my big scripts.
-
Have you tried re-installing and changing the port to the default one: 22003/HTTP: 22005?
-
I am thinking the same as diego. This is probably just one of those little problems that your computer has, YOUR COMPUTER SUCKS. Get a better computer to run your 100 custom models and 1000 custom car models
-
Hello, I have tried this: https://nightly.multitheftauto.com/ports/ and it seemed to be working as it informed me that my port blahblah is not open. Well, I found a problem. The script on that page is not working and can be considered as a fake one. I have tried another ports that my computer has on the same text boxes, it should show that they're open, but nah, it doesn't show that. So, what I'm saying is, that something is wrong with my files or ports or what? I have a dynamic IP-address, my usual players can join the server by going on my forums and copy&pasting the IP-address. My server used to work before, now it doesn't. And it worked in 1.0.5 aswell. Only thing that is making me confused is that when I try to join the server, the normal port is not 22005 that I've got in the configuration... it's some 22116. Help?
-
Hello, The basic function for attaching elements worked just fine yesterday, but today it's not working well. I have a basic script that has an attached marker, and when I move the source, it moves the marker with it. But. When I move the object, the marker disappears and does not appear anymore. What could possibly cause this? I am not going to show any code because I am one hundred percent sure it's working, but something is wrong with the MTA side (I guess). Any answers for this? Oh, and I am using the attachElements function.
-
<meta> <info name="Replacing a weapon"></info> <script src="replace.lua" type="client"></script> <file src="bat.txd"></file> <file src="bat.dff"></file> </meta> local resourceRoot = getResourceRootElement(getThisResource()) addEventHandler("onClientResourceStart",resourceRoot, function () txd = engineLoadTXD ( "m4.txd" ) engineImportTXD ( txd, 356 ) dff = engineLoadDFF ( "m4.dff", 0 ) engineReplaceModel ( dff, 356 ) end)
-
Hello, I am trying to find a script that automaticly positions my createObjects to attachElements so that I don't need to configure them myself. It's annoying when you need to position every object, takes a lot of time. EDIT: I solved the problem Alright, so the fix is that when you do attachElements, you MINUS the position from the original position of the source object. Like this. local originalX = 100 local originalY = 100 local originalZ = 1 local example1 = createObject... local example2 = createObject... attachElements(example1, example2, 1000 - originalX, 1000 - originalY, 5 - originalZ)
-
We do not make scripts for you, but we can give you a helping hand. Here are some functions you need. If your try is not working, show it to us. addEventHandler -- Event handler createMarker -- The marker outputChatBox -- For to show you the messages when you open/close the marker addCommandHandler -- Open/close command setElementPosition -- Set the player's position setElementInterior -- To change the interior of the player setElementDimension -- To change the dimension of the player destroyElement -- To destroy the marker on the close command
-
I don't know what was your problem, but the first thing I saw in the script(s) was that they couldn't work because they all had the same function names and some of it had the same commands... then you had this onResourceStart event, which could of worked but it's not even needed because you can just put it to the start of the script and do local in the beginning. Anyways, here is your fixed script, if you need more help, please, explain better and tell me the errors that Console or /debugscript 3 says. Here is the whole fixed script that should work. The Code local gate1 = createObject(969, -717.79998779297, 954.20001220703, 11.199999809265, 0, 0, 88) -- First gate local gate2 = createObject(3885, -1498.2347412109, 805.29083251953, 5.7079048156738, 0, 0, 74.915008544922) -- Second gate local gate3 = createObject(2951, 3109.0913085938, -842.58416748047, 28.436388015747, 0, 0, 43.170013427734) -- Third gate local s2 = createBlip(2920.76171875, -794.72790527344, 11.571973800659, 23) -- The Blip -- Open the gate 1 function openGate1() moveObject(gate1, 2500, -718, 946.90002441406, 11.199999809265) end addCommandHandler("open1", openGate1) -- Close the gate 1 function closeGate1() moveObject(gate1, 2500, -717.79998779297, 954.20001220703, 11.199999809265) end addCommandHandler("close1", closeGate1) -- Open the gate 2 function openGate2() moveObject(gate2, 2200, -1497.6064453125, 805.119140625, 50.178058624268) end addCommandHandler("open2", openGate2) -- Close the gate 2 function closeGate2() moveObject(gate2, 2450, -1498.2347412109, 805.29083251953, 5.7079048156738) end addCommandHandler("close2", closeGate2) -- Open the gate 3 function openGate3() moveObject(gate3, 2200, 3109.0908203125, -842.63531494141, 24.53639793396) end addCommandHandler("open3", openGate3) -- Close the gate 3 function closeGate3() moveObject(gate3, 2450, 3109.0913085938, -842.58416748047, 28.436388015747) end addCommandHandler("close3", closeGate3) Commands /open1 - Open the first gate /close1 - Close the first gate /open2 - Open the second gate /close2 - Close the second gate /open3 - Open the third gate /close3 - Close the third gate
-
Hello, I am trying to do a script that prevents vehicles from exploding. I have done this like in my fuel script, it has two timers that check the same thing. But, in this one it doesn't work. I am sure I have missed a lot of things in this one, but, I am still tired so, could you help me find the way? I'm lost. local root = getResourceRootElement(getThisResource()) local rElement = getRootElement() -- Preventing Explosion, Timer 1 function preventExplosion1(thePlayer) local theElement = getElementType(source) local theHealth = getElementHealth(source) if theElement == "vehicle" then if theHealth <= 250 then setVehicleEngineState(source, false) setElementHealth(source, 260) else setTimer(preventExplosion2, 1000, 1) end end end addEventHandler("onResourceStart", root, preventExplosion1) -- Preventing Explosion, Timer 2 function preventExplosion2(thePlayer) local theElement = getElementType(source) local theHealth = getElementHealth(source) if theElement == "vehicle" then if theHealth <= 250 then setVehicleEngineState(source, false) setElementHealth(source, 260) else setTimer(preventExplosion1, 1000, 1) end end end
-
You don't have a marker from onMarkerHit event. local ingang1 = createObject(980, -1907.9000244141, 2172.8999023438, 3.2000000476837, 0, 0, 0) local ingangmarker = createMarker(-1907.9000244141, 2172.8999023438, 3.2000000476837, "cylinder", 5, 0, 0, 0, 0) function moveGate1(hitElement, matchingDimension) local airForce = getPlayerTeam(hitElement) == getTeamFromName("AirForce") local army = getPlayerTeam(hitElement) == getTeamFromName("Army") if getElementType(hitElement) == "player" then if airForce or army then moveObject(ingang1, 3000, -1907.9000244141, 2172.8999023438, 9) end end end addEventHandler("onMarkerHit", ingangmarker, moveGate1)
-
Do you have: folder inside the resources folder, meta.xml, server.lua (if server-sided), client.lua (if client-sided).
-
Simple as this: https://wiki.multitheftauto.com/wiki/Scr ... troduction
-
... setPlayerNametagShowing
