Jump to content

Raizel

Members
  • Posts

    10
  • Joined

  • Last visited

About Raizel

  • Birthday 05/03/2007

Details

  • Gang
  • Location
    Hungary
  • Occupation
  • Interests
    Scripting

Raizel's Achievements

Member

Member (5/54)

2

Reputation

  1. hello! I'm trying to detect if a player is afk and if he is afk then put him in a animation client: function isLocalPlayerActive () if isMainMenuActive() then setElementData(getLocalPlayer(),"status","afk", true) triggerServerEvent("afk", source) else setElementData(getLocalPlayer(),"status","playing", true) triggerServerEvent("notafk", source) end end server: addEvent('afk', true) addEventHandler('afk', root, function() setPedAnimation(source, "BEACH", "Lay_Bac_Loop", -1, true, false, false ) end) addEvent('notafk', true) addEventHandler('notafk', root, function() setPedAnimation(source) end) it doesn't do anything and the debugscript says nothing so idk what to do..
  2. thank you, i'll open more topics when i run into some problems
  3. how do i make it be able to open and close anytime i want to? because rn when i close it i cant open it again
  4. so i made this script that teleports u inside an interior when u enter a marker but it doesnt teleport u for some reason.. server : local e1 = createMarker(2105.47534, -1806.58765, 12.55469, "cylinder", 1.0, 255, 255, 255, 50) local e = createMarker(362.98032, -75.25889, 1000.50781, "cylinder", 1.0, 255, 255, 255, 50) setElementInterior(e, 10) -- INSIDE addEventHandler("onMarkerHit", e1, function(hitElement, matchingDimension) if(getElementType(hitElement) == "player") then setElementInterior(hitElement, 10) setElementPosition(hitElement, 365.33194, -73.90823, 1001.50781) end end ) -- OUTSIDE addEventHandler("onMarkerHit", e, function(hitElement, matchingDimension) if(getElementType(hitElement) == "player") then setElementInterior(hitElement, 0) setElementPosition(hitElement, 2100.90894, -1806.63440, 13.55469) end end )
  5. hello, im trying to make the panel pop up by command. the open function works but the close function doesnt work. loadstring(exports.dgs:dgsImportFunction())() local IsOn = false local sW, sH = dgsGetScreenSize() function OpenClosePhone() if IsOn == false then addEventHandler("onClientRender", getRootElement(), phone1) elseif IsOn == true then removeEventHandler("onClientRender", getRootElement(), phone1) end end bindKey("n", "down", OpenClosePhone) function phone1() if IsOn == false then -- components rrn = dgsCreateRoundRect(30,false, tocolor(0,0,0,255)) phone = dgsCreateImage( sW * 0.7, sH * 0.5, sW * 0.20, sH * 0.50, rrn, false) app_texture1 = dxCreateTexture("ohnoe.jpg") app1 = dgsCreateRoundRect(30,false, tocolor(255,255,255,255)) app = dgsCreateImage( sW * 0.750, sH * 0.650, sW * 0.10, sH * 0.15, app1, false) app_button = dgsCreateButton( sW * 0.750, sH * 0.650, sW * 0.10, sH * 0.15, "", false, _, tocolor(0,0,0,0) ) dgsRoundRectSetTexture(app1, app_texture1) dgsSetLayer (app_button,"top") dgsSetAlpha(app_button, 0) IsOn = true addEventHandler ( "onDgsMouseClickDown", app_button, app1Func ) -- animations end end function app1Func () outputChatBox("hey") end idk how to fix it, please help me
  6. thank you, i really appreciate the help
  7. hello, im trying to make a bank system and when i try to withdraw the money it doesnt take away my money in the bank, this is the client side script loadstring(exports.dgs:dgsImportFunction())() local windows = window,label1,label2,button1,button2 sx, sy = dgsGetScreenSize() easing = "OutBack" --data setElementData(localPlayer, "bank", "100") bank11 = getElementData (localPlayer, "bank") --window window = dgsCreateImage(sx*0.360, sy*0.3, sx*0.330, sy*0.2,_,false,_, tocolor(0,0,0,140)) label1 = dgsCreateImage(sx*0.360, sy*0.270, sx*0.330, sy*0.030,_,false,_, tocolor(0,255,255,100)) label2 = dgsCreateLabel(sx*0.450, sy*0.270, sx*0.330, sy*0.030, "Bank !!") dgsSetProperty(label2,"textSize",{sx*0.004, sy*0.002}) -- buttons button1 = dgsCreateButton(sx*0.370, sy*0.360, sx*0.150, sy*0.080, "kivetel",false, _, _, _,_,_, _,_,tocolor(0,255,255,100), tocolor(0,255,255,150), tocolor(0,255,255,255)) button2 = dgsCreateButton(sx*0.530, sy*0.360, sx*0.150, sy*0.080, "befektetes",false, _, _, _,_,_, _,_,tocolor(255,255,255,100), tocolor(255,255,255,150), tocolor(255,255,255,255)) --animations dgsSetAlpha(window, 0) dgsAlphaTo(window, 1, "OutQuad", 1000) dgsSetAlpha(label1, 0) dgsAlphaTo(label1, 1, "OutQuad", 1000) dgsSetAlpha(label2, 0) dgsAlphaTo(label2, 1, "OutQuad", 1000) dgsSetAlpha(button1, 0) dgsAlphaTo(button1, 1, "OutQuad", 1000) dgsSetAlpha(button2, 0) dgsAlphaTo(button2, 1, "OutQuad", 1000) -- button func 1 addEventHandler("onDgsMouseClickDown", button1, function() dgsSetVisible(window, false) dgsSetVisible(label1, false) dgsSetVisible(label2, false) dgsSetVisible(button1, false) dgsSetVisible(button2, false) window2 = dgsCreateImage(sx*0.360, sy*0.3, sx*0.330, sy*0.2,_,false,_, tocolor(0,0,0,140)) label3 = dgsCreateImage(sx*0.360, sy*0.270, sx*0.330, sy*0.030,_,false,_, tocolor(0,255,255,100)) label4 = dgsCreateLabel(sx*0.360, sy*0.320, sx*0.330, sy*0.030, "a penzed a bankba : " .. tostring(bank11).. "$") dgsSetProperty(label4,"textSize",{sx*0.002, sy*0.002}) button3 = dgsCreateButton(sx*0.450, sy*0.360, sx*0.150, sy*0.080, "kivetel",false, _, _, _,_,_, _,_,tocolor(0,255,255,100), tocolor(0,255,255,150), tocolor(0,255,255,255)) dgsSetAlpha(label4, 0) dgsAlphaTo(label4, 1, "OutQuad", 1000) addEventHandler("onDgsMouseClickDown", button3, function() if bankmoney == 0 then dgsSetVisible(window, true) dgsSetVisible(label1, true) dgsSetVisible(label2, true) dgsSetVisible(button1, true) dgsSetVisible(button2, true) dgsSetVisible(window2, false) dgsSetVisible(label3, false) dgsSetVisible(label4, false) dgsSetVisible(button3, false) else givePlayerMoney(bank11, localPlayer) setElementData(localPlayer, "bank", "-100") end end ) end ) this is the server side script createObject(2942, -30.522729873657 , -1.5657294988632 , 2.70) createColSphere(-30.522729873657 , -1.90 , 3.05, 1)
  8. I tried researching ab animating a gui pop up effect but I couldn’t find any answers that I understood, please help me
×
×
  • Create New...