Server:
function VoteSystem(title)
outputChatBox ("Your Vote Title: " .. title, client)
end
addEvent("VoteConnection", true)
addEventHandler("VoteConnection", resourceRoot, VoteSystem)
Client:
sx, sy = guiGetScreenSize()
ClientGUI = {}
function VoteCommand (commandName, ...)
local title = table.concat ( { ... }," " )
TextDraw = tostring(title)
triggerServerEvent ( "VoteConnection", resourceRoot, tostring(title) )
addEventHandler("onClientRender",root,render)
outputChatBox(title)
end
addCommandHandler ( "vote", VoteCommand )
function render()
ClientGUI[2] = dxDrawRectangle(sx*0.2, sy*0.3, sx*0.6, sy*0.5, tocolor(0,0,0,150))
ClientGUI[1] = dxDrawText(TextDraw, sx*0.21, sy*0.31, sx, sy, tocolor(255,0,0,255), 2)
if not ClientGUI[3] then
-- create static image
end
end)