Hugos Posted June 26, 2019 Posted June 26, 2019 (edited) Help. When you click on the start Server-trigger >> account is checked >> the lrient trigger is started >> the function is triggered >> the line is displayed, but it is not displayed for the player who pressed the button, but for all players. Here's the code: Server: triggerClientEvent("error", root) Client: addEvent("error", true) function error() addEventHandler("onClientRender", root, redline) end function redline() dxDrawLine(448, 435, 917, 435, tocolor(240, 75, 90), 2, true) end How to make something appear only for the player who pressed the button? Edited June 26, 2019 by Hugos
Moderators IIYAMA Posted June 26, 2019 Moderators Posted June 26, 2019 4 hours ago, Hugos said: triggerClientEvent("error", root) triggerClientEvent(player, "error", root)
Hugos Posted June 26, 2019 Author Posted June 26, 2019 2 hours ago, IIYAMA said: triggerClientEvent(player, "error", root) ? not work.
Moderators IIYAMA Posted June 26, 2019 Moderators Posted June 26, 2019 3 minutes ago, Hugos said: ? not work. oh really, that is so amazing! addCommandHandler("hey", function (player) triggerClientEvent(player, "error", root) end) addEvent("error", true) function showError() addEventHandler("onClientRender", root, redline) end addEventHandler("error", root, showError)
Hugos Posted June 26, 2019 Author Posted June 26, 2019 13 minutes ago, IIYAMA said: oh really, that is so amazing! addCommandHandler("hey", function (player) triggerClientEvent(player, "error", root) end) addEvent("error", true) function showError() addEventHandler("onClientRender", root, redline) end addEventHandler("error", root, showError) What is it? addCommandHandler - why I need?
Moderators IIYAMA Posted June 26, 2019 Moderators Posted June 26, 2019 Just now, Hugos said: What is it? addCommandHandler - why I need? To define the player element, which receives the message. command: /hey So yes you don't need the addCommandHandler, if you have an alternative to define the player.
Hugos Posted June 26, 2019 Author Posted June 26, 2019 14 minutes ago, IIYAMA said: To define the player element, which receives the message. command: /hey So yes you don't need the addCommandHandler, if you have an alternative to define the player. Thank you, I got it.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now