Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 21/02/22 in Posts

  1. Just compare each player with the player you do not want. Filtering is only beneficial when you keep that table for a longer period of time/repeat usage. -- loop start if player ~= otherPlayer then end -- loop end
    2 points
  2. client: function snbl(posx, posy, posz) local bloqueo = playSound3D("blq.mp3", posx, posy, posz, false) setSoundMaxDistance(bloqueo, 20) end addEvent("playBLQ", true) addEventHandler("playBLQ", root, snbl) server: local posX, posY, posZ = getElementPosition(thePlayer) triggerClientEvent(root, "playBLQ", thePlayer, posX, posY, posZ) Can you pass the getElementPosition to the server side, and pass the x, y, z coordinates to the event as a parameter to the client side
    1 point
  3. can you try this triggerClientEvent (root, "playBLQ" , root) you can also set the throttled option to false it can lower the volume playSound3D ( string soundURL, float x, float y, float z, [ bool looped = false, bool throttled = true ] )
    1 point
  4. change root to thePlayer this argument asks which person to send it. root means everyone triggerClientEvent(thePlayer, "playBLQ", thePlayer)
    1 point
  5. try using it like this function vhDam(loss) local playersLossHP = getVehicleOccupants(source) -- getVehicleOccupants returns a table for seat, player in pairs(playersLossHP) do --put this table in for loop local playerHealth = getElementHealth(player) --get the hp of the player inside the vehicle outputDebugString("Seat ID: "..seat.." Player Health: "..playerHealth) --print seat id and player's health end end addEventHandler("onVehicleDamage", root, vhDam)
    1 point
  6. Yes, everytime getElementsByType is called, a new table with the current players is created.
    1 point
  7. Just tested it with another person and it works, thank you so much! But then, this table solution it's dynamic? I'm not too good for some english concepts, I just want to know if this add "new players" in the list, because I don't think that this command should keep static information... I'm sorry if you already explained it, I don't get some words
    1 point
  8. The player-list is dynamic, it does not seems to be a worth option for your user-case. It is only an option when the list is static, so no new players. -- function ( playerSource, commandName ) local playerList = getElementsByType ("player") for index, player in pairs(playerList) do if player ~= playerSource then end end -- end
    1 point
  9. 1 point
  10. maybe you can do it like this to accept the animation of others entering the car function blockExit(exitingPed, seat, jacked, door) if(isVehicleLocked(source)) then if(not jacked) then --cancel if car is not jacked cancelEvent() end end end addEventHandler("onVehicleStartExit", getRootElement(), blockExit)
    1 point
  11. Witaj, drogi graczu! Koniec wygórowanych zarobków, zniszczonej gospodarki i ekonomii, mozolnej mechaniki, czy monotonnej rozgrywki. Zapraszamy do składania podań w rekrutacji do support'u: https://rekrutacja-everis.pl/? Z dniem dzisiejszym, chcielibyśmy zaprezentować projekt Everis MTA, jest on robiony z myślą o graczach, którymi sami jesteśmy i wiemy czego nam wszystkim brakuje. Dążymy do tego, aby rozgrywka u nas oprócz niesamowitych doznań, była również jak najmniej monotonna i z dnia na dzień ulepszana. Możemy pochwalić się administracją, która na scenie MTA przesiedziała dobre kilkanaście lat i nabrała odpowiedniego doświadczenia, aby w tym momencie zaprezentować wam projekt. Discord: https://discord.gg/8BzJTMweMG Strona WWW: https://project-everis.pl/ ZASOBY SERWERA Wszystkie zasoby oraz modele projektu są tworzone od podstaw, nie chcemy aby na serwerze pojawiły się systemy przez które mogą powstawać błędy. GOSPODARKA Wiele serwerów na platformie MTA idzie w kierunku wysokich zarobków, lecz u nas będzie wyglądało to trochę inaczej. Chcemy je dostosować do oczekiwań graczy, i nie będą one kosmiczne, ale nie będą też za małe. Dzięki tym zabiegom gospodarka na serwerze zostanie zbilansowana, i nie dorobimy tu się fortuny w 2 godziny, po czym przestaniemy grać. Za to nie będziemy też musieli grać dniami i nocami by kupić wymarzone auto. Uważamy, że każdemu spodoba się takie rozwiązanie. PODSUMOWANIE Mamy nadzieję, że chociaż trochę zachęciliśmy Was do gry na naszym serwerze. Większość zasobów jest ukryta, po więcej informacji i kulis z serwera dołącz na nasz serwer! Zapraszamy, Ekipa Everis MTA
    1 point
×
×
  • Create New...