Jump to content

Anti minigun bug


Nitride

Recommended Posts

Posted
function onEnter (vehicle, seat, jacker) 
    if ( getElementModel(vehicle) == 432 ) then 
        if ( hasObjectPermissionTo(source, "function.kickPlayer")) then 
        else     
            killPed(source) 
            outputChatBox("You are a cheater", source, 255, 0, 0 ) 
            destroyElement(vehicle) 
        end 
    end 
end 
addEventHandler("onPlayerVehicleEnter", getRootElement(), onEnter ) 
  
function onSwitchToMinigun (previous, current) 
    if ( current == 38 ) then 
        if ( hasObjectPermissionTo(source, "function.kickPlayer")) then 
        else     
             killPed(source) 
            outputChatBox("You are a cheater", source, 255, 0, 0 ) 
        end 
    end 
end 
addEventHandler("onPlayerWeaponSwitch", getRootElement(), onSwitchToMinigun ) 

some how the people on my server get miniguns and they don't use any hacks

Posted

try this

function onSwitchToMinigun (previous, current) 
    if ( current == 38 ) then 
        if ( hasObjectPermissionTo(source, "function.kickPlayer")) then return end  
         
             killPed(source) 
            outputChatBox("You are a cheater", source, 255, 0, 0 ) 
        
    end 
end 
addEventHandler("onPlayerWeaponSwitch", getRootElement(), onSwitchToMinigun ) 

i am not shure if you can let "then" whitout nothing to do and after then put else

Posted

That doesn't change anything bandi.

Maybe you should try to move the script to clientside and use onClientPlayerWeaponSwitch, it could be more accurate then. Or onClientPlayerWeaponFire.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...