Jump to content

[Solved]Panel opening to everyone


ManeXi

Recommended Posts

I made a panel which opens when you hit a marker, the problem I've got is that if anyone hits it opens to everyone on the server.

function ammuEnter() 
    guiSetVisible(ammu.window[1], true) 
    showCursor(true, false) 
    toggleAllControls(false, false, true) 
    toggleControl("fire", false) 
    toggleControl("aim_weapon", false) 
end 
addEventHandler("onClientMarkerHit", resourceRoot, ammuEnter) 

Edited by Guest
Link to comment
function ammuEnter() 
if (source == localPlayer) then 
    guiSetVisible(ammu.window[1], true) 
    showCursor(true, false) 
    toggleAllControls(false, false, true) 
    toggleControl("fire", false) 
    toggleControl("aim_weapon", false) 
end 
addEventHandler("onClientMarkerHit", resourceRoot, ammuEnter) 

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