Jump to content

Varkis

Members
  • Posts

    33
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Varkis

  1. Varkis

    Help please

    Thanks, but now if you quickly pass the marker the barrier will remain open
  2. Varkis

    Help please

    It didn't help. Maybe you can somehow make the object not rotate more than 90 degrees?
  3. Varkis

    Help please

    How do I fix this? https://youtu.be/UjKePNof-6A Code (server): parkgate1 = createObject( 968, 2777.123, 905.84, 10.666, 0, 90, 90 ) parkgate2 = createObject( 968, 2777.127, 920.71, 10.62, 0, -90, 90 ) gatebar1 = createObject( 966, 2777.127, 920.71, 9.7, 0, 0, 90 ) gatebar2 = createObject( 966, 2777.123, 905.84, 9.7, 0, 0, -90 ) parkmarker = createMarker(2777, 912.994, 7.75, "cylinder", 13, 255, 0, 0, 0 ) local isMoving = false function gatefunc( hitPlayer ) if isMoving == false then isMoving = true moveObject ( parkgate1, 2000, 2777.123, 905.84, 10.666, 0, -90, 0) moveObject ( parkgate2, 2000, 2777.127, 920.71, 10.62, 0, 90, 0) end end addEventHandler( "onMarkerHit", parkmarker, gatefunc ) function gatefuncclose( ) moveObject ( parkgate1, 2000, 2777.123, 905.84, 10.666, 0, 90, 0) moveObject ( parkgate2, 2000, 2777.127, 920.71, 10.62, 0, -90, 0) setTimer(function() isMoving = false end,2000,1) end addEventHandler( "onMarkerLeave", parkmarker, gatefuncclose )
  4. Varkis

    Help please

    How do I fix this? https://youtu.be/UjKePNof-6A Code (server): parkgate1 = createObject( 968, 2777.123, 905.84, 10.666, 0, 90, 90 ) parkgate2 = createObject( 968, 2777.127, 920.71, 10.62, 0, -90, 90 ) gatebar1 = createObject( 966, 2777.127, 920.71, 9.7, 0, 0, 90 ) gatebar2 = createObject( 966, 2777.123, 905.84, 9.7, 0, 0, -90 ) parkmarker = createMarker(2777, 912.994, 7.75, "cylinder", 13, 255, 0, 0, 0 ) local isMoving = false function gatefunc( hitPlayer ) if isMoving == false then isMoving = true moveObject ( parkgate1, 2000, 2777.123, 905.84, 10.666, 0, -90, 0) moveObject ( parkgate2, 2000, 2777.127, 920.71, 10.62, 0, 90, 0) end end addEventHandler( "onMarkerHit", parkmarker, gatefunc ) function gatefuncclose( ) moveObject ( parkgate1, 2000, 2777.123, 905.84, 10.666, 0, 90, 0) moveObject ( parkgate2, 2000, 2777.127, 920.71, 10.62, 0, -90, 0) setTimer(function() isMoving = false end,2000,1) end addEventHandler( "onMarkerLeave", parkmarker, gatefuncclose )
  5. I want the player to be able to change their account without leaving the server and all their data will be saved. On some servers, when you enter the /logout command, the login panel appears, and you can log in to another account, and the data of the account you logged out of is saved
  6. function save () if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "money", tostring (getPlayerMoney (source))) setAccountData (account, "health", tostring (getElementHealth (source))) end end end addEventHandler ("onPlayerLogout", getRootElement(), save)
×
×
  • Create New...