Jump to content

marty000123

Members
  • Posts

    256
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by marty000123

  1. marty000123

    problem

    Hello I'm not sure what I'm doing wrong. This is my server side script, it doesn't work on client side either. Every sound from group 5 should be disabled. Help = appreciated function turnOffGunSounds() setWorldSoundEnabled( 5, false) end
  2. Nevermind, figured it out. Thanks 4 the help guys
  3. Yeah.. I was thinking about that too but in all honesty I have no idea how to fix that.
  4. I have multiple togable texture mods. Everytime when players toggle a texture, their modded crosshair vanishes. So I made a timer that restarts the crosshair script ever 10 seconds, so it won't be a problem any longer. If it works, it's not dumb But does it cause lag? Or doesn't it cause lag because it's only one restart in 10 seconds.
  5. I'm so sorry for the confusion but now I see I said it wrong. I mean I want 1 (original gta sa) sound disabled and the rest enabled. How do I do that?
  6. if killstreaks[source] then outputChatBox (getPlayerName(attacker).." stopped the "..killstreaks[source] .." killing-streak of "..getPlayerName(source).."!",getRootElement (),player,255,0,0) end end end addEventHandler ('onPlayerWasted', root, onPedWastedHandler) addEvent("testEvent", false) addEventHandler( "testEvent", root, onPedWastedHandler) This message doesnt appear to everyone, and I have no idea why.
  7. Sorry about that, but I was really desperate. To make it more clear: the last script I posted only disables the original sounds. For instance, when I put 5,13 there, it only disables the 13th sound. While it should be the opposite! When I put 5,13 there, it should only ENABLE the original sound, being 13. So what do I need to adjust in my script?
  8. I literally can't figure it out lol
  9. I am officially retarded. I forgot to turn the sounds back on while checking. I'm on it now EDIT: Alright the /showsound works (I'm sorry for repeating the same question but I really didn't get it lol) but when I put the index there, it does the exact opposite. When I change setWorldSoundEnabled ( 5, enabled ) to setWorldSoundEnabled ( 5, 31, enabled ), it still gives every sound EXCEPT that one. While it should be the opposite, it should give that sound except the rest. This is my code: function toggleWeaponSounds_f ( ) local enabled = isWorldSoundEnabled ( 5 ) -- We place this variable here for checking. enabled = not enabled -- And here we invert (toggle) the variable, so if it's false, it becomes true, if it's true, it becomes false. -- Used for the chat declaration: local state = "enabled" if ( not enabled ) then state = "disabled" end -- setWorldSoundEnabled ( 5, 31, enabled ) -- And here the toggling happens. outputChatBox ( "Weapon sounds " .. state ) end addCommandHandler ( "toggleweaponsounds", toggleWeaponSounds_f )
  10. I've figured out how to do it, but it shows everything EXCEPT the gun firing, which is exactly what I need. So this isn't really usefull at all.
  11. Is there like a list or something where I can see the groups/indexs??
  12. I don't understand, what does the 22 stand for?
  13. Hello, this is a piece of my code aTimer = { } function hydraulics(player) if getElementType(player)=="player" then local vehicle=getPedOccupiedVehicle(player) setElementPosition(player, 199.2939453125, 1428.4794921875, 10.5859375) aTimer[source] = setTimer ( function( source ) aTimer [source] = nil end,300000,1,source ) if isTimer ( aTimer[source] ) then return false or outputChatBox( "#ff0000You can only TP to the Gun Shop once every 5 minutes!", source, r, g, b, true) end end end addEvent("hydraulics",true) addEventHandler("hydraulics",getRootElement(),hydraulics) I can just TP to the location everytime I want, while it should be allowed only once every 5 minutes. It shows the message everytime I TP to the gunshop. How can I fix this?
  14. marty000123

    counter

    I think he means the timer restarts after a new map has loaded.
  15. I used the example given in the link and converted it from command to event. It works, but literally every weapon-related sound disappears, for example RPG firing, and reloading. How do I only disable the gun sounds of for example gun id 24?
  16. Hello, I use custom gun sounds but I hear the custom sounds mixed with the original, can't find out a way to disable the original. I know it's possible because I've seen it on other servers, but is it a hard thing to do? It's pretty annoying my ears. Thanks 4 the help Marty
  17. local killstreaks = {} addEventHandler ('onPlayerWasted', getRootElement (), function ( ammo, attacker, weapon, bodypart, loss ) if attacker then local player = attacker if killstreaks[attacker] then Something like this? Because it doesn't work. And I put it at line 4..
×
×
  • Create New...