Jump to content

local player


drk

Recommended Posts

Posted

Hey, I want to when a player click on a button and a checkbox saying e.g 'Disable radar' it disable radar only for the local player that clicked on the button. Any way to do this? I know that it's possible but I don't know how to do. If anyone help ty.

Posted
addEventHandler("onClientGUIClick", getRootElement(), 
function() 
    if(source == TheBouton)then 
        showPlayerHudComponent ("radar", false) 
        outputChatBox("Radar disabled !", source) 
    end 
end) 

Like this ?

Posted

I don't need to put getLocalPlayer() before "radar" ?

Like this:

showPlayerHudComponent(getLocalPlayer(), 'radar', false) 

Posted

Client argument:

bool showPlayerHudComponent ( string component, bool show ) 

If you add getLocalPlayer(), it will be server side. BUT getLocalPlayer() works only in client side xD

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