Jump to content

[RESOLVED] The players why not see outputChatBox word?


Turbesz

Recommended Posts

local GUIEditor = { 
    button = {}, 
    window = {}, 
    memo = {}, 
    label = {} 
} 
        GUIEditor.window[1] = guiCreateWindow(471, 309, 511, 161, "FullFunPlay ~ Egyedi szavazás indító panel ~ by turbesz", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.label[1] = guiCreateLabel(13, 27, 77, 18, "Kérdés:", false, GUIEditor.window[1]) 
        local kerdes = guiCreateMemo(66, 22, 435, 33, "", false, GUIEditor.window[1]) 
        GUIEditor.label[2] = guiCreateLabel(64, 67, 95, 17, "Válasz 1:", false, GUIEditor.window[1]) 
        local valasz1 = guiCreateMemo(122, 61, 152, 33, "", false, GUIEditor.window[1]) 
        GUIEditor.label[3] = guiCreateLabel(284, 67, 79, 20, "Válasz 2:", false, GUIEditor.window[1]) 
        local valasz2 = guiCreateMemo(336, 59, 165, 35, "", false, GUIEditor.window[1]) 
        GUIEditor.button[1] = guiCreateButton(10, 116, 239, 35, "Szavazás indítása!", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[2] = guiCreateButton(468, 123, 33, 28, "X", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000") 
guiSetVisible(GUIEditor.window[1], false)        
        
addEventHandler("onClientGUIClick", GUIEditor.button[1], function() 
outputChatBox("#FF0000Szavazás! #00FF00Kérdés:#aeaeae "..guiGetText(kerdes).."#00ff00Lehetséges válaszok: #00baff\n1="..guiGetText(valasz1).."2="..guiGetText(valasz2),root,r,g,b,true) 
end) 
  
  
function showGUI() 
  guiSetVisible( GUIEditor.window[1], true ) 
  showCursor( true ) 
end 
addEvent( "showguii", true ) 
addEventHandler( "showguii", localPlayer, showGUI ) 
  
addEventHandler("onClientGUIClick",root, 
function () 
  
if source == GUIEditor.button[2] then 
  
guiSetVisible(GUIEditor.window[1],false) 
  
showCursor(false) 
  
end 
  
end 
  
) 

Edited by Guest
Link to comment

Client

local GUIEditor = { 
    button = {}, 
    window = {}, 
    memo = {}, 
    label = {} 
} 
        GUIEditor.window[1] = guiCreateWindow(471, 309, 511, 161, "FullFunPlay ~ Egyedi szavazás indító panel ~ by turbesz", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.label[1] = guiCreateLabel(13, 27, 77, 18, "Kérdés:", false, GUIEditor.window[1]) 
        local kerdes = guiCreateMemo(66, 22, 435, 33, "", false, GUIEditor.window[1]) 
        GUIEditor.label[2] = guiCreateLabel(64, 67, 95, 17, "Válasz 1:", false, GUIEditor.window[1]) 
        local valasz1 = guiCreateMemo(122, 61, 152, 33, "", false, GUIEditor.window[1]) 
        GUIEditor.label[3] = guiCreateLabel(284, 67, 79, 20, "Válasz 2:", false, GUIEditor.window[1]) 
        local valasz2 = guiCreateMemo(336, 59, 165, 35, "", false, GUIEditor.window[1]) 
        GUIEditor.button[1] = guiCreateButton(10, 116, 239, 35, "Szavazás indítása!", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[2] = guiCreateButton(468, 123, 33, 28, "X", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000") 
guiSetVisible(GUIEditor.window[1], false)       
        
addEventHandler("onClientGUIClick", GUIEditor.button[1], function() 
text1 =guiGetText(kerdes) 
text2 = guiGetText(valasz1) 
if text1 ~= "" and text2  ~= "" then  
triggerServerEvent("server",localPlayer,text1,text2) 
end 
end 
) 
  
function showGUI() 
  guiSetVisible( GUIEditor.window[1], true ) 
  showCursor( true ) 
end 
addEvent( "showguii", true ) 
addEventHandler( "showguii", localPlayer, showGUI ) 
  
addEventHandler("onClientGUIClick",root, 
function () 
  
if source == GUIEditor.button[2] then 
  
guiSetVisible(GUIEditor.window[1],false) 
  
showCursor(false) 
  
end 
  
end 
  
) 

server

addEvent("server",true) 
  
  
addEventHandler("server",root, 
  
function (text1,text2) 
  
  
 outputChatBox("#FF0000Szavazás! #00FF00Kérdés:#aeaeae "..text1.."#00ff00Lehetséges válaszok: #00baff\n1="..text2.."2=",root,0,255,0,true) 
  
  
 end 
  
  
 ) 

Link to comment
Client
local GUIEditor = { 
    button = {}, 
    window = {}, 
    memo = {}, 
    label = {} 
} 
        GUIEditor.window[1] = guiCreateWindow(471, 309, 511, 161, "FullFunPlay ~ Egyedi szavazás indító panel ~ by turbesz", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.label[1] = guiCreateLabel(13, 27, 77, 18, "Kérdés:", false, GUIEditor.window[1]) 
        local kerdes = guiCreateMemo(66, 22, 435, 33, "", false, GUIEditor.window[1]) 
        GUIEditor.label[2] = guiCreateLabel(64, 67, 95, 17, "Válasz 1:", false, GUIEditor.window[1]) 
        local valasz1 = guiCreateMemo(122, 61, 152, 33, "", false, GUIEditor.window[1]) 
        GUIEditor.label[3] = guiCreateLabel(284, 67, 79, 20, "Válasz 2:", false, GUIEditor.window[1]) 
        local valasz2 = guiCreateMemo(336, 59, 165, 35, "", false, GUIEditor.window[1]) 
        GUIEditor.button[1] = guiCreateButton(10, 116, 239, 35, "Szavazás indítása!", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[2] = guiCreateButton(468, 123, 33, 28, "X", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000") 
guiSetVisible(GUIEditor.window[1], false)       
        
addEventHandler("onClientGUIClick", GUIEditor.button[1], function() 
text1 =guiGetText(kerdes) 
text2 = guiGetText(valasz1) 
if text1 ~= "" and text2  ~= "" then  
triggerServerEvent("server",localPlayer,text1,text2) 
end 
end 
) 
  
function showGUI() 
  guiSetVisible( GUIEditor.window[1], true ) 
  showCursor( true ) 
end 
addEvent( "showguii", true ) 
addEventHandler( "showguii", localPlayer, showGUI ) 
  
addEventHandler("onClientGUIClick",root, 
function () 
  
if source == GUIEditor.button[2] then 
  
guiSetVisible(GUIEditor.window[1],false) 
  
showCursor(false) 
  
end 
  
end 
  
) 

server

addEvent("server",true) 
  
  
addEventHandler("server",root, 
  
function (text1,text2) 
  
  
 outputChatBox("#FF0000Szavazás! #00FF00Kérdés:#aeaeae "..text1.."#00ff00Lehetséges válaszok: #00baff\n1="..text2.."2=",root,0,255,0,true) 
  
  
 end 
  
  
 ) 

Thanks!:D

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