
DarkLink
Members-
Posts
610 -
Joined
-
Last visited
Everything posted by DarkLink
-
I dont know If I am doing the good way... Can someone see this ? server side: local woodTable = {} function sendWoodTable() outputChatBox("sending wood table for player that spawn") triggerClientEvent ( source, "placeWoodsTable", source, woodTable ) end addEventHandler ( "onPlayerSpawn", getRootElement(), sendWoodTable ) client side: local woodTable = {} addEvent("placeWoodsTable", true) function createLine() for k,wood in ipairs(woodTable) do local xW, yW, zW = getElementPosition(wood) -- I GET ERROR HERE... bad argument @ getElementPosition end end function placeWoodsFunc(woodTableReceived) outputChatBox("received wood table , i guess..") woodTable = woodTableReceived addEventHandler("onClientRender", getRootElement(), createLine) end addEventHandler("placeWoodsTable", getRootElement(), placeWoodsFunc) can u guys see if there is something wrong ? sending this table ? thanks alot in advance guys .
-
Thanks for your reply, I was not really talking about sky color... i was talking about the light of entire game, be almost black... like we cant see nothing x) but I would light just 1 meter from me, its possible? do u understood ? thanks in advance
-
Hi there, its possible to make a very dark weather ? and to light just some parts of our window ? thanks alot in advance .
-
Hm ok thanks, the problem is that I am doing some script.. where I can only create the object after I check something on client side (this check must be client side, not serverside, the name of function is : isLineOfSightClear) , so if check is ok, then I triggerServerEvent and then create there ? on server? is this the best way ? by the way, can I pass as argument on triggerClientEvent a table of objects? Thanks in advance
-
Hi there guys, I guess this one is easy for you to help me I dont really know if I am doing it right. Should I create and remove objects via client side ? I mean all others clients will see that objects being created and removed ? its good sync ? Or should I trigger some event on server side, and add and remove my objects there? thanks alot in advance... I really need a answer on this
-
Hi there guys, I am trying to complete my lua client file for map editor, to add some features for my gamemode. But I am stucked, because I dont know the names of the events that are triggered on client side, when some map is loaded.. when a new map is created.. and so on.. can someone tell me about those events ? Thanks alot in advance guys Cya
-
I got it, thanks anyway.
-
Hi there, i am bit rusty on this, trying to get used to it again Soo, my question is how can I set up a handlerFunction for a event, but giving arguments? I mean something like this: addEventHandler( "onPlayerSpawn", rootElement, giveCoords(2,3,1) ) this is not possible right? I can only put the name of the function without any arguments, on that third argument of addEventHandler, right? So .. is there any workaround to this? I guess u understood me, thanks in advance
-
I though it was native in LUA, but is nice anyway, thanks
-
I readed somewhere that is now possible to code using OOP ? If so, why dont find any advices over wikis pages Thanks in advance.
-
I hear from some guys, that its hard to star earning money with MTA, but they acctualy do.. My question is: how ? Pubs on website server ? selling scripts ? it really gives any nice money ? google pays so small amount of money per click and such.. it might not be with pubs.. So can anyone explain me? or its secret ? :c thanks in advance
-
Yes, im adding vehicle position + rotation to a table and drawing lines using this position. It's simple! You can see the sources btw. Thank you guys for comments Hmm I got it! Thanks alot
-
Português: Okay parece-me que tens ai alguns problemas, a função que passas para o timer é a playSound, depois o próximo argumento é o timeInterval do timer que multiplicas por 1000, a pensar que a função getSoundLength retorna o tempo em segundos? devolve em milliseconds, não precisas de multiplicar por 1000. depois tens o 80, ai é as vezes que queres que o timer corra a função, 80 vezes ? okay não há problema.. E depois passas nos argumentos, que serão os argumentos da função playSound passas um random ? tem de ser o arugmento da função playSound, que é uma String com o path da música como aqui indica : https://wiki.multitheftauto.com/wiki/PlaySound English: Okay it seems that u have some problems, the function passed to the timer is playSound, then the next argument is the timer TimeInterval multiply that by 1000, getSoundLength is not a function that returns the time in seconds so u dont need to multiply by 1000. It returns already on milliseconds, you do not need to multiply by 1000. Then you have the 80, this is the times you want to run the timer function, 80 times? okay no problem .. And the next arguments on timer are arguments for the function u call, in this case playSound need at least a argument with the sound path, I guess that its not a random? or maybe that random is a variable to a sound path? if you have any doubs u have here what I was talking about: https://wiki.multitheftauto.com/wiki/SetTimer -- look the arguments time interval is the second argument not the third https://wiki.multitheftauto.com/wiki/GetSoundLength -- returns on ms (milisseconds) https://wiki.multitheftauto.com/wiki/PlaySound -- sound path as string variable not a random ? PS: I know that this guy is portuguese so thats why I try to help on our native language, if he understands better I hope I could help you mate Good luck !
-
Useful tool mate ! Good job, thanks and keep the good work EDIT: To draw the line on ur script u are adding consecutively new points to a table do draw the line right ? While I was watching I was thinking how can it be done, just would like to know
-
I made it using onClientRender event, and then checking if object is there or no using isLineOfSightClear, and if it returns true, I destroy that element and build it again Do you understand ? Its not damageproof.. but it gets rebuilded right on the time it gets destroyed, u dont even notice..
-
Never mind, I can see if this element (1961) is destroyed just by event of client shoot Thanks for your help anyway.
-
Okay thanks, I already got it
-
But the MTA team could check twice before releasing, MTA 1.3 is worst than 1.2.. timeouts, crashes.. Also, I did help, never got a reply.. http://bugs.mtasa.com/view.php?id=6796 http://bugs.mtasa.com/view.php?id=6732 if things are worst than 1.2, just wait, they will fix it, they always fix everything sooner or later. and if its that bad just keep with 1.2 till the fix
-
Hi there guys, I have some questions about this new function, its very good btw, very smooth *_* My questions: 1º if I have this script it only executes the first move, i need to make a timer for the second move ? a timer to make the second move start only when the first ends ? addCommandHandler("move", function() local x, y, z = getElementPosition(wood) moveObject ( wood, 3000,x+10, y, z+5,0,0,0) local x, y, z = getElementPosition(wood) moveObject ( wood, 3000,x+5, y, z+7,0,0,0) local x, y, z = getElementPosition(wood) moveObject ( wood, 3000,x+10, y, z+5,0,0,0) end) It only executes the first moveObject. 2º Question, its possible to go from position x to position y using a circumference function ? I know that the circumference function is something like this : (x-a)^2 + (y-b)^2 = r^2 where (a,b) is the center and r is the radius. I would want to move a object at same X , but making a circumference style move u see ? kinda hard to figure it out Thanks in advance.
-
Hi there again guys, I have a new problem.. The object 1961 named record3 on furniture objects at map editor has any problem ? cant it be streamed in ? only virtualized ? I am asking this because.. I already tryed to check if object is there with isLineOfSightClear and it always says true.. that is clear.. this is kinda weird.. Can someone help me? thanks in advance!
-
they are doing the best they can , cant you show some respect ? Agreed with Al3grab. I agree too but look guys unfortunately there will be always haters ! Just ignore them, and I hope MTA Team do it to! Just ignore and keep trying ur best always, dont give up. I didnt tested 1.3 yet but, if its worse its understandable, just keep working And good job you guys dont stop , thats good enough for me !
-
Ahhhh!! Didnt know about this!! Thanks alot Crystal! It will solve my problem! Thank you very much ! Problem solved