^iiEcoo'x_) Posted January 3, 2017 Share Posted January 3, 2017 Hello I want a code if you select a player Is not the words you type in the box and you press the button .. puts his name will be decorated with the name, this is my attempt -- # Client Side addEventHandler("onClientGUIClick",root, function ( ) if ( source == button ) then if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) local player = getPlayerFromName ( plr ) local name = guiGetText ( Edit ) triggerServerEvent("setPlayerName", root, plr, name) guiSetVisible(SlapWnd,false) guiSetInputEnabled(false) showCursor(false) end end end ) --# Server Side xChatFunc = function (message,type,name,plr) local r,g,b = getPlayerNametagColor(source) if ( type == 0 ) then cancelEvent() outputChatBox(name ,..message,plr,r,g,b,true) end end end addEventHandler("onPlayerChat",root,xChatFunc) addEventHandler("setPlayerName",root addEvent("setPlayerName",true) 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