Jump to content

IIYAMA

Moderators
  • Posts

    6,063
  • Joined

  • Last visited

  • Days Won

    209

Everything posted by IIYAMA

  1. IIYAMA

    onPlayerFinish

    Because DD has no finish. For normal race use: "onPlayerFinish" [color=#00FF00]player[/color] = source [color=#00FF00]rank[/color] = argument1 [color=#00FF00]time[/color] = argument2
  2. IIYAMA

    onPlayerFinish

    No, stay of it. Add this to your code. addEvent("onPlayerWinDD", true) addEventHandler( "onPlayerWinDD", root, function() outputChatBox("You won the game!",source) end)
  3. IIYAMA

    onPlayerFinish

    It is, when it is a dd map. Open your race zip/folder. Open the folder called "modes". There is a file called "destructionderby.lua".(open it) When you scroll down to line 74 you see this: triggerEvent( "onPlayerWinDD",activePlayers[1] ) Which makes it work, so don't be sad. addEvent("onPlayerWinDD", true) addEventHandler( "onPlayerWinDD", root, function() outputChatBox("You won the game!",source) end)
  4. IIYAMA

    onPlayerFinish

    Use: "onPlayerWinDD"
  5. IIYAMA

    Save vehicle

    https://wiki.multitheftauto.com/wiki/ToJSON By using tojson and fromjson to save more then one id.
  6. IIYAMA

    about gui

    That is not how I can help you. I am only helping people who are trying to write the code by them self. When they do, I will correct the code and give tips/examples. So give it another try.
  7. IIYAMA

    about gui

    Use onPlayerLogout. https://wiki.multitheftauto.com/wiki/OnPlayerLogout You don't need the isGuestAccount function with those events. onPlayerLogin = account onPlayerLogout = guestAccount
  8. IIYAMA

    Table problem

    You never know, because I have the feeling he has more items inside his table then he is showing us at the moment. He may have defined one with a string or even a userdata. If you want to know what is going wrong, you have to keep open all options and possibility's.
  9. Just simply use localPlayer inside your whole client code. It is a predefined variable and it is shorter so you have to write less characters. (and it is 1 ms faster then getLocalPlayer(), because it isn't a function.) .
  10. IIYAMA

    Table problem

    There is only 1 way to find out. Which a scripter should first do, before posting his code here on the forum. ALSO KNOWN AS DEBUGGING jobsLocation = { {job = "Police Officer", x = 249.6259765625,y = 67.8125,z = 1002.9, r = 67, g = 156, b = 255, interior = 6 , dimension = 1 , team = "Police Force", skin = {280, 281, 282, 283, 284, 288}, jobEvent = "policeTaken", maxWL = 0, description =" bla bla bla bla bla"} } function ceateJobLocations() for index, val in pairs(jobsLocation) do local marker = createMarker(val.x, val.y, val.z-0.5, "cylinder", 1.5, val.r, val.g, val.b, 255) if marker then name[marker] = val.job local dimension = tonumber(val.dimension) if dimension then setElementDimension (marker, dimension ) else outputDebugString("Failed to set dimension, variable is nil/false. Table index: " .. index .. " .") end local interior = tonumber(val.interior) if interior then setElementInterior (marker, interior) else outputDebugString("Failed to set interior, variable is nil/false. Table index: " .. index .. " .") end addEventHandler("onMarkerHit", marker, enteredMarker) else outputDebugString("Failed to create marker. Table index: " .. index .. " .") end end end addEventHandler("onResourceStart", resourceRoot, ceateJobLocations)
  11. Not for me, I get warnings with userdata's which aren't converted with tostring,
  12. Well it Works, only the outputChatBox doesn't work. Userdata's must be convert to a string before they can be showed in the chat.
  13. Voor mensen die graag een potje stealth willen spelen. Ook als je niet zo een deathmatch fan bent, met vrienden is het altijd leuk. De stealth gamemode is volledig gepatched inclusief extra mta syncs. Staff plekken vrij, zie onderaan de pagina. Extra informatie: (deze informatie is niet altijd even correct, omdat ik de stealth mode heb aangepast/gefixed) Om deze gamemode goed te spelen is het belangrijk dat de ping lager is dan 150, als deze toch hoger is dan heb je een nadeel in deze server. Je ping zal waarschijnlijk 60 of lager zijn, de server staat tenslotte in Nederland. Nooit geschoten is altijd mis en proberen kan nooit kwaad. P.s: Er zijn nog veel staff plekken open. mod > smod > staff_admin. Op aanvraag via pm, zijn deze te verkrijgen. Benodigde voor deze posities: geen misbruik van rechten voor eigen doeleinde en niet janken/huilen of what ever. klik hier om de server te joinen!
  14. It does not wrap to a new line =( local message = "bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla" dxDrawText(message, screenx/2, screeny/2, 300, 300, tocolor(50, 50, 50, 255), 0.5, smallarial, "left", "top", false, true, false) I had the same problem in one of my scripts. It seems it doesn't work afaik.
  15. ah, thank you very much again.
  16. Thank you very much, I am not very good with string formats.
  17. local theString = tostring(2) if string.len(theString) == 1 then theString = 0 .. theString end print(theString) Does anybody knows how to do this shorter? So if there is one character, it will have a zero at front. So: 01 02 03 04 05 06 07 08 09 10-- 2 characters. 11 12 etc.
  18. Yup/(correct), The variable "Timer" received it's value after the setTimer function has returned it's result. Which means the code inside of the function has been loaded before the returning and the Timer variable doesn't exist till then.
  19. Just don't give (compiled) scripts admin, then you will be save for your own admin powers. Only when you trust them for 100%.
  20. IIYAMA

    Team Chat

    Hij wil het ook niet, dit is alleen maar bedelen.
  21. IIYAMA

    I need help

    Then the code isn't executed.
  22. You sure it is a player and not a ped?
×
×
  • Create New...