Jump to content

Blaawee

Members
  • Posts

    857
  • Joined

  • Last visited

Everything posted by Blaawee

  1. customDxWindow lib More update soon. --[[ Made By Blaawee ]] customDxWindow = {} customDxWindow.__index = customDxWindow; screenSize = { guiGetScreenSize( ) }; function customDxWindow:new( x, y, width, height, title, relative ) if x and y and width and height and title then if relative then x = x * screenSize[ 1 ] / 2; y = y * screenSize[ 2 ] / 2; end local window = { x = x, y = y, width = width, height = height, title = title, visible = false, }; setmetatable( window, self ); return window; end end function customDxWindow:setTitle( title ) self.title = title; end function customDxWindow:getTitle( ) return self.title; end function customDxWindow:setVisible( bool ) if bool then addEventHandler( 'onClientRender', root, function( ) self:render( ) end ); else removeEventHandler( 'onClientRender', root, function( ) self:render( ) end ); end self.visible = not self.visible; end function customDxWindow:getVisible( ) return self.visible; end function customDxWindow:render( ) dxDrawRectangle( self.x, self.y, self.width, self.height, tocolor( getColorFromString( '#3a3b58' ) ), true ); dxDrawText( self.title, self.x, self.y, self.x + self.width, self.y + 40, tocolor( 255, 255, 255, 255 ),1.5,"default-bold","center","center", false, false, true, true ); end Example addEventHandler( 'onClientResourceStart', resourceRoot, function( ) fadeCamera( true ); local myWindow = customDxWindow:new( screenSize[ 1 ] / 2 - 512 / 2, screenSize[ 2 ] / 2 - 256 / 2, 512, 256, 'Test', false ); myWindow:setVisible( true ); myWindow:setTitle( 'That"s Work !!' ); end );
  2. لانها تقريب لعدد نسبي يعني اذا كان الي بعد الفاصله اكبر من 5 يزيد رقم مثال math.floor(3.9) = 4 + اذا كان الي بعد الفاصلة اصغر من 5 يثبت نفس الرقم مثال math.floor(3.4) = 3 بعد التجربه كلام زآحف صح + مشوش كلامك غلط math.floor(3.9) = 3
  3. بعدكك مُصصر على كلامكك يعني ! خلاص انتهى النقآش
  4. math.floor ( x ) Returns the largest integer smaller than or equal to x. ترجملي مم اعرف انقليزي =)
  5. ودي اعرف وش هي ذي الاشيآء اللي زي كذآ =)
  6. حذفت الرد عشآن اول مم حط مثآل و مم فهمت وش يبي ب الضبط + الفورمآت احسن.
  7. Try this, NotTested: Client: addEvent( 'startCountdown', true ) addEventHandler( 'startCountdown', root, function( ) local count = 5; local curalpha = 0; setTimer( function( ) count = count - 1; curalpha = 0; playSound ( 'n' ..tostring( count )..'.mp3'); end, 1000, 5 ); local screenSize = { guiGetScreenSize( ) }; function renderCountdown( ) if count == 0 then removeEventHandler( 'onClientRender', root, renderCountdown ); playSound ( 'go.mp3' ); elseif curalpha <= 235 then curalpha = curalpha + 15 elseif count > -1 then dxDrawText( count, screenSize[ 1 ] / 2 - 765 / 2, screenSize[ 2 ] / 2 - 539 / 2, 765, 539, tocolor( 255, 0, 0, curalpha ), 9.00, 'beckett', 'center', 'center', true, false, true, false, false ); end end addEventHandler( 'onClientRender', root, renderCountdown ); end ); addEvent( "Exit1", true ) addEventHandler ( "Exit1", root, function( ) local exitCount = 30; function renderExitText( ) exitCount = exitCount - 0.5; if exitCount == 0 then removeEventHandler( 'onClientRender', root, renderExitText ); elseif exitCount > -1 then dxDrawText("Has Salido de la Zona de Carrera", 300, 648, 1108, 698, tocolor(0, 0, 0, 255), 4.00, "default", "center", "center", true, false, true, false, false) dxDrawText("Has Salido de la Zona de Carrera", 300, 646, 1108, 696, tocolor(0, 0, 0, 255), 4.00, "default", "center", "center", true, false, true, false, false) dxDrawText("Has Salido de la Zona de Carrera", 298, 648, 1106, 698, tocolor(0, 0, 0, 255), 4.00, "default", "center", "center", true, false, true, false, false) dxDrawText("Has Salido de la Zona de Carrera", 298, 646, 1106, 696, tocolor(0, 0, 0, 255), 4.00, "default", "center", "center", true, false, true, false, false) dxDrawText("Has Salido de la Zona de Carrera", 299, 647, 1107, 697, tocolor(255, 0, 0, 255), 4.00, "default", "center", "center", true, false, true, false, false) end end addEventHandler( 'onClientRender', root, renderExitText ); end ) addEvent( "WinRace1", true ) addEventHandler( "WinRace1", root, function( ) local winCount = 30; playSound ( "win.mp3" ); function renderWinText( ) winCount = winCount - 0.5; if winCount == 0 then removeEventHandler( 'onClientRender', root, renderWinText ); elseif winCount > -1 then dxDrawText("Enorabuena! Has Ganado la Carrera!", 295, 342, 1008, 392, tocolor(0, 0, 0, 255), 1.80, "pricedown", "center", "center", true, false, true, true, false) dxDrawText("Enorabuena! Has Ganado la Carrera!", 295, 340, 1008, 390, tocolor(0, 0, 0, 255), 1.80, "pricedown", "center", "center", true, false, true, true, false) dxDrawText("Enorabuena! Has Ganado la Carrera!", 293, 342, 1006, 392, tocolor(0, 0, 0, 255), 1.80, "pricedown", "center", "center", true, false, true, true, false) dxDrawText("Enorabuena! Has Ganado la Carrera!", 293, 340, 1006, 390, tocolor(0, 0, 0, 255), 1.80, "pricedown", "center", "center", true, false, true, true, false) dxDrawText("Enorabuena! Has Ganado la Carrera!", 294, 341, 1007, 391, tocolor(0, 255, 0, 255), 1.80, "pricedown", "center", "center", true, false, true, true, false) end end addEventHandler( 'onClientRender', root, renderWinText ); end ); addEvent( "Enter1", true ) addEventHandler( "Enter1", root, function( ) local enterCount = 30; function renderEnterText( ) enterCount = enterCount - 0.5; if enterCount == 0 then removeEventHandler( 'onClientRender', root, renderEnterText ); elseif enterCount > -1 then dxDrawText("Has Entrado a la Zona de Carrera", 300, 648, 1108, 698, tocolor(0, 0, 0, 255), 4.00, "default", "center", "center", true, false, true, false, false) dxDrawText("Has Entrado a la Zona de Carrera", 300, 646, 1108, 696, tocolor(0, 0, 0, 255), 4.00, "default", "center", "center", true, false, true, false, false) dxDrawText("Has Entrado a la Zona de Carrera", 298, 648, 1106, 698, tocolor(0, 0, 0, 255), 4.00, "default", "center", "center", true, false, true, false, false) dxDrawText("Has Entrado a la Zona de Carrera", 298, 646, 1106, 696, tocolor(0, 0, 0, 255), 4.00, "default", "center", "center", true, false, true, false, false) dxDrawText("Has Entrado a la Zona de Carrera", 299, 647, 1107, 697, tocolor(0, 255, 0, 255), 4.00, "default", "center", "center", true, false, true, false, false) end end addEventHandler( 'onClientRender', root, renderEnterText ); end ); Server: function eventoFalse(source, cmd, ...) for _, group in ipairs ( { "Adm.Plasma", "SMod.Plasma", "Mod.Plasma", "D.Plasma", "SL.Plasma", "SD.Plasma", "L.Plasma" } ) do local playerAccount = getPlayerAccount( source ) if not( playerAccount ) then return end local accountName = getAccountName(playerAccount) if isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( group ) ) then if (isElement(theMarker)) then destroyElement(theMarker) local nombre2 = getPlayerName(source) outputChatBox("#FF0000[Atencion] La Carrera Se Ha Cancelado Por #0000FF"..nombre2.."#00FF00.", getRootElement(), 255, 255, 255, true) removeCommandHandler("eliminar") end end end end addCommandHandler ("eliminar", eventoFalse) function eventoTrue () theColShape = createColCuboid (2462.4877929688, -1716.8363037109, 13.513750076294, 40.0, 40.0, 40.0) theMarker = createMarker ( 2429.3806152344, -1659.1734619141, 13.3828125, "checkpoint", 2, 255, 0, 0, 100 ) addEventHandler ("onColShapeHit", getRootElement(), enterAreaRace1) outputChatBox("#FF0000[Atencion]#00FF00Una Carrera Va a Dar Comienzo Preparate!!!", getRootElement(), 255, 255, 255, true) outputChatBox("#00FF00Pon #0000FF/carrera #00FF00Para Para Participar.", getRootElement(), 255, 255, 255, true) addCommandHandler("carrera", eventowarp) end addCommandHandler("carrera1", eventoTrue) function enterAreaRace1() if isElement(theColShape) then triggerClientEvent ("Enter1", getRootElement(), true) if timeon then outputChatBox ("#FF0000La Carrera Empieza en 1 Minuto, #00FF00Escoge un Infernus y Preparate!", source, 255, 255, 255, true) if timebegin then triggerClientEvent ( "startCountdown", source, true ) winmarker1 = createMarker (213.96672058105, 1873.9555664063, 13.140625, "checkpoint", 8.0, 255, 0, 0, 255) createBlipAttachedTo (winmarker1, 41, 2) else addEventHandler ("onColShapeLeave", getRootElement(), enterRaceArea1) triggerClientEvent ("Exit1", getRootElement(), true) removeEventHandler ("onMarkerHit", getRootElement(), winRace) end end end end function winRace() if winmarker1 then addEventHandler ("onMarkerHit", getRootElement(), winRace) setPlayerMoney (source, 20000) local accname = getPlayerAccount (source) aclGroupAddObject (aclGetGroup("Pro"), "user."..accname) triggerClientEvent ("WinRace1", source, true) end end function eventowarp() if isElement(theMarker) then setElementPosition (source, 2429.3806152344, -1659.1734619141, 13.3828125) timeon = setTimer (theMarker, 50000, 1) timebegin = setTimer (timeon, 60000, 1) if timeon then outputChatBox ("#FF0000La Carrera Empieza en 1 Minuto, #00FF00Escoge un Infernus y Preparate!", source, 255, 255, 255, true) if timebegin then triggerClientEvent ( "startCountdown", source, true ) end end end end
  8. My code working perfect, Could you show to us how you did it.
  9. قآيلكك الحل عندي + معليش ي شباب لا تساعدونه السكريبت مسروق
  10. معليش بس انا اححول شوي =) وين كآتب شآريه ؟؟ + نبي دليل وصوره للوقين + الحل عنددي =)
  11. السكريبت موب حقكك السكريبت لكلان [ WTF ] , للمبرمج : Jake
  12. For counting use this event, you have to trigger it addEvent( 'startCountdown', true ) addEventHandler( 'startCountdown', root, function( ) local count = 5; local curalpha = 0; setTimer( function( ) count = count - 1; curalpha = 0; playSound ( 'n' . . count . .'.mp3'); end, 1000, 5 ); local screenSize = { guiGetScreenSize( ) }; function renderCountdown( ) if count == 0 then removeEventHandler( 'onClientRender', root, renderCountdown ); playSound ( 'go.mp3' ); elseif curalpha <= 235 then curalpha = curalpha + 15 elseif count > -1 then dxDrawText( count, screenSize[ 1 ] / 2 - 765 / 2, screenSize[ 2 ] / 2 - 539 / 2, 765, 539, tocolor( 255, 0, 0, curalpha ), 9.00, 'beckett', 'center', 'center', true, false, true, false, false ); end end addEventHandler( 'onClientRender', root, renderCountdown ); end );
  13. Try this: policeVehicles = { [598]=true,[596]=true,[597]=true,[599]=true }; addEventHandler ( 'onVehicleStartEnter', root function( player ) if policeVehicles[ getElementModel( source ) ] and not getTeamName( getPlayerTeam ( player ) ) == 'Police' then cancelEvent() end end end )
  14. What do you mean by groups ?! Is are they in teams or aclGroup or data ?
  15. Or loop it for _, aclGroups in ipairs ( { 'Admin', 'Moderator', 'SuperModerator' } ) do if isObjectInACLGroup ( ... , aclGetGroup ( aclGroups ) ) then -- Do something else -- Do something else end end
  16. try this : local GUIEditor = { window = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(166, 96, 545, 402, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.staticimage[1] = guiCreateStaticImage(16, 31, 152, 127, ":images/banshee.png", false, GUIEditor.window[1]) GUIEditor.staticimage[2] = guiCreateStaticImage(13, 218, 155, 143, ":images/infernus.png", false, GUIEditor.window[1]) GUIEditor.staticimage[3] = guiCreateStaticImage(206, 33, 151, 125, ":images/monster.png", false, GUIEditor.window[1]) GUIEditor.staticimage[4] = guiCreateStaticImage(207, 222, 150, 139, ":images/cheetah.png", false, GUIEditor.window[1]) GUIEditor.staticimage[5] = guiCreateStaticImage(396, 34, 130, 124, ":images/bullet.png", false, GUIEditor.window[1]) GUIEditor.staticimage[6] = guiCreateStaticImage(395, 219, 131, 142, ":images/supergt.png", false, GUIEditor.window[1]) end ) bindKey('F3','down', function ( ) guiSetVisible ( GUIEditor.window[1],not guiGetVisible ( GUIEditor.window[1] ) ); showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end )
  17. Well, i'm not blind =) BTW, I tried that not working. Edit : Nvm, Solved.
  18. Yes like this But i don't want it with .gif format. Maybe there's an other trick to do it.
  19. Hey guys, is there any way to rotate the dxImages in Z rotation? I tried the ' rotation ' argument but it's rotate in degrees.
  20. localPlayer --Client only شلون تسوي تريقر من كلاينت لكلاينت
  21. مو مجرب local gTable = { [ 1 ] = { text = '', x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 2 ] = { text = '', x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 3 ] = { text = '', x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 } }; local i = 1; local screen = { guiGetScreenSize( ) }; function swingBettwenArrow( key ) if key == 'arrow_l' then if i == 1 then i = #gTable; else i = i - 1; end else if i == #gTable then i = 1; else i = i + 1; end end end bindKey ( 'arrow_l', 'down', swingBettwenArrow ); bindKey ( 'arrow_r', 'down', swingBettwenArrow ); addEventHandler( 'onClientRender', root, function( ) dxDrawText( gTable[i].text, screen[ 1 ] / 2 - dxGetTextWidth( gTable[i].text, 1, 'arial' ) / 2, screen[ 2 ] / 2 + 128, screen[ 1 ], screen[ 2 ], tocolor( 255, 255, 255, 255), 1, 'arial', 'left', 'top', false, false, false, true ); setCameraMatrix( gTable[i].x, gTable[i].y, gTable[i].z, gTable[i].lookAtX, gTable[i].lookAtY, gTable[i].lookAtZ ); end );
  22. ----------------------------------------- -- Join & Quit by DeeJay ----------------------------------------- addEvent("ukazSe",true) function ukazToGUI( playerName ) joinPlayerShowName = guiCreateLabel(0.89, 0.00, 0.11, 0.05, "ahoj " .. playerName .." ", true) guiLabelSetVerticalAlign(joinPlayerShowName, "center") joinPlayerShowImage = guiCreateStaticImage(0.86, 0.00, 0.14, 0.05, "img/join.png", true) guiSetAlpha(joinPlayerShowImage, 0.39) outputChatBox("Ukazano") end addEventHandler( "ukazSe", getRootElement(), ukazToGUI )
×
×
  • Create New...