Jump to content

#\_oskar_/#

Members
  • Posts

    570
  • Joined

  • Last visited

  • Days Won

    4

#\_oskar_/# last won the day on August 9 2022

#\_oskar_/# had the most liked content!

Details

  • Gang
    N/A
  • Location
    N/A
  • Occupation
    بما انك دخلت بروفايــلي صلي على النبي محمد صل الله عليه وسلم
  • Interests
    N/A

Recent Profile Visitors

6,172 profile views

#\_oskar_/#'s Achievements

Mack

Mack (28/54)

129

Reputation

  1. اكواد لملف lua --usfull fun executeBrowserJavascript_= executeBrowserJavascript function executeBrowserJavascript (br,te) executeBrowserJavascript_(br,"document.getElementById('Call').innerHTML = '" .. te .. "' ") end ------Browser Created------- addEventHandler("onClientBrowserCreated",resourceRoot,function () loadBrowserURL(source, "http://mta/local/index.html") end) -----gui Create-------- local sW, sH = guiGetScreenSize() window = guiCreateWindow(10, (sH - 186) / 2, 337, 186, "", false) guiSetVisible(window , false) local Name = guiGetBrowser(guiCreateBrowser(4, 23, 323, 34,true,true,false,window)) local Money = guiGetBrowser(guiCreateBrowser(4, 57, 323, 34,true,true,false,window)) ----- Send To HTML <span> function BrowserDocumentReady() executeBrowserJavascript (Name,'Yor Name ' ..getPlayerName (localPlayer)) executeBrowserJavascript (Money,'Yor Money ' ..getPlayerMoney (localPlayer)) end ----- open Window bindKey("F1","down",function ( ) guiSetVisible(window,not guiGetVisible(window)) showCursor(guiGetVisible(window)) --- refresh BrowserDocumentReady() end) كود لملف HTML <span style=" color:green; font-family: Arial, Helvetica, sans-serif;font-size : 15px" id="Call" span/> سويته لك بحيث يكون سهل عليك تفهمه بابسط طريقه
  2. data,_add = { },addEventHandler function SColor(e,r,g,b) if getElementType(e) == 'gui-button' then guiSetProperty(e, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X",r,g,b,255)) end end dxDrawImage_ = dxDrawImage local dxDrawImage = function (...) local a = {...} if isElement( a[1] ) and getElementType( a[1] ) == 'gui-button' and guiGetVisible (a[1]) then data [ a[1] ] = true local posX, posY = guiGetPosition ( a[1] , false ) local width , Height = guiGetSize ( a[1] , false ) dxDrawImage_ (posX , posY, width,Height,a[2], a[3],a[4],a[5], a[6] , a[7]) local r, g, b = getColorFromString("#"..guiGetProperty(a[1], "NormalTextColour")) dxDrawText(guiGetText ( a[1] ) or tostring '',posX, posY, width + posX , Height + posY,SetTextcolor or tocolor(r, g, b,255),1,"default-bold","center","center",false,false,true) guiSetAlpha( a[1] , 0) end if not isElement( a[1] ) then return dxDrawImage_ (...) end end local function Enter() if data [ source ] == true then SColor(source,0 ,255, 0) end end local function Leave() if data [ source ] == true then SColor(source,255, 124,124) end end _add ( "onClientMouseEnter",resourceRoot,Enter) _add ( "onClientGUIMouseUp", resourceRoot,Enter) _add ( "onClientMouseLeave",resourceRoot,Leave) _add ( "onClientGUIMouseDown",resourceRoot,Leave) -----------------\\\\\\\\\\\\\\\\\\\\----------------- event = guiCreateButton(16, 20, 250, 40, "Take", false) guiSetVisible (event, false) addEventHandler ("onClientRender", root, function () dxDrawImage(event ,'img/event.png', 0, 0, 0,tocolor(255, 255, 255, 255), true) -- attach to Button -- dxDrawImage(160, 200, 250, 40 ,'img/event.png', 0, 0, 0,tocolor(255, 255, 255, 255), true) -- dx Image end) bindKey( "k", "down",function( ) guiSetVisible( event , not guiGetVisible( event )) showCursor( guiGetVisible( event )) end ) try this
  3. Hey bro,can u answer in my thread?

  4. -- مود الايدي الي اسوي منه export local optimize = true -- Should the script be optimized? (if optimized, cannot be used client-side) local ids = {} function assignID() for i=1,getMaxPlayers() do if not ids[i] then ids[i] = source setElementData(source,"id",i,not optimize) break end end end addEventHandler("onPlayerJoin",root,assignID) function startup() for k, v in ipairs(getElementsByType("player")) do local id = getElementData(v,"id") if id then ids[id] = v end end end addEventHandler("onResourceStart",resourceRoot,startup) function getPlayerID(player) for k, v in ipairs(ids) do if v == player then return k end end end function freeID() local id = getElementData(source,"id") if not id then return end ids[id] = nil end addEventHandler("onPlayerQuit",root,freeID) function getPlayerByID(id) local player = ids[id] return player or false end -- ابيه يجيب ايدي اللاعب -- Client function mid ( player, commandName ) outputChatBox("Your ID IS"..getPlayerID(player), player, 0, 154, 255) end addCommandHandler ( "myid", mid )
  5. function WalkingByAcl(ThePlayer,style,group) if isObjectInACLGroup("user."..getAccountName ( getPlayerAccount(ThePlayer)), aclGetGroup(group or "Admin")) then setPedWalkingStyle(ThePlayer,style or 0) end end ------------------ addEventHandler("onPlayerLogin",root,function () WalkingByAcl(source,69,'Admin') end) local function startedResource() for key,ThePlayer in ipairs(getElementsByType("player")) do WalkingByAcl(ThePlayer,69,'Admin') end end addEventHandler("onResourceStart",resourceRoot,startedResource)
  6. function changeWalkStyle(ThePlayer, command) if isObjectInACLGroup("user."..getAccountName ( getPlayerAccount(ThePlayer)), aclGetGroup("Admin")) then setPedWalkingStyle(ThePlayer,69) end end addCommandHandler("WalkingStyle", changeWalkStyle)
  7. This is the error replace it if isMouseInPosition(sx*.41, sy*.25, sx*.10, sy*.06) then
  8. You mean like that? function AttachDxToGuiElement( GUIElement , img ) if ( guiGetVisible ( GUIElement ) ) then local x, y = guiGetPosition ( GUIElement , false ) local width , Height = guiGetSize ( GUIElement , false ) dxDrawImage(x, y, width , Height ,img, 0, 0, 0,SetImagecolor or tocolor(255, 0, 0, 255), true) dxDrawText(guiGetText ( GUIElement ) or tostring '',x, y, width + x , Height + y,SetTextcolor or tocolor(55,55,55,255),1,"default-bold","center","center",false,false,true) guiBringToFront ( GUIElement ) guiSetAlpha ( GUIElement , 0) end end ------------------ event = guiCreateButton(16, 20, 250, 40, "Take", false) addEventHandler ("onClientRender", root, function () AttachDxToGuiElement( event ,'img/event.png' ) end) bindKey( "k", "down",function( ) guiSetVisible( event , not guiGetVisible( event )) showCursor( guiGetVisible( event )) end )
  9. If you want to attach in the object dxCreateRenderTarget dxSetRenderTarget dxCreateShader dxSetShaderValue engineApplyShaderToWorldTexture or you mean this? DxDrawTextOnElement
  10. #\_oskar_/#

    BindKey

    You have to add it with the window open this is an example ?????? window = guiCreateWindow(0.33, 0.35, 0.34, 0.31, "Test", true) VEHICLE_SETTINGS = false bindKey( "x", "down", function() if isPedInVehicle ( localPlayer ) and VEHICLE_SETTINGS == false then guiSetVisible( window, true) showCursor( true ) VEHICLE_SETTINGS = true else guiSetVisible( window,false) showCursor( false ) VEHICLE_SETTINGS = false end end)
  11. #\_oskar_/#

    BindKey

    He is working VEHICLE_SETTINGS = false bindKey( "x", "down", function() if isPedInVehicle ( localPlayer ) and VEHICLE_SETTINGS == false then openVehicleSettings() VEHICLE_SETTINGS = true else closeVehicleSettings() VEHICLE_SETTINGS = false end end)
×
×
  • Create New...