-
Posts
378 -
Joined
-
Last visited
Everything posted by BriGhtx3
-
I wanted to try it like this, but isn't there an easier method?
-
Just like I said, I use a database.
-
I know how to use setTimer, but I want to count the time even if the player is not online. When the player leaves, the timer cancels.
-
Hey, I want to set a limit for a command. You should only can use this command once in 6h. I use a database and not accountData. How can I set a 6h limit in REALLIFE-Time not ingame time. So for example when he uses this command at 4pm the limit should be until 10pm. Also if he is not online.
-
I already got it. I set the data in another function -.- But thank you very much
-
Now I only need one shot.
-
I can't test it right now The condition is that I get shot twice in the leg and thus it gets broken.
-
onPlayerDamage: bodypart
-
Of course its not my full code. This is in my onPlayerDamage event.
-
Already did it like this
-
Hey, when someone shoots at me I want that only after the second bullet which hits me I get a message (in onPlayerDamage): if weapon then if getElementData(player, "shot1") == false then setElementData(player, "shot1", true) return end end if getElementData(player, "shot1") then setElementData(player, "shot1", false) end if place == 7 then outputChatBox("You broke your left leg", player) end The problem is that the message gets output after the first time I get shot.
-
Works now I set delay to 100. Thank you
-
I already posted my code. And Im not that dump to make mistakes in the meta. As you see the player already gets crouched but he stands up immediately.
-
Hey, always when I set the control state to crouched then the player crouches for a second and immediately stands up again. I want the player to always walk crouched and disable sprinting and walking when he is standing: toggleControl("jump",false) toggleControl("sprint",false) toggleControl("walk",false) setControlState("crouch",true) Why doesn't this work? It is in a function and clientside
-
I already got it In my script it was so difficult, because there were 3 numbers and 3 randoms. And I had to check if one of the randoms contains one of my numbers.
-
My numbers (z1, z2, z3) are selected from the database. I think the problem was there, because it works now (without changing anything now oO)
-
@Stanley but you forgot to add the ")". And this doesn't change anything @Draken I also don't understand this problem. My code should work fine, but it doesn't. I have 3 numbers (z1,z2,3) and I check it like this: if ( tonumber ( z1 ) == tonumber ( rnd1 ) or tonumber ( z1 ) == tonumber ( rnd2 ) or tonumber ( z1 ) == tonumber ( rnd3 ) ) then zahl1 = zahl1 + 1; print ( 'You won $250.000.000!' ); else print ( 'Zah1 1: Falsch!' ); end if ( tonumber ( z2 ) == tonumber ( rnd1 ) or tonumber ( z2 ) == tonumber ( rnd2 ) or tonumber ( z2 ) == tonumber ( rnd3 ) ) then zahl1 = zahl1 + 1; print ( 'You won $250.000.000!' ); else outputChatBox( 'Zahl 2: Falsch!' ); end if ( tonumber ( z3 ) == tonumber ( rnd1 ) or tonumber ( z3 ) == tonumber ( rnd2 ) or tonumber ( z3 ) == tonumber ( rnd3 ) ) then zahl1 = zahl1 + 1; outputChatBox( 'You won $250.000.000!' ); else outputChatBox( 'Zahl 3: Falsch!' ); end But it simply doesn't work
-
@Stanley you didn't change anything.. @Draken I generate a number between 1 and 12. And I want to check if one of those randoms is 10. It is for a lottery to check how many right numbers he picked.
-
local z1 = 10 local rnd1, rnd2, rnd3 = gR() local zahl = 0 if ( tonumber ( z1 ) == tonumber ( rnd1 ) ) or ( tonumber ( z1 ) == tonumber ( rnd2 ) ) or ( tonumber ( z1 ) == tonumber ( rnd3 ) ) then zahl = zahl + 1 else outputChatBox("Zahl 1: Falsch!") end gR(): local rnd1 = math.random ( 1, 12 ) local rnd2 = math.random ( 1, 12 ) local rnd3 = math.random ( 1, 12 ) return rnd1, rnd2, rnd3 Hey^^ I try to check if one of the random numbers is the same like z1. But even if it is the same,it outputs "Zahl 1: Falsch!". I tried to output rnd1, rnd2, rnd3 and z1 and this works.
-
Thanks I already got it with myonlake solution^^ @BinSlayer1 of course I use getRealTime because I need it for a lottery
-
How exactly? So for example I execute getTime to get the current time. If it is 3.25 pm then I set the timer for 35 minutes. But how do I set the timer again for 60 minutest?
-
Hey, I want to execute a function when a new hour begins (don't know how to describe it ) So for example: It is 3pm: Execute function abc It is 4pm: Execute function abc ... I tried it with a timer, but I don't want to check whether it is a full hour or not each minute. Does anyone know how to check if it is a full hour, without checking each second or minute?
-
Yes it works Thank you so much )
-
Just tried it^^ The problem is that (x1-x)/2 , (y1-y)/2 , (z1-z)/2 is not the center of those points But the width and height is ok now
-
Yes you got it ;D And how do I calculate the distance now? I tried to use getDistanceBetweenPoints2D/2, but it only returns 1 float. But i need a width and depth