Jump to content

TheSmart

Members
  • Posts

    516
  • Joined

  • Last visited

Everything posted by TheSmart

  1. TheSmart

    dxLogin

    ok but what about loggingMenu? how i can show it? forgive that
  2. TheSmart

    dxLogin

    You tried that? If is your problem the edit box doesn't showing so this must works yes i did but still not working
  3. TheSmart

    dxLogin

    what you want from line 4 , "onResourceStart" just for server side opps i change it into "onClientResourceStart" but still doesn't work EDIT : i got that error http://prntscr.com/7zvvma
  4. TheSmart

    dxLogin

    hey guys! today i was making a login panel but it have some problem it when i click on login button it have to show dxlogin and loggingMenu but loggingMenu won't showing here is code loggingMenu function loggingMenu () loginuseredit = guiCreateEdit(181, 584, 156, 25, "Username....", false) loginpassedit = guiCreateEdit(181, 654, 156, 25, "Password", false) guiEditSetMasked(loginpassedit, true) playbtn = guiCreateButton(150, 704, 177, 50, "Play", false) guiSetAlpha(playbtn, 0.00) end dxlogin function dxlogin () dxDrawLine(123 - 1, 540 - 1, 123 - 1, 771, tocolor(252, 252, 252, 255), 1, false) dxDrawLine(364, 540 - 1, 123 - 1, 540 - 1, tocolor(252, 252, 252, 255), 1, false) dxDrawLine(123 - 1, 771, 364, 771, tocolor(252, 252, 252, 255), 1, false) dxDrawLine(364, 771, 364, 540 - 1, tocolor(252, 252, 252, 255), 1, false) dxDrawRectangle(123, 540, 241, 231, tocolor(0, 0, 0, 229), false) dxDrawText("Username:-", 129, 557, 221, 584, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Password:-", 129, 623, 221, 650, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Play", 151, 702, 327, 754, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false) end and here is it button click function function logginbtn(button,state) if (button == "left" and state == "up") then if (source == loginbtn) then addEventHandler("onResourceStart", resourceRoot, loggingMenu) addEventHandler("onClientRender", root, dxlogin) end end end addEventHandler("onClientGUIClick", getRootElement(), logginbtn) no error in Debugscript 3 D:, what wrong doing i'm?
  5. IMO, remove smoke maybe then it will decrease lag
  6. setCameraTarget(localPlayer)
  7. ahhj you mean MGM, you can get it free ? here is it https://community.multitheftauto.com/ind ... s&id=11695
  8. local Width, Height = guiGetScreenSize() local webBrowser = createBrowser(Width, Height, false, false) addCommandHandler("youtube", function() loadBrowserURL(webBrowser, "https://www.youtube.com/watch?v=kdemFfbS5H0") addEventHandler("onClientRender", root, function() local x, y = 110.7, 1024.15 dxDrawMaterialLine3D(x, y, 23.25, x, y, 14.75, webBrowser, 18.2, tocolor(255, 255, 255, 255), x, y+1, 19) end ) end )
  9. TheSmart

    attach

    radius = 14 explosionType = 10 timerSeconds = 3000 showTheCredits = function(l_1_0) outputChatBox("Meteor-Rain script was created by Seers!", l_1_0, 200, 200, 30, true) end addCommandHandler("meteor", showTheCredits) rainOnAllPlayers = function() for l_2_3,l_2_4 in ipairs(getElementsByType("player")) do fallMeteo(l_2_4) end end CheckTheFallingRocks = function() for l_3_3,l_3_4 in ipairs(getElementsByType("vehicle")) do if getElementModel(l_3_4) == 564 and getElementData(l_3_4, "meteor") == 1 and getElementData(l_3_4, "exploded") == 0 then x, y, z = getElementPosition(l_3_4), l_3_4, "exploded" new1 = getElementData(l_3_4, "z-koord") + 3 if new1 <= getElementData(l_3_4, "z-koord") then createExplosion(x, y, z, explosionType, nil) setElementData(l_3_4, "exploded", 1) theFallingRock = getElementData(l_3_4, "attachedRock") setTimer(destroyElement, 5000, 1, theFallingRock) end end end end setTimer(CheckTheFallingRocks, 50, 0) thisResourceStarts = function() if tonumber(get("secondsWhenTheNextStoneFalls")) and tonumber(get("secondsWhenTheNextStoneFalls")) >= 1 then timerSeconds = tonumber(get("secondsWhenTheNextStoneFalls")) * 1000 else outputDebugString("Invalid seconds number in settings. Please check meta.xml") timerSeconds = 3000 end if tonumber(get("fallRadius")) and tonumber(get("fallRadius")) >= 0 then radius = tonumber(get("fallRadius")) else radius = 14 outputDebugString("Invalid fall radius in settings. Please check meta.xml") end setTimer(rainOnAllPlayers, timerSeconds, 0) end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), thisResourceStarts) fallMeteo = function(l_5_0) if getElementInterior(l_5_0) == 0 and getElementDimension(l_5_0) == 0 and getElementHealth(l_5_0) >= 1 then x, y, z = getElementPosition(l_5_0), l_5_0 x1 = x - radius x2 = x + radius y1 = y - radius y2 = y + radius x = math.random(x1, x2) y = math.random(y1, y2) theMeteo = createVehicle(564, x, y, z + 60, 30, 30, 30) setElementData(theMeteo, "meteor", 1) setElementData(theMeteo, "z-koord", z) setElementData(theMeteo, "exploded", 0) setElementAlpha(theMeteo, 0) theRock = createObject(2936, 0, 0, 0) setElementData(theMeteo, "attachedRock", theRock) attachElements(theRock, theMeteo, 0, 0, 0) if isPedInVehicle(l_5_0) then vx, vy, vz = getElementVelocity(getPedOccupiedVehicle(l_5_0)), getPedOccupiedVehicle(l_5_0), l_5_0 setElementVelocity(theMeteo, vx, vy, -5) end end end displayVehicleLoss = function(l_6_0) if getElementModel(source) == 564 and getElementData(source, "meteor") == 1 and getElementData(source, "exploded") == 0 then x, y, z = getElementPosition(source), source, "exploded" createExplosion(x, y, z, explosionType, nil) setElementData(source, "exploded", 1) theFallingRock = getElementData(source, "attachedRock") setTimer(destroyElement, 5000, 1, theFallingRock) end end addEventHandler("onVehicleDamage", getRootElement(), displayVehicleLoss)
  10. R.I.P English. R.I.P Eyes
  11. ohh hohh hahah so funny i cant stop laughing lol omg what is funny?
  12. i believe there is more error anyway try now function openvipshop() if isElement(vipshop) then desroyElement(vipshop) else x,y= guiGetScreenSize() vipshop = guiCreateWindow(0, 0, x-100, y-100, "Shop Vip", true ) guiWindowSetMovable ( vipshop, true ) changenamecharacter = guiCreateButton(0.8, 0.8, 100, 200, "Change Name", true, vipshop ) showCursor(true) function onClickButton() triggerClientEvent("changenamec",getElementRoot(),changenamecharacter) showCursor(true) destroyElement(vipshop) end end addEventHandler("onClientGUIClick", doiten, onClickButton ) end bindKey ("F2", "down", openvipshop)
  13. your's bindKey ("F2", "down", openvipshop and mine, you forget to put ) to close it bindKey ("F2", "down", openvipshop)
  14. function openvipshop() if isElement(vipshop) then desroyElement(vipshop) else x,y= guiGetScreenSize() vipshop=createWindow(0, 0, x-100, y-100, "Shop Vip", true ) guiWindowSetMovable ( vipshop, true ) changenamecharacter=guiCreateButton(0.8, 0.8, 100, 200, "Change Name", true, vipshop ) showCursor(true) function onClickButton() triggerClientEvent("changenamec",getElementRoot(),changenamecharacter) showCursor(true) destroyElement(vipshop) end end addEventHandler("onClientGUIClick", doiten, onClickButton ) end bindKey ("F2", "down", openvipshop)
  15. TheSmart

    attach

    nvm x1 = x - radius x2 = x + radius y1 = y - radius y2 = y + radius x = math.random(x1, x2) y = math.random(y1, y2) idk why im getting that error http://prntscr.com/7yac21
  16. try now function stopSound() setSoundPaused(sound, true) end addEventHandler("onClientPlayerWasted", root, stopSound)
  17. TheSmart

    animation

    opps i mean ped animation function buy(button,state) if (button == "left" and state == "up") then if (source == buybtn) then takePlayerMoney ( 1000 ) setPedAnimation( localPlayer,"BAR", "dnk_stndF_loop", 5000, false, false, false, false ) --- after this how i can start next this animation? idk how to use setTimer setPedAnimation( localPlayer,"BAR", "dnk_stndM_loop", 5000, false, false, false, false ) removeEventHandler("onClientRender", root, dx) showCursor(false) end end end addEventHandler("onClientGUIClick", getRootElement(), buy)
×
×
  • Create New...