Jump to content

subenji99

Members
  • Posts

    264
  • Joined

  • Last visited

Everything posted by subenji99

  1. Next time, use /debugscript 3 in-game. It certainly would have given an error about that line.
  2. We cannot see how you are triggering "onPlayerInteriorWarped", which is important seeing as it is a custom event. However, if getElementInterior(source) is returning 0, there are only 2 reasons I can think of for that: 1. You are specifying the source as the Root Element in your triggerEvent line, not the player. bool triggerEvent ( string eventName, element baseElement, [ var argument1, ... ] ) --baseElement should be your player in this case 2. You are triggering this event before you warp them into the interior. (Even if it's only 1 line above the setElementInterior line, it'll return 0, not the interior id.)
  3. addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () CreateTeamWindow() ... CreateTeamWindow() is a non-existant function in that code. I think you meant to put Teamchooser() there.
  4. https://wiki.multitheftauto.com/index.ph ... ash_screen
  5. While 50p has their eyes examined, I'll point out your mistake, and it's an easy one You can trigger client events to only trigger on specific clients - which is what you want in this case. In your Server file you have: function deathHandler( playerSource ) local zufalldeath = math.random(1, 4) local zufallskin = math.random(7, 288) triggerClientEvent ( "onGreeting", getRootElement()) ... and you can modify that triggerClientEvent call to only trigger for the one player you want - in your case, "playerSource". here's the triggerClientEvent syntax so you can see what we're dealing with: bool triggerClientEvent ( [element triggerFor=getRootElement()], string name, element theElement, [arguments...] ) https://wiki.multitheftauto.com/index.ph ... lientEvent so you modify your triggerClientEvent to: triggerClientEvent ( playerSource,"onGreeting", getRootElement()) --who to trigger for, what event to trigger, who triggered it
  6. subenji99

    Ban list

    No scarface, the admin resource that comes with the 1.0 installer has a broken Bans Tab. (http://code.google.com/p/multitheftauto ... tail?r=425) Install the latest Resources Package into MTA San Andreas\Server\mods\deathmatch\resources, which is currently: http://multitheftauto-resources.googlec ... s-r443.zip
  7. robhol's idea is actually better. We've modified lil_toady's fps resource to display players' fps count on the scoreboard. Now we would like it to always be 2nd to last, with ping last. Under the current system however, that will only work if fps starts after whatever current gamemode is running, or we have to edit every gamemode, modifying each call to the scoreboard, to make it's columns appear #columns -2 instead of the default -1. Such a "weighted" system would work out better.
  8. subenji99

    black screen

    no, it was correct the first time - addEvent first, what I mean is that: addEventHandler("FullTank",getLocalPlayer(),showPlayerFuel) function showPlayerFuel() ... end doesn't work, as the code cannot find the function (it hasn't got that far through the file yet!), whereas: function showPlayerFuel() ... end addEventHandler("FullTank",getLocalPlayer(),showPlayerFuel) works, because when the code executes the event handler line, the function showPlayerFuel has already been loaded into memory by then.
  9. subenji99

    black screen

    Nice to see people do fall for the simple mistakes. your problem is that \ is a C escape character for entering symbols usually parsed by the compiler - in this case, you are escaping " http://www.lua.org/pil/2.4.html simple fix, use 2 \\ like so: bindKey( "\\", "down", changeUnits ) ... unbindKey( "\\", "down", changeUnits ) As for the event handler, have you included an addEvent("FullTank") line? Does the function showPlayerFuel exist BEFORE your event handler line?
  10. Your compiled version doesn't include half of the dependancies that get compiled, such as libehs.so for example. it's the complaint I had with the linux release, so we're running a windows server on VMWare .
  11. http://development.mtasa.com/index.php? ... es/IRCEcho Works in MTA:DM DP2.3, should work with 1.0 too. (just note the alteration in module loading syntax, it no longer requires the file extension) We've been using it for months without problems.
  12. We were playing with ped functions on my test server today and some functions were missing that we could really have used. 1. allow Weapon functions for peds. I found it incredible that "setPedWeaponSlot" exists, but weapon functions such as "giveWeapon" only work on players! i assume this is actually an oversight, or there is another method i overlooked. 2. setPedRotateAt This is what I expected "setPedLookAt" to do,but that only moves the ped's head - not particularly useful. I ended up attempting some complex vector maths to work out the rotation angle to get a created ped to face my player - and failed. While the ultimate ped functions I would like would be to set a ped's "task", even just the simple primary and/or secondary if complex tasks are not possible, these few functions would help out quite a bit for anyone coding with peds in my opinion.
  13. I fixed it for DazzaJay. To clarify, the gamemode resource wouldn't be restarting as it's only a mapchange. While that would destroy the message, that's not the bug. The problem was caused here, in race_server.lua: function unloadAll() clientCall(g_Root, 'unloadAll') if g_RaceEndTimer then killTimer(g_RaceEndTimer) g_RaceEndTimer = nil end if g_RankTimer then killTimer(g_RankTimer) g_RankTimer = nil end local timers = getTimers() for timerKey, timerValue in ipairs(timers) do killTimer ( timerValue ) end Countdown.destroyAll() ... Note the getTimers() that then all get Killed. I fixed by these additions in race_server.lua: function unloadAll() ...{same code as above} for i,player in pairs(g_Players) do setPlayerFinished(player, false) destroyMessage(player) --To destroy any stuck "You have won/You have come xth place" msgs. end destroyMessage(g_Root) --As the Time's Up msg is not stored per-player, but as part of the root element. ... and this edit to util_server.lua: function destroyMessage(player) if g_Messages[player] then --New check as a message may not actually exist. textDestroyDisplay(g_Messages[player].display) textDestroyTextItem(g_Messages[player].textitem) g_Messages[player] = nil end end This put an end to the bug nicely.
×
×
  • Create New...