Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. timers lagg... https://wiki.multitheftauto.com/wiki/GetTickCount local lastTickCount = 0 addEventHandler ( "onClientRender", root, function () if getTickCount() - lastTickCount > 300/getGameSpeed() then --Divided by gamespeed to reduce bugs. lastTickCount = getTickCount() end end end)
  2. Make sure the file is also there.
  3. getElementPosition = middle of the ped (0) The distances from the body (middle of the ped) is circa 0.6. (depends how long this ped is) The lines starts 1.4 a both the head of the ped.
  4. - java/php yes. - lua no.
  5. Well then there isn't anything wrong with the source...... Go to your server, login as admin, write /debugscript 3, start the map. and tell me why it doesn't start. If you can't tell me what went wrong, I can't help you.
  6. any errors? /debugscript 3 Did the script even started? outputChatBox("started!") -- outside of the functions.
  7. Post your meta + lua file.
  8. I don't think they are functional in .lua . But I also don't think they will cause lagg or increase speed.
  9. This has nothing to do with mapping, but with scripting. https://wiki.multitheftauto.com/wiki/PlaySound playSound("music.mp3") -- require client .lua file.
  10. local clearpath = isLineOfSightClear(px, py, pz+2, x, y, z-2, true, true, false, true, false, true, false)-- -2 ignoredElement: Allow the line of sight to pass through a certain specified element.
  11. IIYAMA

    Players

    Listen to solidsnake, check always what the parameters are. Also what the source is. Important --> https://wiki.multitheftauto.com/wiki/OnMarkerHit function robar(element) local count = 0 if not "player" == getElementType(element) then -- always check. return end local player = element for k, i in ipairs( getPlayersInTeam( getTeamFromName( "Criminal" ) ) ) do if isElementWithinMarker( i, bankMarker ) then count = count +1 end end if count > 1 then outputChatBox("El robo comenzara en 30 segundos", count, 255, 0, 0) setTimer( function (player) setPlayerWantedLevel ( player, 6 ) outputChatBox("Estan robando el Banco de LS", getRootElement(), 255, 0, 0, false) outputChatBox("Espera 5 minutos para escapar y conseguir el dinero", player, 255, 0, 0, false) setElementData(player, "Occupation", "Robando") setElementData(player, "mfbankrob", "Robando") setTimer( function ()-- thePlayer = nil (not def), you already have "player" local bolsadinero = createObject ( 1550, 355.664, 174.16, 1008.38 ) setElementInterior( bolsadinero, 3, 355.664, 174.16, 1008.38 ) local dinero = createMarker( 355.664, 174.16, 1007, "cylinder", 2, 255, 0, 0, 50 ) setElementInterior( dinero, 3, 355.664, 174.16, 1007) addEventHandler("onMarkerHit", dinero, function (hitElement) if (getElementData(hitElement, "mfbankrob", true) == "Robando") then setElementData(player, "mfbankrob", "Robado")-- not to much outputChatBox("Rapido!! Sal de la zona del robo para ganar el dinero!", hitElement, 0, 200, 0, false) end end ) end , 2000, 1 ) end , 1000, 1 ) else outputChatBox("Se nesecitan mas de 5 criminales", count, 0, 255, 0) end end addEventHandler("onMarkerHit", bankMarker, robar)
  12. That sounds like a data overflow. or even worse, server using HDD as ram.
  13. or overfull tables and to much element data. (If the server never get restarted.) also, mta just get heavier and most of the pc's get older.
  14. I wrote this before, and I disable it after I noticed what would happen, not my mistake....... try again my sample.
  15. You also don't update the health. This isn't your code right? -- local localPlayer = getLocalPlayer() -- not needed local screenWidth, screenHeight = guiGetScreenSize() local ax, ay = screenWidth - 34, 0 addEventHandler ( "onClientRender", root, function () local health = getElementHealth( localPlayer ) if (health <= 50) then dxDrawImage(ax,ay,32,37,"images/lowhp.png") if (health <= 10) then local getTickStart = getTickCount () getTickStart = math.floor(getTickStart / 1000) if math.mod(getTickStart, 2) == 0 then dxDrawImage(ax,ay+37,32,37,"images/bleeding.png") end end -- ax = ax - 34 -- wtf? fly down? end end end)
  16. c panel is good for moderators(download) or manage your acl.
  17. Note: don't destroy your tabs, else it will be unclear for everybody. function llChange ( me, command, ll ) if (exports.global:isPlayerAdmin(me)) then ll = tonumber ( ll ) local veh = getPedOccupiedVehicle ( me ) if ll and veh then if ll > 0.1 or ll < -0.45 then outputChatBox ( "Don't be a twat", me, 255, 0, 0 ) return end local success = setVehicleHandling ( veh, "suspensionLowerLimit", ll ) if success then outputChatBox ( "The vehicle's lower limit has been changed to: ".. ll ..".", me, 0, 255, 0 ) else outputChatBox ( "Changing lower limit failed. You're probably using an invalid limit.", me, 255, 0, 0 ) end elseif not veh then outputChatBox ( "You're not in a vehicle", me, 255, 0, 0 ) elseif not ll then outputChatBox ( "Syntax: /sll [0.1 to -0.45]", me, 255, 0, 0 ) end end end addCommandHandler ( "sll", llChange )
  18. IIYAMA

    Players

    np.
  19. np.
  20. if ll > 0.1 or ll < -0.45 then return end
  21. if ll > 10 then return end This kind of limits???? if you want more you can put it in a table. local Limit = {1,4} outputChatBox(Limit[2]) --4
  22. IIYAMA

    help

    You have to choose an object to replace. just pick a big object, like a sandbank at the bottom of the ocean. To add to mta:(script) https://wiki.multitheftauto.com/wiki/EngineLoadDFF Good luck!
  23. So you have a map you can't open? - check the syntax of the map - or it can be the spawnpoints.(cut them out of it and put them in a text file, load again the map. Finish the map and add the spawnpoints) or your editor is bugged at the moment? - Is the map still in memory? - Is the map in the editor_dump?
  24. Just be careful, it is the only thing you need to know. Tips: - Shut down first all gamemodes before you start the editor. - Shut down the editor before start other resouces/gamemodes. - Don't use bugged edf's. - Start the server inside the mta folder instead of start it inside mta, if has been crashed you won't lose you work.
  25. IIYAMA

    Players

    Not tested: function robar() local count = 0 for k, i in ipairs( getPlayersInTeam( getTeamFromName( "Criminal" ) ) ) do if isElementWithinMarker( i, bankMarker ) then count = count +1 end end if count > 5 then outputChatBox("Esto es un test", count, 255, 0, 0) else outputChatBox("Se nesecitan mas de 5 criminales", count, 0, 255, 0) end end addEventHandler("onMarkerHit", bankMarker, robar)
×
×
  • Create New...