-
Posts
306 -
Joined
-
Last visited
Posts posted by Mann56
-
-
You mean the animation thing in DayZ 0.6?
-
There is a very negligible difference in the computation speed of both the loops.
For example, if there were 100 elements in a table to be iterated, pairs was faster than ipairs by 3.41E-07 seconds that's 0.0000000341 seconds roughly. So, the speed doesn't really matter till you have many thousands of values. Also as @KariiiM said, it's good to use ipairs in the above example.
- 1
-
Nvm the error is fixed now . Thanks for reading.
-
Hey guys,
I am making a script which teleports a guy away from area 51 to random cords but when i used processLineOfSight to detect whether the land is aboveor below the player ( after the teleport , since i didnt change the z cord on teleport) but it just doesn't detect the hit. I want it to detect a world model but it doesn't detect leaving my player either below the world object or far above it after teleport. Can someone help me to detect world objects using processLineOfSight?
function detectProperPos(thePlayer) local x,y,z = getElementPosition(thePlayer) local hit,hitX,hitY,hitZ = processLineOfSight(x,y,z,x,y,z + 300,true,true,true,true,true,false,false,false,thePlayer,true) if hit then setElementPosition(thePlayer,hitX,hitY,hitZ) setElementFrozen(thePlayer,false) else local shit,hitX,hitY,hitZ = processLineOfSight(x,y,z,x,y,z - 300,true,true,true,true,true,false,false,false,thePlayer,true) if shit then setElementPosition(thePlayer,hitX,hitY,hitZ) setElementFrozen(thePlayer,false) outputChatBox(hit) else outputChatBox("Fail") end end end
Thanks,
Mann
-
Why you're checking if the player is a localPlayer ? it's just a waste of time and waste of memory
the function triggerClientEvent has an argument named sendTo.
@Mann56, you left this argument empty which that means: root ( everyone )
server side:
function checkIfMember(thePlayer) local inGroup = dbPoll ( dbQuery ( connection, "SELECT Name FROM Members WHERE Name = ?", getAccountName ( getPlayerAccount ( thePlayer ) ) ), -1 ) if ( #inGroup > 0 ) then if ( not state ) then state = true triggerClientEvent ( thePlayer, "showTheGui", thePlayer, thePlayer, state ) else state = false triggerClientEvent ( thePlayer, "showTheGui", thePlayer, thePlayer, state ) end end end addEvent ( "memberCheck", true ) addEventHandler ( "memberCheck", root, checkIfMember )
Ah got it, thanks!!
-
It works now, thank you very much...
-
Hello guys,
I was making a group system where i encountered this error. Whenever i open the gui, it shows for everybody even on my pressing the bound key... I am not able to figure out the reason of this thing.
Here's da code
SERVER
function checkIfMember(thePlayer) local inGroup = dbPoll(dbQuery(connection,"SELECT Name FROM Members WHERE Name = ?",getAccountName(getPlayerAccount(thePlayer))),-1) if #inGroup > 0 then if state == false then state = true triggerClientEvent("showTheGui",thePlayer,thePlayer,state) else state = false triggerClientEvent("showTheGui",thePlayer,thePlayer,state) end end end addEvent("memberCheck",true) addEventHandler("memberCheck",root,checkIfMember) function bindPanelKey() bindKey(source,panelOpenKey,"up",checkIfMember) end addEventHandler("onPlayerLogin",root,bindPanelKey)
CLIENT
function triggerGui(player,state) guiSetVisible(mainWindow,state) showCursor(state) state = false end addEvent("showTheGui",true) addEventHandler("showTheGui",root,triggerGui)
Hope someone can help me in this...
( I hope this extract of the code is enough, if not please inform me, i'll give the gui part)
Mann.
-
Wood Pile = item name
1463 = model id
0.4 = object scale
0 = rotX
13 = Spawning probability
Source https://github.com/mtadayz/MTADayZ/blob ... d_loot.lua
Thanks Buddy
-
Bump.
-
sorry i didn't play DayZ gamemode, but i think the last 3 values are the coordination of the item X , Y , Z.
{"item name","model id"," X ","Y","Z"},
We have a value ->
{"Wood Pile",1463,0.4,0,13},
0.4 , 0 and 13 can't be co-ordinates since mostly the second last value is mostly zero.
-
Bump.
-
Hello guys,
I am editing the DayZ gamemode, the old one by Marvin. There is an item table like -
{"Wood Pile",1463,0.4,0,13},
Here can i get the meaning of the third value?
Wood Pile = object
1463 = model id
0.4 = ?
0 = rotation? (Maybe)
13 = Spawning probability.
I'd like someone to give me the meaning of the third and fourth value, thanks!
-
Well I think this is the best topic to start. Also see
Auto Syntax Highlighting for Notepad++
These might help you...
-
And how to get resource ram usage, because i have many resources and don't now which one makes server lag.
Use performance browser.
-
Hey, show us an example
Example: If the car price is : 5000 for example, I wanna it 5,000
I didn't understand what you are trying to say... Please elaborate?
-
-
-
Hello guys,
I was studying the shader examples, i understood the "simple" example, but i am finding it difficult to understand the second one, can someone help me, and i saw that there is a lot of difference in shaders used in shadertoy and mta, i can't get the hang of the proper syntax ad such....
-
Thanks dude
-
Well, I don't know about him but it helped me much,
Thanks for the shader tutorial.
-
Please post the functions which are called on "onClientGUIClick" Else we can't rectify what you are having wrong.
-
I tried many times but still is not working..... This time, i tried like suppose my car's mass is X kg, i typed X + 3 kg and it showed 60 , thats correct but just after it, i typed X + @ and it showed $120 instead of $ 40 ( dunno why but it does 20 + 60 + 40, using the outputChatBox, i have used, i could detect this)
Any help?
-
If you do not see that I already wrote that dayz not pay so you can be blind .. well the other things I have done so myself .. I do not know what you write for s.h.i.t. And prerment ban should get such people here who can create posts that they have as much.
Looking the posts above, the others things are from Russian tutorials, who gave you the right to add them and make a resource and sell them?
-
You could have it check if there was any previous money, and if so set that to 0
I tried that but did not work.... I've already set mass_money to 0 in the function starting so it'd every time start with a zero value still it's not working.
[2016] A Year in Recap and Season Greetings
in News
Posted
MTA Team has been doing a wonderful work with the mod out there and yeah, MTA still has a big playerbase even after the big amount of games out there. It's a great achievement. Hats off to the MTA Team!