Jump to content

Disable Rhinos and Miniguns


Nitride

Recommended Posts

okay, i got it to work but when i get in the rhino it blows up but then it goes back to the place i made it on full health

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 ) 
            blowVehicle(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 ) 
         

Link to comment
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 ) 
            blowVehicle(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 ) 
        

it won't work. it only works sometimes

Link to comment

Be more clear, what's the exact problem? + errors in debugscript 3

okay, i got it to work but when i get in the rhino it blows up but then it goes back to the place i made it on full health

If you want to "delete" vehicles, use destroyElement, not blowVehicle.

Link to comment

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...