Jump to content

IIYAMA

Moderators
  • Posts

    6,062
  • Joined

  • Last visited

  • Days Won

    208

Everything posted by IIYAMA

  1. 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)
  2. That sounds like a data overflow. or even worse, server using HDD as ram.
  3. 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.
  4. I wrote this before, and I disable it after I noticed what would happen, not my mistake....... try again my sample.
  5. 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)
  6. c panel is good for moderators(download) or manage your acl.
  7. 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 )
  8. if ll > 0.1 or ll < -0.45 then return end
  9. 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
  10. 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!
  11. 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?
  12. 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.
  13. 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)
  14. It isn't about the server, it is about the upload from the players. Some players do have very very slow internet. Since the player is the one that need to upload to the server and the download from the server is always doing almost very less, it could reduce some lagg. New players: and the pity is that the new players, who going to play mta, (+economical crisis) don't have enough money for good internet/ pc's. My server is getting full with people with bad ping's, most of them Spanish. They join with 300/400+ ping, that is just unfit able for the only good stealth server. 0.4 seconds their connection + instable ping that cause lots of teleportation. The only thing that can kill them is my own version of syncro..... all death-match servers are fucked up. The worse thing is that most of them can't even speak a word English.
  15. Will there come a function that can set this camera update on and off per player? because sending data from client to server, when I don't use camera matrix(or other function that require this), it will be a wastage of the bandwidth. It can also be done by triggering, only I am not sure if that will give more lagg/bandwidth.
  16. If I don't use this, can I set it to 1 sec per update time?
  17. local weapon = createWeapon("mp5",0,0,0) --Create a Mp5 at the Cordinates 0,0,0 function fireWeapon () setWeaponState ( weapon,"firing") end
  18. local pX, pY, pZ = getElementPosition (vehicle) local xR,yR,zR = getElementRotation (vehicle) math.pi () -- or 3.141592653 math.cos () math.sin ()
  19. camera_sync_interval Source wiki mta: How often to tell the server of any client side changes to the local players camera position and target. Probably this function will use this: (getcameraMatrix) at server side. (not client) https://wiki.multitheftauto.com/wiki/GetCameraMatrix What important functions are using this, because I don't know why I should need this. It is only taking bandwidth. I even get the feeling it is some sort of spy camp.
  20. https://wiki.multitheftauto.com/wiki/Get ... onProperty
  21. I reply this because of andrel his reply. Maybe you want this. addEventHandler("onPickupHit",root,function(player) local theType = getPickupType ( source ) if theType == 2 then giveWeapon ( player, getPickupWeapon ( source ), getPickupAmmo ( source ), false ) elseif theType == 1 then setPedArmor ( player, getPedArmor ( player ) + getPickupAmount ( source )) elseif theType == 0 then setElementHealth ( player,getElementHealth ( player) + getPickupAmount ( source )) end cancelEvent() end) -- the maximum health is 200 and only able to reach that with full skill level. It will probably set to the highest possible health(depends on the skill level). (armor is 100)
  22. no, everything server. Gui of course client etc.
×
×
  • Create New...