Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. IIYAMA

    HELP FPS

    function onClientResourceStart ( resource ) if ( guiFPSLabel == nil ) then FPSLimit = 255 / FPSLimit guiFPSLabel = guiCreateLabel ( 0.03, 0.97, 0.1, 0.1, "FPS: 0", true ) FPSCalc = 0 FPSTime = getTickCount() + 1000 addEventHandler ( "onClientRender", root, onClientRender ) else guiSetText ( guiFPSLabel, nil ) destroyElement(guiFPSLabel) guiFPSLabel = nil --? removeEventHandler ( "onClientRender", root, onClientRender ) -- you have to remove it before you can handle it again. end end addCommandHandler("myfps", onClientResourceStart)
  2. IIYAMA

    What is bad?

    Even when you use this: setSkyGradient ( 255, 255 ,255, 255, 255 ,255 ) (/start runcode) /run setSkyGradient ( 255, 255 ,255, 255, 255 ,255 ) ?
  3. ok, well I set the teargas animations now on server side. I am using at the moment something else: getElementsWithinColShape (colshape,"player") after that I start checking the distance of the true elements. I am not sure if this is a better way. I even prefer to share it with you, your idea's gave me a reason to design a deathmatch gamemode. Without that script, I would not even started to build it. https://www.youtube.com/watch?v=IKXARD3__4s&feature=youtu.be Do you have an email I can sent it to? (pm me) I also added something interesting for manage the projectile's syncs.
  4. IIYAMA

    What is bad?

    the numbers are from 0 t/m 255 10 = almost black. try: addEventHandler ( "onResourceStart", resourceRoot, function ( ) local weather = getWeather ( ) if weather == 9 then -- you don't have to use "()" when they aren't needed. setSkyGradient ( 0, 0 ,0, 200, 200 ,200 ) else resetSkyGradient ( ) end end) --You need to use " ()" at moments like this: 100*(100+1) = A -- 100+1 = 101 *100 = 10100 -- When you write it without "()" 100*100+1 = A --100*100 =10000 + 1 = 10001 () is always the first thing you do.
  5. Well it is still unclear as hell for me.... What must happen? What must be Prevented? 1. 2. 3.
  6. Well first check which value gives this boolean(true/false).... I can't help you, if I can't even see the line that went wrong. After that you should trace this value and find the creation of it.
  7. You can see this error as: if 1 == true then -- error Probably one of your export data isn't a number. Maybe: --local weapon = false local weapon = 0 --? As far the syntax, when you don't fill in, it starts at 0. element spawnBot ( float x, float y, float z, int rotation = 0, [ int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil, int weapon = 0, string theMode = "hunting", element theModesubject = nil ] )
  8. I don't get it. State? You mean they get forced to stand still and they aren't on the ground when you kill them? or you mean stop the kill when they kill each other and only the one who dies as last won't die? Well spawn the player instead of reset the health. (spawnPlayer)
  9. What will happen when you spawn him and set him to another dimension? Well then you should try camera matrix, and that also means you have to create your own camera system. Btw: if --[[getElementHealth ( killer ) < 200 and]] getElementHealth ( killer ) > 1 then -- why check a player health a both the 200? max is 200, can't be higher.
  10. Prevent: syntax server: setCameraTarget ( player thePlayer [, element target = nil ] ) setCameraTarget (source) (source is player that died) You should read the wiki page better. https://wiki.multitheftauto.com/wiki/OnPlayerWasted
  11. IIYAMA

    AntiCheat?

    np.
  12. IIYAMA

    AntiCheat?

    ANTI cheat corner: https://forum.multitheftauto.com/viewtopic.php?f=114&t=31716
  13. Well it can: setWeaponProperty(28, "poor", "flags", 0x000002) setWeaponProperty(28, "std", "flags", 0x000002) setWeaponProperty(28, "pro", "flags", 0x000002) but it looks ....
  14. zip's are easy to transfer. and normally zip's are smaller, but I don't think that will matter when we are talking about mta scripts.
  15. solved, my own mistake.
  16. yes, I also had that problem with one of my maps.
  17. Lol it was also your design. (teargas wasn't?) and yes I did rebuild your old core totally. (the anti cheat stuff you did not care about title:"who cares (syncro) ") -- maybe better getElementsWithinColShape ( explCol, "player" ) Your name is on it and it works genius, after the rebuild.
  18. ah yes, thank you I found a tutorial about it. http://lua-users.org/wiki/GarbageCollectionTutorial
  19. ok, it is now clear for me. What is the Garbage collector?
  20. Well guys, http://lua-users.org/wiki/StoringNilsInTables I do it my way. local lossObjectT = 0 function objectTimer () for k, objectTable in pairs (objectExpl) do local Timer = objectTable[2] if Timer then Timer = Timer - 1 if Timer > 0 then objectExpl[k][2] = Timer else objectExpl[k][2] = nil local object = objectTable[1] if isElement(object) then activateObject(object,objectTable[3]) end end end end lossObjectT = lossObjectT +1 if lossObjectT > 5 then lossObjectT = 0 for i, objectTable in pairs (objectExpl) do while objectExpl[ i ] and not objectExpl[ i ][2] do table.remove(objectExpl,i) end end end if #objectExpl <= 0 and isTimer(objectExplTimer) then killTimer(objectExplTimer) end end I may can set the table like this: objectExpl = {} when I stop the timer, but I am not sure if that is better then remove with table.remove. I have seriously no idea how you guy would script this.
  21. hmm interesting If I set a player to true. Let we say I got everyday 100 players in my server, will this table get any bigger? and will it gives more lagg at while using this for a long time before I reset the table: myTable ={} myTable ={} myTable[player] = {} myTable[player] = nil
  22. ok yes, now I understand it. oh one question: when I put a table index or table key to nil, will it be totally gone? or will the key remain?
  23. http://youtu.be/IKXARD3__4s www.youtube.com/watch?v=IKXARD3__4s&feature=youtu.be https://www.youtube.com/watch?feature=player_detailpage&v=IKXARD3__4s ok dat werkt dus niet.... ***.... https://www.youtube.com/watch?v=IKXARD3__4s&feature=youtu.be
  24. pairs and ipairs This was very unclear for me, I saw differed topic's about it, but they all gave differed answers and nobody seems to know the exact differences. Very confusing... Ok, I will put them in a table thank you all
  25. Can you loop key's O_o?
×
×
  • Create New...