'~DaLesTe^' Posted December 23, 2015 Share Posted December 23, 2015 function keysCommand ( command, controlName ) if not controlName then outputChatBox ( "Bind Incorreta", 255, 0, 0 ) return end local keys = getBoundKeys ( controlName ) if not keys then outputChatBox ( "Nenhuma Bind Encontrada em: " .. controlName, 0,153,255, true) return end outputChatBox ( "Bins Encontradas: " .. controlName .. ":", 0,153,255, true) for keyName, state in pairs(keys) do outputChatBox ( keyName, 0, 255, 0 ) end end addCommandHandler ( "check", keysCommand ) Messages do not appear to all players, but as few as the player who entered. I want works as follows: / check | PLAYER NAME | key thus appear in chat "Binds found in the player: PlayerName ... Help me please? Link to comment
Bonsai Posted December 24, 2015 Share Posted December 24, 2015 Make the output serverside then I guess. Tho it seems to be pretty spammy. Link to comment
draobrehtom Posted December 24, 2015 Share Posted December 24, 2015 -- Serverside script local msg_red,msg_green,msg_blue = 255,255,0 function servertalk(message, sendto) outputChatBox(tostring(message), sendto, msg_red, msg_green, msg_blue, true) end function onJoin() servertalk("Welcome to My Server " .. getPlayerName(source), getRootElement()) end addEventHandler("onPlayerJoin",getRootElement(),onJoin) Link to comment
Noki Posted December 24, 2015 Share Posted December 24, 2015 If you want to check for a certain player, you'll need to include an extra parameter for that player's (partial) name. Then just use getPlayerFromPartialName to get the player element. You'll be better off making it server sided and possibly including some client events. Link to comment
'~DaLesTe^' Posted December 25, 2015 Author Share Posted December 25, 2015 If you want to check for a certain player, you'll need to include an extra parameter for that player's (partial) name. Then just use getPlayerFromPartialName to get the player element. You'll be better off making it server sided and possibly including some client events. I do not understand it: / Link to comment
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