Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. I don't think the fire creation can be removed from an explosion. But you could try to use another type of explosion. event > cancelEvent() > createExplosion https://wiki.multitheftauto.com/wiki/OnClientExplosion https://wiki.multitheftauto.com/wiki/CancelEvent https://wiki.multitheftauto.com/wiki/CreateExplosion
  2. I don't think bad ping has anything to do with active mods. It is more the download you have to worry about.
  3. IIYAMA

    LUAC Help

    Well, you could ask your friend to create global variables in a not compiled file. So you don't have to edit the luac file.
  4. Correct.
  5. If the event never gets called, you don't know when you have to warp him in to it. (and yes I tested it) So no way around it, lets sit back and relax.
  6. I don't think so, it probably would be interrupting the system.
  7. Then you have to edit the slothbot and base teams on elementdata instead of teams.
  8. Why don't you set him in your team?
  9. I think, the bot is thinking for himself. So he has it's own priority. Setting him to following, will only have result when there is nothing to shoot at. But it is just a guess, since I took a peek in the resource a while ago.
  10. You could try: https://wiki.multitheftauto.com/wiki/OnPlayerCommand and try to use a timer with 50 ms, to check if he logged in. https://wiki.multitheftauto.com/wiki/IsGuestAccount
  11. lol, your previously code was better. Yet, mihayy5 his code is still the best solution, since getElementData only returns nil when the code fails, otherwise false. @Dolinho Make sure you only send the message to the correct player. Which you can set up in the outputChatBox function.
  12. IIYAMA

    Second Rhino

    dirty hax? It is just a simple overwrite using lua, if you know a little bit lua this isn't a big deal.
  13. Resources: Everything else about resources.
  14. Wrong section.
  15. IIYAMA

    Online time

    Wrong section.
  16. setElementModel isn't in the code you posted, pls get serious or I will stop helping you.
  17. How did you set-up your triggerServerEvent(??????) ?
  18. setplayerteam(source,team) setPlayerTeam(source,team) cancelEvent cancelEvent() Even so, cancelEvent has no function in this set-up.
  19. IIYAMA

    getAccountData

    np.
  20. IIYAMA

    getAccountData

    You don't need to know the password, it is optional. account = getAccount ( string username ) -- or account = getAccount ( string username [, string password ] ) [ string password ] = optional
  21. IIYAMA

    getAccountData

    https://wiki.multitheftauto.com/wiki/GetAccount https://wiki.multitheftauto.com/wiki/Ge ... tsBySerial
  22. Your mistake: Parameters string fileName, bool success fileName: the file downloaded. success: whether successful or not. https://wiki.multitheftauto.com/wiki/On ... adComplete Success isn't the first parameter/variable!
  23. Try something like this: Client: addEventHandler("onClientPreRender",root, function () local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle and local i, firstPlayer = next(getVehicleOccupants(vehicle)) if firstPlayer == localPlayer then if getElementHealth(vehicle) < 250 and not isVehicleDamageProof (vehicle) then setVehicleDamageProof(vehicle,true) triggerServerEvent("blowUpVehicle",vehicle) end end end end) Server: addEvent("blowUpVehicle",true) addEventHandler("blowUpVehicle",root, function () if isElement(source) then setVehicleDamageProof(source,true) local x,y,z = getElementPosition(source) createExplosion (x,y,z,0,client) local players = getVehicleOccupants(source) if players and next(players) then for i,player in pairs (players) do killPed(player) -- add here peds or something like that. end end end end)
  24. IIYAMA

    math problem

    np.
  25. IIYAMA

    math problem

    Because results is defined 2 times and the one inside the function is a local. function divideThisValue(value) local value = value local splitUpInParts = 5 ------ local valuePeaks = (100/splitUpInParts)/100 local results = {} local valueInParts = math.floor((value/splitUpInParts)+0.5) local valueTotal = 0 for i=1,splitUpInParts-1 do local peak if math.random(2) == 1 then peak = math.random(math.floor((valueInParts*valuePeaks)+0.5)) else peak = -math.random(math.floor((valueInParts*valuePeaks)+0.5)) end local result = valueInParts+ peak results[#results+1] = result valueTotal = valueTotal+result end results[#results+1] = value - valueTotal return results end addEvent("onEstimatingOver", true) addEventHandler("onEstimatingOver", root, function() onFactoryWindowClose() if estimating then estimating = false end local valueof = tonumber(getElementData(getLocalPlayer(), "Rocks:iron")) or 0 if guiGetVisible(GUIEditors.window[1]) then local results = divideThisValue(valueof) if results then local copper = results[1] or 0 -- if it fails some how, which probably will not happen. local bronze = results[2] or 0 local silver = results[3] or 0 local iron = results[4] or 0 local gold = results[5] or 0 guiSetText(GUIEditors.copper, tostring(copper).." grams\n"..tonumber(copper*25).."$") guiSetText(GUIEditors.bronze, tostring(broze).." grams\n"..tonumber(bronze*35).." $") guiSetText(GUIEditors.silver, tostring(silver).." grams\n"..tonumber(silver*45).." $") guiSetText(GUIEditors.iron, tostring(iron).." grams\n"..tonumber(iron*46).." $") guiSetText(GUIEditors.gold, tostring(gold).." grams\n"..tonumber(gold*60).." $") end end end)
×
×
  • Create New...