Ok, so ... I will try to explain everything correctly.
I try to make a GUI visible by a server script and ... For some reason does that I don't know for the moment everyone see this GUI ... But I just wanna that the source of the server side can see the GUI. You understand ?
--Server
function seegui(source)
triggerClientEvent("achatarmesgui",root, source)
end
addCommandHandler("seegui", seegui)
--Client
prixarmes = {
neufmm = {1500,22},
tecneuf = {4000,30},
deagle = {3000,24},
ak = {7000,32},
shotgun = {5500,25},
}
local screenW, screenH = guiGetScreenSize()
achatarmess = guiCreateWindow((screenW - 608) / 2, (screenH - 347) / 2, 608, 347, "Achat armes", false)
guiWindowSetSizable(achatarmess, false)
guiSetVisible ( achatarmess, false )
eaglei = guiCreateStaticImage(10, 171, 95, 95, "deserteagle.png", false, achatarmess)
neufi = guiCreateStaticImage(10, 48, 95, 95, "9mm.png", false, achatarmess)
teci = guiCreateStaticImage(142, 52, 95, 95, "tec9.png", false, achatarmess)
shotguni = guiCreateStaticImage(261, 52, 95, 95, "shotgun.png", false, achatarmess)
aki = guiCreateStaticImage(405, 56, 95, 95, "ak47.png", false, achatarmess)
achatarmeslabel1 = guiCreateLabel(20, 143, 75, 17, prixarmes.neufmm[1], false, achatarmess)
achatarmeslabel2 = guiCreateLabel(152, 143, 75, 17, prixarmes.tecneuf[1], false, achatarmess)
achatarmeslabel3 = guiCreateLabel(20, 276, 75, 17, prixarmes.deagle[1], false, achatarmess)
achatarmeslabel4 = guiCreateLabel(271, 143, 75, 17, prixarmes.shotgun[1], false, achatarmess)
achatarmeslabel5 = guiCreateLabel(419, 143, 75, 17, prixarmes.ak[1], false, achatarmess)
buttonclose = guiCreateButton(569, 23, 29, 25, "X", false, achatarmess)
addEvent("achatarmesgui", true)
function achatarmes()
guiSetVisible(achatarmess, true)
showCursor(true,true)
end
addEventHandler("achatarmesgui", root,achatarmes)
So ... Could someone explain me ? Please