exampl :
-- client
addEventHandler("onClientGUIClick",guiRoot,function()
if source == Button then
RandomName = guiGetText(EditName)
if RandomName then
triggerServerEvent("EventRandomName",getLocalPlayer(),RandomName)
end
end
end)
-- server
addEvent("EventRandomName",true)
addEventHandler("EventRandomName",getRootElement(),function(RandomName)
giveWeapon (source,tostring(RandomName), 200 )--200 عدد الطلقات
--RandomName اي دي السلاح ..
end)