-
Posts
24 -
Joined
-
Last visited
Everything posted by iPot
-
It's a example built-in function. Like getPlayerName etc.. No didn't solve it. EDIT: Fixed.
-
Nope, doesn't change a thing. Like I expected. I used previous addCommandHandlers and functions (very basic ones) but with the same variables and it worked perfectly.
-
Thank you very much It works perfectly, where is the tutorial that explains the part I missed apparently? In theory this loop should work but it doesn't. How come? I defined variable2 and thePlayer btw. function testFunction() local variable = getVar(thePlayer) outputChatBox("Debug message",thePlayer) if (variable == 0 ) then if (variable2 == false) then outputChatBox("Debug message",thePlayer) takeAction() testFunction2() end end end function testFunction2() local variable = getVar(thePlayer) if (variable ~= 0) then outputChatBox("Debug message",thePlayer) takeAction2() testFunction() end function takeAction() -- Do things. testFunction() end function takeAction2() -- Do different things. testFunction() end addCommandHandler("command", testFunction) EDIT: I don't even get the first debug message in testFunction()
-
Should I use AddEvent/AddEventHandler here? Or are there other options. Like in GTA SA scripting you could just type JUMP @label. then I could use JUMP @otherFunction. It's not like that but that's why I came here, to ask. function testFunction testvariable = getTestData(aDude) if (testvariable == true) then -- go to otherFunction end end function otherFunction -- blablabla end bindKey(fire,both,testFunction) Already thanks. iPot PS: Nice tabbing for a newb huh?
-
Sorry for the offtopic but are you Puma from gtaforum.nl?
-
I was doubting if it existed (https://wiki.multitheftauto.com/wiki/Req ... and_Events). Secondly, that's exactly what I want seb. Like this would output a number from 0 - 12 test = getRadioChannel(thePlayer) outputChatBox(test) I will definitely do that So is there a way around this without changing the channel to 0?
-
Does this function even work? local radio = getRadioChannel(thePlayer) setRadioVolume(radio,0) iPot
-
It's been 2-3 years since I've been here and I'm picking MTA back up now. I'm wondering if there still doesn't exist a tool such as a MTA:SA --> MTA:DM map converter. Can't seem to find it in the list, only other conversion tools.
-
I got my dff, txd and col ready for use. Made a meta with a reference to them. But now I have to know how to spawn/create the objects ingame. Everyone who's going to help me, thank you I made this script, but nothing happens but no errors are given too.. function mapLoad ( name ) txd_weedisland = engineLoadTXD("weedisland.txd") engineImportTXD(txd_weedisland,3374) col_weedisland = engineLoadCOL("weedisland") dff_weedisland = engineLoadDFF("weedisland", 0 ) engineReplaceCOL(col_weedisland,3374) engineReplaceModel(dff_weedisland,3374) createObject ( 3374, 3092.17, -2054.60, 0.0, 0, 0, 0 ) end addEventHandler ( "onResourceStart", getRootElement(), mapLoad )
-
Hey all, I got this error bad argument in line 3. Can anyone help me? Just started today with LUA function GiveMoney( thePlayer, reward, receiver ) if ( receiver ) and ( receiver ~= thePlayer ) then givePlayerMoney ( receiver, 10000 ) else outputChatBox("Syntax error: /reward <receiver>", thePlayer, 255, 0, 34, false ) end end addCommandHandler( "reward", GiveMoney )
-
Well thank you I guess i deleted some wrong stuff Tom
-
Here are all my code's now : Meta for gamemode: <meta> <info author="Underworld" name="Bla" version="1" type="gamemode"/> <config src="help.xml" type="client" /> <script src="spawn.lua" /> </meta> Spawn script: function startMap(startedMap) local mapRoot = getResourceRootElement(startedMap) local players = getElementsByType("player") fadeCamera ( thePlayer, false, 1.0, 0, 0, 0 ) for key, player in pairs(players) do local spawn = spawns[math.random(1, #spawns)] local posX = getElementData(spawn, "posX") local posY = getElementData(spawn, "posY") local posZ = getElementData(spawn, "posZ") local angle = getElementData(spawn, "angle") spawnPlayer(player, posX, posY, posZ, angle) end end addEventHandler ( "onGamemodeMapStart", getRootElement(), startMap ) --------------------------------------------------------------------------------------------------------------- Meta for the map: <meta> <info author="Underworld" description="map" version="1" type="map" gamemodes="Bla"/> <map src="Bla.map"/> </meta> And here, the map: <map> <spawnpoint posX="2495.1257324219" posY="-1686.6124267578" posZ="13.513834953308" angle="3.4530944824219"/> <spawnpoint posX="2519.9204101563" posY="-1678.9359130859" posZ="14.879755020142" angle="91.500610351563"/> <spawnpoint posX="2509.6416015625" posY="-1654.0524902344" posZ="13.655654907227" angle="135.68103027344"/> <spawnpoint posX="2487.0036621094" posY="-1647.6352539063" posZ="14.0703125" angle="181.4281463623"/> <spawnpoint posX="2471.869140625" posY="-1686.2700195313" posZ="13.5078125" angle="325.85275268555"/> <spawnpoint posX="2469.6413574219" posY="-1650.4163818359" posZ="13.471806526184" angle="183.62147521973"/> <spawnpoint posX="2452.4020996094" posY="-1646.6909179688" posZ="13.468873977661" angle="178.92138671875"/> </map>
-
Now I feel like an idiot [20:52:03] ERROR: .../server/mods/deathmatch/resources/Headcrab/spawn.lua:7: empt to get length of global 'spawns' (a nil value)
-
There's another 1 [20:24:07] SCRIPT ERROR: ...Program Files/MTA DM/server/mods/deathmatch/resource s/Headcrab/spawn.lua:8: ']' expected near 'local' [20:24:07] INFO: Loading script failed: ...Program Files/MTA DM/server/mods/deat hmatch/resources/Headcrab/spawn.lua:8: ']' expected near 'local' I used the exact code as you said. Tom
-
I got this code here wich gives an error where I can't find the solution for. Anyone that can help is thankful. Here's the error btw: [19:26:43] SCRIPT ERROR: ...Program Files/MTA DM/server/mods/deathmatc s/Headcrab/spawn.lua:13: unexpected symbol near ')' [19:26:43] INFO: Loading script failed: ...Program Files/MTA DM/server hmatch/resources/Headcrab/spawn.lua:13: unexpected symbol near ')' And here's the code: function startMap(startedMap) local mapRoot = getResourceRootElement(startedMap) local players = getElementsByType("player") fadeCamera ( thePlayer, false, 1.0, 0, 0, 0 ) for key, player in pairs(players) do local spawn = spawns[math.random(1, #spawns)] local posX = getElementData(spawn, "posX") local posY = getElementData(spawn, "posY") local posZ = getElementData(spawn, "posZ") local angle = getElementData(spawn, "angle") spawnPlayer(player, posX, posY, posZ, angle)) end end addEventHandler("onGamemodeMapStart", getRootElement(), startMap Tom
-
http://www.gtaforum.nl/index.php?showto ... 42&st=40 Look here
-
I'm making my own gamemode and while fixing much errors in the meanwhile i can't get past this 1.. What does it means ? Any help ? [23:12:36] start: Failed to start resource 'Species wars' [23:12:36] ERROR: mapmanager: map resource could not be started. [23:12:36] ERROR: call: Check the function exists, is exported and you've passed the correct arguments Thank you, Tom
-
I completely agree with SanZor..
-
I noticed these bugs : - In the server browser we can't get back to the main menu, i tried to push escape but nothing. - In the votemode hay i noticed that sometimes when you fall down and smash the floor that you get the landing animation. After that he stands up right and then suddenly again after 1 second he starts another animation and falls off (mostly) - Spectate mode is very bugged, moslty it doesn't works when trying to switch players. Why doesn't it defaults spectate if your not playing ? - There was already a topic about this 1 About DM and SA installed both. Tom
-
Omg.. I would like to keep on playing..
-
Type /votemode .
-
This may sound dumb, but i fucked up the hay script with messing around with it Can ayone send me the hay.rar from recources ? Tom
-
I don't know if serveral people have this weird (thing). But everytime i click Download i get this text: Rar!ϐs Qvt4y60PublicReleaseScripts't CNpP [63# PublicReleaseScripts\MTA-PRS1.3.mrc@yU>kiƳ-8O$<32nܭW?N5nԚ<̟wKNL&ێn{24AI_(AD?J:w*?eǛճQe dq`!wXa)4}1;lE~ ù1 H~Oϳ㻧ǝߞ%z--W6 ../] rW;qh*`_@Y>J|x8oHkn ud E鿋^ߕ4B@C(rqDQI1}ٝ( ?ixEȟOI{L_}n<Ïw/}ffhsGG AJ( }SLL}9`F(O00} ;}Wx0]N0^2nޞ)~- wM7 y}Kθ1pvBbc01Ɋ`[OAX)/D(sЭvgyDЫ.{.S-40gKJ%I,A} pph6EťjS-ܯ]2ЋMw2kw/8yv"`TB.O|=8}?|-dw@Qnb2g bh Yn0 !x`\%1'#=>_Ngbf$b2`@ɑ`Lp<?%,gԨ`4ח)q؉.tZi.LsNxc8I Xjǰeb=91XPS@Pp3)9wwIWrI^9[(]6L(&k$D^[,Z;-?1oI?/uR|Mr@'{ɂjxܢKsՇ`|-3!mß4E?ԁ;!NTq7SfJmf `FtqAM&p39n#0ybe+MSAUAx` j3x8H[)E?=]MǢXY?O*F I?Q u%}ybHH~*!&/TAQ(e s4!,< $X*4 6jRhD And it continous for half a page. What's this and why can't i just downlaod it ? Tom And why is this forum so, .. inactive i've posted like days ago in the mapping forum and no1 answers On my forum it takes axproximattely 10 minutes.
-
As i was thinking i thought of this: All the GTA SA models are defined in some files in de objects folder in the MTA installation folder. So if we make a new model and make a dff, txd and col of it and add those to the gta3.img and add the name of it the a new folder and file in the objects folder of MTA the objects should appear ? Or not ? Please leave a comment or give me some help ! Tom