local screenW, screenH = guiGetScreenSize()
function window()
Kicks = isMouseWithinRangeOf(screenW * 0.6676, screenH * 0.1719, screenW * 0.0974, screenH * 0.0495)
if Kicks then
dxDrawRectangle(screenW * 0.6676, screenH * 0.1719, screenW * 0.0974, screenH * 0.0495, tocolor(255, 255, 255, 255), false)
else
dxDrawRectangle(screenW * 0.6676, screenH * 0.1719, screenW * 0.0974, screenH * 0.0495, tocolor(255, 167, 15, 255), false)
end
end
addEventHandler("onClientRender", root, window)
function click(playerSource)
kick = isMouseWithinRangeOf(screenW * 0.6676, screenH * 0.1719, screenW * 0.0974, screenH * 0.0495)
if kick then
triggerServerEvent("KicKPlayer", getLocalPlayer())
end
end
addEventHandler("onClientClick",getRootElement(),click)
function isMouseWithinRangeOf(psx,pssx,psy,pssy)
if not isCursorShowing() then
return false
end
local cx,cy = getCursorPosition()
cx,cy = cx*screenW,cy*screenH
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end