Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/08/21 in all areas

  1. Рад, что смог помочь, добро пожаловать на борт!
    1 point
  2. local screenWidth, screenHeight = guiGetScreenSize() local state = false --Let's create a new browser in remote mode. local webBrowser = createBrowser(screenWidth, screenHeight, true, true) --Function to render the browser. function webBrowserRender() --Render the browser on the full size of the screen. dxDrawImage(0, 0, screenWidth, screenHeight, webBrowser, 0, 0, 0, tocolor(255,255,255,255), true) end --The event onClientBrowserCreated will be triggered, after the browser has been initialized. --After this event has been triggered, we will be able to load our URL and start drawing. addEventHandler("onClientBrowserCreated", webBrowser, function() --After the browser has been initialized, we can load www.youtube.com loadBrowserURL(webBrowser, "http://mta/local/html/index.html") end ) addEventHandler("onClientClick", root, function(button, state) if webBrowser then if state == "down" then injectBrowserMouseDown(webBrowser, button) else injectBrowserMouseUp(webBrowser, button) end end end ) function onCursorMove ( relativeX , relativeY , absoluteX , absoluteY ) if webBrowser then injectBrowserMouseMove ( webBrowser , absoluteX , absoluteY ) end end addEventHandler ( "onClientCursorMove" , root , onCursorMove ) bindKey("F3", "down", function() state = not state if state then showCursor(true) setPlayerHudComponentVisible("money", false) setPlayerHudComponentVisible("health", false) setPlayerHudComponentVisible("clock", false) setPlayerHudComponentVisible("ammo", false) setPlayerHudComponentVisible("armour", false) setPlayerHudComponentVisible("breath", false) setPlayerHudComponentVisible("weapon", false) setPlayerHudComponentVisible("radar", false) addEventHandler("onClientRender", root, webBrowserRender) else showCursor(false) setPlayerHudComponentVisible("money", true) setPlayerHudComponentVisible("health", true) setPlayerHudComponentVisible("clock", true) setPlayerHudComponentVisible("ammo", true) setPlayerHudComponentVisible("armour", true) setPlayerHudComponentVisible("breath", true) setPlayerHudComponentVisible("weapon", true) setPlayerHudComponentVisible("radar", true) removeEventHandler("onClientRender", root, webBrowserRender) end end) Я попробовал, и теперь он успешно работает, буду очень рад, если вы пришлете мне лайк.
    1 point
  3. 1 point
  4. Los códigos Lua están cerca de nodejs -- 1. Example addEventHandler( "onPlayerWasted", root, function() player = source -- player playerName = getPlayerName(player) -- player Name outputChatBox(playerName.." ha muerto!", resourceRoot, 255, 0, 0, true) -- 255, 0 , 0 = rojo, verde, azul end ) -- 2. Example function player_Wasted ( ammo, attacker, weapon, bodypart ) -- if there was an attacker if ( attacker ) then -- we declare our variable outside the following checks local tempString -- if the element that killed him was a player, if ( getElementType ( attacker ) == "player" ) then -- put the attacker, victim and weapon info in the string tempString = getPlayerName ( attacker ).." killed "..getPlayerName ( source ).." ("..getWeaponNameFromID ( weapon )..")" -- else, if it was a vehicle, elseif ( getElementType ( attacker ) == "vehicle" ) then -- we'll get the name from the attacker vehicle's driver tempString = getPlayerName ( getVehicleController ( attacker ) ).." killed "..getPlayerName ( source ).." ("..getWeaponNameFromID ( weapon )..")" end -- if the victim was shot in the head, append a special message if ( bodypart == 9 ) then tempString = tempString.." (HEADSHOT!)" -- else, just append the bodypart name else tempString = tempString.." ("..getBodyPartName ( bodypart )..")" end -- display the message outputChatBox ( tempString ) -- if there was no attacker, else -- output a death message without attacker info outputChatBox ( getPlayerName ( source ).." died. ("..getWeaponNameFromID ( weapon )..") ("..getBodyPartName ( bodypart )..")" ) end end addEventHandler ( "onPlayerWasted", root, player_Wasted ) Si escribe qué hacer cuando el jugador muere, puedo ayudar. Desde la derecha, estaría muy feliz si le agrado.
    1 point
  5. What is a Helper? Helpers are regular members of the Community who dedicate some of their time to help others. They are recognized by MTA for standing out as friendly and helpful support for scripting, technical and other topics. Helpers serve as role models for the Community and are easily approachable for general advice, problem solving or pointing to the right direction. Helpers can move threads into the correct sections, but cannot assist with moderation, unless they are also a Moderator. They can be identified by their unique rank and colored name. How can I become a Helper? Helpers are recruited through invitation only. There is no way to apply for this role, however we are on constant lookout for, and pick members who provide solid, helpful advice over a longer period of time. To make communication easier between MTA Staff and Helpers, they have their own private channels to liaise and discuss general Forum and Discord issues. It is required to have a Forum account in order to become a Helper, but there are no activity requirements. List of Helpers Tekken iDannz Cuervo_fi Paweł The_GTA Reyomin Vampire Abasalt_Yar
    1 point
×
×
  • Create New...