-
Posts
6,089 -
Joined
-
Last visited
-
Days Won
216
Everything posted by IIYAMA
-
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.
-
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
-
ANTI cheat corner: https://forum.multitheftauto.com/viewtopic.php?f=114&t=31716
-
Well it can: setWeaponProperty(28, "poor", "flags", 0x000002) setWeaponProperty(28, "std", "flags", 0x000002) setWeaponProperty(28, "pro", "flags", 0x000002) but it looks ....
-
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.
-
yes, I also had that problem with one of my maps.
-
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.
-
ah yes, thank you I found a tutorial about it. http://lua-users.org/wiki/GarbageCollectionTutorial
-
ok, it is now clear for me. What is the Garbage collector?
-
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.
-
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
-
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?
-
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
-
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
-
Sample: local myPlayers = {} addEventHandler ( "onPlayerQuit", getRootElement(), function () for i, player in ipairs(myPlayers) do if player == source then table.remove (myPlayers,i) return end end end) addEventHandler ( "onPlayerJoin", getRootElement(), function () table.insert (myPlayers,source) end) setTimer (function () for i, player in ipairs(myPlayers) do end,300,1) -- or ------------------------------------------- setTimer (function () for i, player in ipairs(getElementsByType ("player")) do end end,300,1)
-
Well updating the table isn't the problem, I am talking about looping through a table that is active every 0.3 seconds. (only when the timer should be active) When I use getElementsByType("player") it will update the whole table again and after executing the data will be gone. But when I update this table with onPlayerJoin and onPlayerQuit. I don't have to reload the whole table, but it will remain in to the memory.
-
It should work, unless the player don't get send. Or the hudmessages isn't running.
-
What is a faster way to use? (I need to check a lot all the players.) getElementsByType("player") --or -- a table that already contains all players? local myPlayers = {} for I, player in ipairs () do end
-
ah, pity it is very hard for me to find the right volume for my music..... You have any experience with music volume?
-
How to get the general sound settings from mta?
