Sign in to follow this  
fabiopimo

Interact with Textlabel

Recommended Posts

Sorry for my bad english, but how can I interact with a Textlabel. For example I have a TextLabel with the Text "Press E to spawn a Car". How can I make that Interaction with the Key E.

 

Thank you

Share this post


Link to post
Share on other sites
mp.keys.bind(0x45, false, function() {
    mp.events.callRemote("youreventname", player);
});

^ this on clientside

 

And if you use C on Serverside this:

        [RemoteEvent("youreventname")]
        public void youreventhandler(Client client)
        {
            if (client.Position.DistanceTo2D(new Vector3(x, y, z)) <= 3)
            {
                client.SendNotification("this is a test!");
            }
        }

 

  • Like 1

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.