Jump to content

[Help] trigger event to only a player


steadyfi

Recommended Posts

Hello.

I'm wondering if I could trigger a event with triggerClientEvent() just for one player.

I'm sending localPlayer to the server and how can I send it back to him ?

I already tried this:

triggerClientEvent("openteams.getPlayerPermissionLevel.serverGave", source, playerRank) 

Note: Yes, the event is added client-side

Thanks :D

Link to comment

Try this.

triggerClientEvent(source,"openteams.getPlayerPermissionLevel.serverGave", source, playerRank) 

first parameter "source" is an optional (sentTo) parameter for triggerClientEvent:

sendTo: The event will be sent to all players that are children of the specified element. By default this is the root element, and hence the event is sent to all players. If you specify a single player it will just be sent to that player. This argument can also be a table of player elements.

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