Jump to content

Captain07

Members
  • Posts

    14
  • Joined

  • Last visited

Posts posted by Captain07

  1. Hello,

    I'm looking for a way to detect throwing a grenade/molotov/etc. onClientPlayerWeaponFire doesn't trigger for this. I was thinking about onClientKey + getPedWeapon, but my server has many situations where the "fire" control is disabled, so you can't shoot/throw a grenade. (Safe zone, god mode, and much more) So it would be really painful to put them in an "if" as exceptions and I might miss some of them. So onClientKey is very tricky, but I don't have a better solution. If someone has an idea, can they share with me/us, please?

    Thanks for reading!

  2. Hello,

    I have a script that opens a panel when you click on a player/vehicle. The problem is that it detects the click on the player/vehicle even when something is in the way, the admin panel for example or the player/vehicle panel itself. So I am clicking in the admin panel, but if a player is "below" the panel and I click there, the player panel opens. How can I evade this?

  3. It is in client side. I can disable other sounds, but not weapon sounds.

    My only guess is that there is another resource that enables them. But I have no idea which, I don't even remember doing anything like this before. Is there a way to find out which resource uses this function, without checking them one by one?

  4. Hello,

    I'm trying to disable default weapon sounds, but it's not working.
    I obtained the sounds with development mode + showsound and I turned them off, but ther are still there.
    Not even the example on mtawiki works, or other codes that I found.
    What's going on?! 

    Thanks for reading!

  5. Thank you! I tested it and for some reason it's not working properly, did I mess something up? I wanted make it green when it's within the sector, otherwise red. 
     

    -- 1st test
    
    if isMouseInCircleSector(sx/2, sy/2, 330, 0, 90) then
        dxDrawCircle(sx/2, sy/2, 330, 0, 90, tocolor(0, 255, 0, 255))
    else
        dxDrawCircle(sx/2, sy/2, 330, 0, 90, tocolor(255, 0, 0, 255))
    end
    
    
    -- 2nd test
    
    if isMouseInCircleSector(sx/2, sy/2, 330, 0, 180) then
        dxDrawCircle(sx/2, sy/2, 330, 0, 180, tocolor(0, 255, 0, 255))
    else
        dxDrawCircle(sx/2, sy/2, 330, 0, 180, tocolor(255, 0, 0, 255))
    end

    https://imgur.com/a/g6udD5L
     

  6. Hello,

    I'm working with circles (dxDrawCircle) recently and I need a function to check if the player's cursor is within a circle's sector (a button). Is there a function to do this? I found the isMouseInCircle function, but it's not enough. Any ideas?

×
×
  • Create New...