Jump to content

BriGhtx3

Members
  • Posts

    378
  • Joined

  • Last visited

Everything posted by BriGhtx3

  1. I wanted to try it like this, but isn't there an easier method?
  2. Just like I said, I use a database.
  3. 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.
  4. 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.
  5. I already got it. I set the data in another function -.- But thank you very much
  6. I can't test it right now The condition is that I get shot twice in the leg and thus it gets broken.
  7. Of course its not my full code. This is in my onPlayerDamage event.
  8. 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.
  9. Works now I set delay to 100. Thank you
  10. 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.
  11. 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
  12. 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.
  13. 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)
  14. @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
  15. @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.
  16. 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.
  17. Thanks I already got it with myonlake solution^^ @BinSlayer1 of course I use getRealTime because I need it for a lottery
  18. 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?
  19. 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?
  20. Yes it works Thank you so much )
  21. 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
  22. 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
×
×
  • Create New...