pa3ck
Members-
Posts
1,141 -
Joined
-
Last visited
-
Days Won
7
Everything posted by pa3ck
-
Thank you for your answer! However, I`m getting an error while using that piece of code. Debug console: unexpected symbol near `in`
-
Ne vedd figyelembe Max Taylor hozzaszolasat, hibas amit mond. Miert? spawnPlayer csak szerver oldalon van es alapbol miert kellene azt hasznalnia? Mivel kiirta, hogy spawnPlayer nem letezik, ezert gondolom kliens oldalon van a scripted. Mar akkor ha igen, akkor onMarkerHit nem letezik, csak onClientMarkerHit. Illetve, az eventHandlernel nem kell beleirnod a "()"-t, siman csak a funkcio nevet. hitElement pedig letezik, ugyanis az event valtozo. Azt ajanlom, hogy szerver oldalon legyen a script, a meta-ban kicsereled a fajl tipusat "server"-re es kitorlod a "()"-t a handlerbol es mukodni fog. setElementPosition nem elavult, hanem bugot okoz, ha ezzel spawnolod a pedet vagy a jatekost.
-
First of all, why are you using that many timers? It` not needed at all. Get the timer details inside the timer for every second and run it 12 times. Then count the rest yourself. I think the problem with your code is that your`re checking if timers[1] is still active but by the time you leave the marker ( after 1 second ) it just kills itself because you`re only running it once. To solve this, delete line 19 and check the timers if they`re active inside the for loop.
-
No bother.
-
fr_client.lua @ line 8: server = createServerCallInterface() util.lua @ line 1: function createServerCallInterface() return setmetatable( {}, { __index = function(t, k) t[k] = function(...) triggerServerEvent('onServerCall', g_Me, k, ...) end return t[k] end } ) end It`s advanced stuff, not easy to understand if you never used metatable before.
-
Are you looking for something like this? local numbers = { 25, 27, 31, 44, 55 } -- define the numbers local randomC = math.random ( 1, #numbers ) outputChatBox ( numbers [ randomC ] )
-
Anybody? Any comments, thoughts?
-
First argument @ onClientGUIClick is the button. Use localPlayer instead of thePlayer @ line 57
-
You don't need to 'definid' it, source is 'definid' by the event ( actually it's define(d)). Just replace killer with 'source' at the onPlayerspawn event.
-
Map editor is a different concept. You're building while you're in freecam mode.
-
I don't think my code is needed. I'm sure people understand my question and can help me without me attaching any code to it.
-
Hey. I just started to develop a builder resource for DayZ but the thing is, I'm not the best at maths. What I want to do is, move an object using keys. The problem is, I don't know how to calculate the X and Y positions when the player is not at a 0 degrees angle on the map. Any help or advice would be appreciated, thanks!
-
Ah yea, I see it now. It doesn`t get saved, right? That`s your problem? ( You probably checked your table, I assume... )
-
Whole screen image for every single resolution: guiCreateStaticImage ( 0, 0, 1, 1, "image.png", true ) For camera, you can use the optional arguments for fadeCamera ( RGB colors )
-
I think you should actually use "UPDATE" instead of trying to "INSERT" it again...
-
Check out this one: https://community.multitheftauto.com/index.php?p= ... ls&id=3120
-
function MakePlayerHeadshot( attacker, weapon, bodypart, loss ) if getElementType ( attacker ) == "ped" and getElementData ( source, "spawnprotect") ~= "true" then -- this one here if bodypart == 9 then triggerEvent( "onPlayerHeadshot", source, attacker, weapon, loss ) setPedHeadless ( source, true ) killPed( source, attacker, weapon, bodypart ) setTimer( BackUp, 900, 1, source ) end end end Do the same with the rest of the functions.
-
Just give the if statment(s) an other condition like: and getElementData(source, "spawnprotect") ~= "true" then
-
Post your headshot function.
-
Try this: addEventHandler("onPlayerSpawn",getRootElement(), function() local source = source setElementData(source,"spawnprotect","true") setElementAlpha(source,150) setTimer(setElementData,10000,1,source,"spawnprotect","false") setTimer(setElementAlpha,10000,1,source,255) end ) But also, when using headshot it kills you right away. You might need to modify it.
-
I see no questions in your post.
-
function findPlayer ( pName ) if not pName then return end -- Make sure we have a name to look for local players = {} -- Create a table in case of finding more than 1 player with the matching name for k, element in ipairs ( getElementsByType ( "player") ) do -- start looping the players and check the name against their name local name = getPlayerName ( element ) -- Get their name if string.find ( name, pName ) then -- Check it against the name we are looking for table.insert ( players, element ) -- Save it into our table end end if #players > 1 then -- If found more than 1, return the whole table with the players matching the name return players elseif #players == 1 then -- If we found only one, return that single element return players [ 1 ] else -- we haven`t found anything, return false return false end end
-
All right, okay. So if I create the colshape it's not going to recognize the element until it moves... That's bad...
-
Well, I can try it, but even if it works, I think it should recognize server side elements as well..