I use this function in a lot of function so i need do:
function dxUyari(durum,yazi,sekil)
if durum == oyuncu then
dxDrawRectangle(x-150,100,animasyon,50,tocolor(0,0,0,200))
animasyon = animasyon+10
if animasyon >= 299 then
animasyon = 300
alpha = 255
end
dxDrawText(yazi,x-100,110,0,0,tocolor(255,255,255,alpha),1,Font1)
dxDrawRectangle(x-150,143,lineimage,1,tocolor(255,255,255,255))
lineimage = lineimage+9.99
if lineimage >=299 then
lineimage = 300
end
if sekil == "uyari" then
dxDrawImage ( x-145, 105, imageanimasyon, 30, 'dosyalar/uyari.png', 0, 0, 0 )
imageanimasyon = imageanimasyon+3
if imageanimasyon >= 29 then
imageanimasyon = 30
end
elseif sekil == "yasak" then
dxDrawImage ( x-145, 105, imageanimasyon, 30, 'dosyalar/yasak.png', 0, 0, 0 )
imageanimasyon = imageanimasyon+3
if imageanimasyon >= 29 then
imageanimasyon = 30
end
elseif sekil == "onay" then
dxDrawImage ( x-145, 105, imageanimasyon, 30, 'dosyalar/onay.png', 0, 0, 0 )
imageanimasyon = imageanimasyon+3
if imageanimasyon >= 29 then
imageanimasyon = 30
end
end
dxDrawRectangle ( x-150,144, g*2, u+1 ,tocolor(238 ,233, 233))
g = g + 0.3
if (g >= 149) then
removeEventHandler("onClientRender",getRootElement(),TEST)
removeEventHandler("onClientRender",getRootElement(),TEST2)
removeEventHandler("onClientRender",getRootElement(),TEST3)
removeEventHandler("onClientRender",getRootElement(),TEST4)
end
end
end
this? But i dont want that, i want function anywhere do remove self.