Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. Copy my code again.
  2. addCommandHandler('csw', function (player,CMD,Weather) Weather = tonumber(Weather) if Weather then setWeather(Weather) --local Weather = getWeather () outputChatBox("The weather is currently: "..Weather, player) end end)
  3. Are you color blind? Because wiki says the color is orange. While you turned in to red.
  4. loss == 50 loss Those are parameters of the event, you can't change values of parameters inside the ( ). You have to do that after that. local playerDamage_text = function ( attacker, weapon, bodypart, loss ) if bodypart == 9 then local health = getElementHealth(source)+loss-- get the health of the past. local newHealth = health - 50--get the new health if newHealth > 0 then setElementHealth(source,newHealth) else killPed(source, attacker, weapon, bodypart) end outputChatBox ( "Headshot!", source, 255, 170, 0 ) end end addEventHandler ( "onPlayerDamage", root, playerDamage_text )
  5. IIYAMA

    partial circle

    Enable this: https://wiki.multitheftauto.com/wiki/Dx ... entEnabled In the dxDrawPartialCircle function block.
  6. by spread over more files. Or check this out: https://wiki.multitheftauto.com/wiki/SaveMapData
  7. YOU ARE BAD, HA! @spAik cheers for 1.4 when it comes out! local Files = { ":admin3R/client/images/warning.png",--1 ":admin3R/client/images/error.png",--2 ":admin3R/client/images/question.png",--3 ":admin3R/client/images/info.png",--4.... ":admin3R/client/images/dot.png", ":admin3R/client/images/search.png", ":admin3R/client/images/dropdown.png", ":admin3R/client/images/colorscheme.png", ":admin3R/client/images/empty.png", ":admin3R/client/colorpicker/sv.png", ":admin3R/client/colorpicker/cursor.png", ":admin3R/client/colorpicker/blank.png", ":admin3R/client/colorpicker/h.png" } local downloadIndex = 1 local downloadTimer local downLoadFilesInTime = function() local result = false repeat local file = Files[downloadIndex] if file and not fileExists(file) then result = downloadFile(file) -- downloading ? true/false end downloadIndex = downloadIndex+1 -- count up 1,2,3,4..... until result or downloadIndex > #Files -- if those conditions are true, it will stop looping. if downloadIndex > #Files and isTimer(downloadTimer) then killTimer(downloadTimer) end end local downloadFiles = function () downloadTimer = setTimer(downLoadFilesInTime,1000,#Files)-- a timer for downloading end addEventHandler("onClientResourceStart", root, downloadFiles) addEventHandler("onClientFileDownloadComplete", root, downloadFiles)
  8. IIYAMA

    Hex Color

    Don't be sad. They just gave you everything you need and it is still not good enough for you, what a shame. Anyway there is copyright on that script, you should not post copyright scripts on this forum. Or didn't you noticed that?
  9. IIYAMA

    Job [HELP]

    2 days have past, not a week, stupid the drama. If nothing happens then you did it incorrect. An infinity loop can't be infinity when you break it, by putting a statement on it. Also heard of the isElement function? If you like warnings/errors, then use it not. https://wiki.multitheftauto.com/wiki/IsElement
  10. IIYAMA

    Job [HELP]

    Why don't you prevent the job can be executed twice? Or is my answer so not logic..... seriously -_-" and stop triple bumping, it is annoying.
  11. blueBerryRally = { } blueBerryRally[1] = { 679.20001, 312.39999, 18.9 } blueBerryRally[2] = { 588.70001, 294.60001, 17.7 } blueBerryRally[3] = { 530.29999, 249.8, 13.9 } ... blueBerryRallyReversed = { } blueBerryRallyReversed[1] = { 675.70001, 312.79999, 18.9 } blueBerryRallyReversed[2] = { 785.59998, 330.10001, 18.9 } blueBerryRallyReversed[3] = { 892.70001, 359.5, 18.9 } local raceCheckpointTable = {["blueBerryRally"]=blueBerryRally,["blueBerryRallyReversed"]=blueBerryRallyReversed } you can convert them using another table or you can put those tables in your random table.
  12. I you aren't clear what you want. You are talking about getting all race maps and take a random one out of it. and then you are starting talking about a race element, which can be the race resource element that, would be more logic when you started talking about a random map. Which I just answered. Or you mean an element from that map. Which I would answer with this: local newTable = {} local raceNameForMarker = raceActive["participate"] local meetingPoint = createMarker ( raceNameForMarker[1], raceNameForMarker[2], raceNameForMarker[3], "checkpoint", 6, 116, 237, 5, 255 ) -- """"""how can I use this table element to make name for table to use:"""""" newTable[meetingPoint] = {"this is a sexy marker!"} -- store a table under an element userdata. You information is confusing, which means not much people(except me) would reply on this topic.
  13. use at SERVER side, when it is about maps https://wiki.multitheftauto.com/wiki/GetResourceName
  14. You can't bind anything without a player? addEventHandler("onResourceStart",resourceRoot, function() local players = getElementsByType("player") for i=1,#players do bindKey ( players[i], "l", "down", open ) end end) addEventHandler("onPlayerJoin",root, function() bindKey ( source, "l", "down", open ) end)
  15. Probably because the resource element can't be send of to clients. You should only send the names. function getservermapsnow() local raceResource = getResourceFromName("race") if raceResource then local themaps = exports.mapmanager:getMapsCompatibleWithGamemode(raceResource) if themaps then local mapNames = {} for i=1,#themaps do local name = getResourceName(themaps[i]) if name then mapNames[#mapNames+1]= name end end if #mapNames > 0 then triggerClientEvent(source, "sendbackservermaps", root, mapNames) end end end end addEvent("clientrequestservermaps", true) addEventHandler("clientrequestservermaps", root, getservermapsnow)
  16. Also blips will be visible to new players. Because root only included the players that are inside the server at that moment.
  17. https://wiki.multitheftauto.com/wiki/Meta.xml study more, my friend NOOB Well my friend, you should study logic. Since your answer is far from the that. xXMADEXx +1
  18. @YOGA.... Nobody can use files which aren't downloaded.
  19. I just solved your warning, which was the question you asked. Be more clear if you have more questions.
  20. function identTarg ( targettedElement ) if targettedElement and getElementType ( targettedElement ) == "object" and getElementModel ( targettedElement ) == 2922 then end end addEventHandler ( "onPlayerTarget", getRootElement(), identTarg ) Read wiki....
  21. Just get all the data from the xml and save it in a table. Then send the table and it works well... If this isn't the answer you are waiting for, then rewrite your question, because it isn't giving enough information about the problem you have. Lua functions are very fast you don't have to worry about a few loops. And if you are still not sure about that you can use getTickCount() to check your code speed.
  22. By call/exporting the table. https://wiki.multitheftauto.com/wiki/Call Just the same as calling functions. You mean export to another resource or export to another file?
  23. He doesn't have to. He says it can't be done that way. The health must be set manually/scripting to create that effect.
×
×
  • Create New...