addEventHandler( "onClientGUIClick", resourceRoot, function( )
if ( source == OK ) then
if ( guiGetText ( edit ) ~= "" ) then
if ( guiRadioButtonGetSelected( RED ) == true )then
triggerServerEvent( "RED", localPlayer, guiGetText ( edit ) )
end
end
end
end )
local saveTable = { }
addEvent ( "RED", true )
addEventHandler ( "RED", root, function ( textName )
if ( textName ) then
saveTable [ client ] = { textName, 0, 255, 255 }
end
end )
addEventHandler( "onPlayerChat", root, function ( msg, type )
if ( type == 0 ) then
if ( saveTable [ source ] ) then
cancelEvent ( )
return outputChatBox( "[ "..tostring ( saveTable [ source ][1] ).." ]: "..msg, root, saveTable [ source ][2], saveTable [ source ][3], saveTable [ source ][4], true )
end
end
end )
addEventHandler ( "onPlayerQuit", root, function ( )
if ( saveTable [ source ] ) then
saveTable [ source ] = nil
end
end )