غير اسماء المتغيرات الخاصة بالازرار
Client
addEventHandler("onClientGUIClick", resourceRoot, function( )
if source == health or source == armor then
local getClick = source == health and "setElementHealth" or "setPedArmor"
triggerServerEvent("onPlayerGiveArmorOrHealth", localPlayer, getClick)
end
end)
Server
addEvent("onPlayerGiveArmorOrHealth", true)
addEventHandler("onPlayerGiveArmorOrHealth", root, function(func)
_G[func](source, 100)
end)