Leaderboard
Popular Content
Showing content with the highest reputation on 12/12/17 in all areas
-
Sistema de grupos -Caracteristicas: Kickear/Expulsar jugadores del grupo. Editar el color del grupo, Te puede ser útil para usarlo en otros recursos, Ya que yo lo use para un sistema de Turfs. Cambiar el rango de los jugadores, Existen tres tipos de Rangos: Fundador, Lider y Aspirante. Comprar Slots para tu Grupo! Por defecto al crear un grupo vienen incluidos 20 Slots.. Esto es modificable en el archivo server.lua Linea: 18; El costo de cada slots es de $5000, Puedes modificar este valor en la Linea 19. Invitar jugadores a tu Grupo! En el panel te muestra todos los jugadores y tambien te muestra si tiene o no grupo. Borrar tu grupo, Opción solo valida para el Fundador del grupo. Sistema de chat grupal, Con solo teclear 'Y' podrás escribir en el chat grupal. Todos las cosas se guardan en una base de datos local. Codigo libre 7w7. Sistema de administracion de grupos ( Válido solo para ACL Admin ) -Caracteristicas: Lista de todos los grupos del servidor ( Nombre del grupo y total de slots que tiene ). Editar los slots de un grupo. Editar el nombre del grupo. Editar la informacion del grupo. Expulsar a cualquier miembro del grupo. Agregar cualquier jugador al grupo. Editar el rango de cualquier jugador del grupo. Ver el nombre, cuenta y rango de un jugador. Registro de todas las acciones que se hacen ( Creaciones de grupo, Expulsaciones, Todo lo que hacen .. ). Registro de todos los chats grupales ( Puedes limpiar todo el registro por si se te acumula mucho ). Cada vez que un jugador escriba se mostrara en el debugscript. Imágenes del sistema: Funciones exportadas del sistema: --Si algún argumento de una funcion esta mal siempre retornara false. isGroupExists ( string nombre_delgrupo ) --> retorna true si es existe y false si no existe getPlayerGroup ( player thePlayer ) --> retorna el grupo del jugador isPlayerLeader ( player thePlayer ) --> retorna true si el jugador es el lider de un grupo, si no false. isPlayerFounder ( player thePlayer ) --> retorna true si el jugador es el Fundador de un grupo, si no false. isPlayerInGroup ( player thePlayer ) --> retorna true si el jugador esta en un grupo, si no false. isAccountInGroup ( string Account ) --> retorna true si la cuenta esta un grupo, si no false. removePlayerFromGroup ( player thePlayer, string GroupName ) --> expulsa al jugador de un grupo addPlayerToGroup ( player thePlayer, string GroupName ) --> Añade al jugador a un grupo. addAccountToGroup ( string Account, string GroupName ) --> Añade la cuenta a un grupo getPlayerRang ( player thePlayer ) --> Obtiene el grupo de un jugador getGroupColor ( string GroupName ) --> Obtiene el color de un grupo; Retorna colores R, G, B, ALPHA getGroupSlots ( string GroupName ) --> Obtiene los slots del grupo; Retorna numero de jugadores en el grupo, Slots del grupo. addGroupSlots ( string GroupName, number Cantidad ) --> Añade Los slots deseados a un grupo deleteGroup ( string GroupName ) --> Borra el grupo ingresado setGroupColor ( string GroupName, R, G, B, ALPHA ) --> Cambiar el color de un grupo. Comandos: F2 Para abrir el panel /cgsp Para abrir el panel de administracion de grupos ( Solo para ACL Admins; Lo puedes modificar en admin_panel_server.lua Linea: 20 ) 'Y' Para el chat grupal. Debes darle permisos de ACL Al script. Link del script: https://github.com/xNout/gpsystem Con mucho amor.. -Rex- <31 point
-
(I'm Brazilian and I use google translate) Hello, I made a script that I searched a lot on the internet and did not find it, so I decided to do it myself. It is simple, when climbing on any bike is generated a helmet on the player's head, works with any skin. You can remove the helmet by typing /removecapa or descending from the motorcycle. NOTE: For the script to work you must have the resource "bone_attach".1 point
-
Hi. I noticed new MTA version allows specifying headers in fetchRemote, so I could finally implement spotify remote controller (control locally running spotify from the game). I want to share the possibility with you, so here goes.. This is not ready for public use! Download https://www.upload.ee/files/7552466/_spotify_.zip.html Extract [spotify] inside server resources Start Spotify on same computer where you run the game. In MTA server, run one of (or all): spotify_cli, spotify_gui, spotify_notifier, spotify_status In MTA client permanently accept domain access for "open.spotify.com" (this is used anonymously, to get oauth token, MTA client has no spotify session data from you). You might need to reconnect to the server after that as I haven't handled the domain access. Troubleshooting/Feedback: * You might need to change the "starting port" in spotify_api/api.lua, line 42 from 4380 to something else, like 4371 (there currently seems to be a bug with port scanning because on my computer spotify was listening on two ports, both of them responded to version check, but actual status request failed on one of them. Will deal with that definitely if I have some feedback, like which ports people are using and which one is working for them) * New MTA version has "localhost" whitelisted by default. If it's not you will get prompt to whitelist it. * Currently spotify_api connects automatically on client resource start, but there is usecase where user alt+tabs out of game, starts Spotify and then we would like to try connecting again. Maybe you have some good ideas how to design the API for that - should it automatically retry connecting (if not connected) on any exported function call? Also, maybe there is good usecase that connecting should not be done on resource start at all and is deferred until really needed. Currently there might be substantial delay finding the correct port though, because fetchRemote timeout argument doesn't seem to have any effect, so the timeout is really slow (around ~1 sec) for each port. In given zip file it's not an issue as it is trying range 4380-4381 Unfortunately, the spotify remote control API that this resource is using, supports only few basic commands: starting specific track (in specific context (context not implemented in my resource yet)), pausing, resuming and getting current status (and track) info. That is all. No seeking, no volume change, no prev/next track (unless you know what is prev and next, and just play those tracks). Nevertheless the existing commands alone are pretty nice to have. My goal is to publish the spotify_api and let others implement their own usages (either incorporated into gamemode - i.e each map has it's own music; or create some nice GUI controller for the music). Provided spotify_cli and spotify_gui are just dumb interfaces so I know the API is actually working and designed ok. Provided examples: spotify_cli Adds commands to play specific track/playlist/album uri; play; pause. Type command 'spotify.commands' to see list of possible commands. spotify_gui Press 0 (as in zero) to show playlist GUI with play and pause buttons. Click on song name to start playing it. spotify_status Permanently shows current playing song and seek position. spotify_notifier Similar to spotify_status, but pops up only for few seconds when new song started and does not include playing time.1 point
-
FEATURES Compatible with all gamemodes. A monitor that allows the user to view the drone's camera. First person / Third person drone monitor. /drone - starts drone /droned - stops drone MEDIA https://community.multitheftauto.com/index.php?p=resources&s=details&id=130561 point
-
1 point
-
addEventHandler("onClientGUIClick",root,function() if source == nominate then name = getPlayerName(localPlayer) local row = guiGridListAddRow(GridList) guiGridListSetItemText(GridList, row, 1,""..name.."", true, false) end end )1 point
-
Copy to the client clipboard, or send an outputChatBox() with the link? Becuse in this way, you need a trigger for the client: Server side: addEventHandler("onPlayerCommand",getRootElement(),function(command) if command == "facebook" then triggerClientEvent(source,"copyTheLink",source,"www.facebook.com") end end) Client side: addEvent("copyTheLink",true) addEventHandler("copyTheLink",root,function(link) setClipboard(link) end) Or just for \facebook you can do it only in client side: addCommandHandler("facebook",function() setClipboard("www.facebook.com") end)1 point
-
You mean, when player use a Command, send a massege to client with the command like this? addEventHandler("onPlayerCommand",getRootElement(),function(command) outputChatBox("You used this command: "..command,source) end)1 point
-
This will only work on specified peds, this ain't cool to do every ped hand by hand, only if you want them to be in particular area. This one is way better, it will work for every ped that has been killed. server side: local reward; addEventHandler("onPedWasted",root,function(_,killer) if (killer and getElementType(killer) == "player") then reward = math.random(1000,5000); givePlayerMoney(killer,reward) end end);1 point
-
1 point
-
-- Client side exports.killmessages:outputMessage ( message, r, g, b, font ) -- Server side exports.killmessages:outputMessage ( message, visibleTo, r, g, b, font ) addEventHandler("onPlayerQuit", root, function (quitType) local name = string.gsub(getPlayerName(source), "#%x%x%x%x%x%x", "") exports.killmessages:outputMessage ( name.. "has left the server. [" ..quitType.. "]", root, 255, 255, 255, "default" ) end ) Try using the killmessages functions.1 point
-
1 point
-
1 point
-
1 point
-
web screenWidth, screenHeight = guiGetScreenSize() function showBrowser() if WebBrowserGUI.instance ~= nil then return end WebBrowserGUI.instance = WebBrowserGUI:new() end -------------- WebBrowserGUI = {} WebBrowserGUI.instance = nil function WebBrowserGUI:new() local o=setmetatable({},{__index=WebBrowserGUI}) o:constructor() return o end function WebBrowserGUI:constructor() local sizeX, sizeY = screenWidth * 0.9, screenHeight * 0.9 self.m_Window = guiCreateWindow(screenWidth * 0.05, screenHeight * 0.05, sizeX, sizeY, "Web browser", false) self.m_BackButton = guiCreateButton(5, 25, 32, 32, "<", false, self.m_Window) self.m_ForwardButton = guiCreateButton(42, 25, 32, 32, ">", false, self.m_Window) self.m_EditAddress = guiCreateEdit(77, 25, sizeX - 157, 32, "Please enter an address", false, self.m_Window) self.m_LoadButton = guiCreateButton(sizeX - 75, 25, 32, 32, "?", false, self.m_Window) self.m_ButtonClose = guiCreateButton(sizeX - 38, 25, 24, 24, "?", false, self.m_Window) self.m_Browser = guiCreateBrowser(5, 62, sizeX - 10, sizeY - 67, false, false, false, self.m_Window) end function WebBrowserGUI:Browser_Created() addEventHandler("onClientGUIClick", self.m_LoadButton, function(...) self:LoadButton_Click(...) end, false) addEventHandler("onClientGUIAccepted", self.m_EditAddress, function(...) self:LoadButton_Click(...) end, false) addEventHandler("onClientGUIClick", self.m_BackButton, function(...) self:BackButton_Click(...) end, false) addEventHandler("onClientGUIClick", self.m_ForwardButton, function(...) self:ForwardButton_Click(...) end, false) addEventHandler("onClientGUIClick", self.m_ButtonClose, function(...) self:CloseButton_Click(...) end, false) self:loadURL("https://mtasa.com/") end function WebBrowserGUI:Browser_Navigate(targetURL, isBlocked) if isBlocked then self.m_RequestedURL = targetURL Browser.requestDomains({targetURL}, true) return end if self.m_History[#self.m_History] ~= targetURL then self.m_History[#self.m_History + 1] = targetURL end if #self.m_History > 1 then self.m_BackButton:setEnabled(true) end end function WebBrowserGUI:Browser_WhitelistChange(whitelistedURLs) for i, v in pairs(whitelistedURLs) do if self.m_RequestedURL:find(v) then self.m_Browser:getBrowser():loadURL(self.m_RequestedURL) self.m_RequestedURL = "" end end end function WebBrowserGUI:Browser_DocumentReady() self.m_Window:setText("Web browser: " .. tostring(self.m_Browser:getBrowser():getTitle())) self.m_EditAddress:setText(tostring(self.m_Browser:getBrowser():getURL())) end -- // GUI Navigation function WebBrowserGUI:LoadButton_Click(param1, state) if isElement(param1) or (param1 == "left" and state == "up") then self:loadURL(self.m_EditAddress:getText()) end end function WebBrowserGUI:BackButton_Click(button, state) if button == "left" and state == "up" then local url = self.m_History[#self.m_History - 1] self.m_ForwardHistory[#self.m_ForwardHistory + 1] = self.m_History[#self.m_History] self.m_History[#self.m_History] = nil if #self.m_History <= 1 then self.m_BackButton:setEnabled(false) end self.m_ForwardButton:setEnabled(true) self:loadURL(url) end end function WebBrowserGUI:ForwardButton_Click(button, state) if button == "left" and state == "up" then local url = self.m_ForwardHistory[#self.m_ForwardHistory] if url then self.m_ForwardHistory[#self.m_ForwardHistory] = nil if #self.m_ForwardHistory == 0 then self.m_ForwardButton:setEnabled(false) end self:loadURL(url) end end end function WebBrowserGUI:CloseButton_Click(button, state) if button == "left" and state == "up" then self.m_Window:destroy() showCursor(false) --GuiElement.setInputMode("no_binds_when_editing") WebBrowserGUI.instance = nil end end -- \\ GUI Navigation function WebBrowserGUI:loadURL(url) if url == "" then self.m_EditAddress:setText("about:blank") self.m_Browser:getBrowser():loadURL("about:blank") return elseif url:sub(0, 6) == "about:" then self.m_EditAddress:setText(url) self.m_Browser:getBrowser():loadURL(url) return elseif url:sub(0, 7) ~= "http://" and url:sub(0, 8) ~= "https://" then url = "http://"..url end if Browser.isDomainBlocked(url, true) then self.m_RequestedURL = url Browser.requestDomains({url}, true) return end self.m_EditAddress:setText(url) self.m_Browser:getBrowser():loadURL(url) end -- end web GUIEditor_Rules = { button = {}, window = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor_Rules.window[1] = guiCreateWindow(288, 47, 687, 627, "Rules", false) guiWindowSetSizable(GUIEditor_Rules.window[1], false) guiSetVisible(GUIEditor_Rules.window[1],false) GUIEditor_Rules.memo[1] = guiCreateMemo(14, 28, 663, 561, "[[ Test ]]", false, GUIEditor_Rules.window[1]) guiMemoSetReadOnly(GUIEditor_Rules.memo[1], true) GUIEditor_Rules.button[1] = guiCreateButton(15, 593, 135, 24, "Cloes", false, GUIEditor_Rules.window[1]) guiSetFont(GUIEditor_Rules.button[1], "default-bold-small") guiSetProperty(GUIEditor_Rules.button[1], "NormalTextColour", "FFFEFEFE") end ) GUIEditor = { button = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateStaticImage(142, 230, 947, 280, "/login-panel/Main.png", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1],false) GUIEditor.button[1] = guiCreateStaticImage(43, 96, 180, 131, "/login-panel/Rules.png", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateStaticImage(724, 96, 180, 131, "/login-panel/Join.png", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.button[3] = guiCreateStaticImage(378, 96, 180, 131, "/login-panel/Wep.png", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") end ) جرب1 point
-
1 point
-
When you use fileDelete at the end of every single client file that would mean that players need to download ALL those files every time they join your server. And that can get some huge MB sometimes. I'll never see the point of "protecting" scripts in MTA. If you got paid for it then ok but it's just for fun here. Plus if some *beep* uploads your script and says it's his the mta staff will find out and delete his copy. There's a "Report resources" topic around here made specifically for this reason1 point
-
Summer is over, but fear not, we have got a new release for you - Multi Theft Auto: San Andreas 1.5.5! This release is focused on bugfixes (most notably, some popular crashes were fixed with help from @Dutchman101 - eg. this one, code cleanups and under-the-hood improvements for developers (migration to a Docker-based environment and support for VS2017 and GCC-6). It may look like it is not much of an update, but the amount of such smaller changes should be a good incentive to update. In other news, we have enabled some additional forum account security features for your convenience - namely a possibility to set a security question(s) for the account and support for Authy and Google Authenticator two-factor authentication. You can enable them in your Account Security settings. Release Highlights updated CEF elements and fixed red/blue color swap issue with Intel VGAs added 'localhost' to the hardcoded CEF whitelist modified launch patcher to work with more exe variants added black outline option for chat text fixed #4166 ("Engine Sounds of other Helicopters and planes missing unless you get in a Helicopter or plane.") fixed #9681 ("Unable to hear proper engine sounds when sitting in car as passenger") fixed #3944 ("Radio titles do not always show.") fixed #8590 ("createEffect with some effects places it's sfx sounds to position 0,0,0") added guiGetCursorType(), isResourceArchived(), getDevelopmentMode(), setDevelopmentMode() (used to be client-only, now it's also server-side), debugSleep(), setVehicleModelExhaustFumesPosition(), getVehicleModelExhaustFumesPosition() improved client connections through firewalls fixed FOV setting not updating censored onClientConsole for login command potentially fixed crouchbug resource pack: various changes in admin, editor, freeroam, headshot, ipb, joinquit, killmessages, play, and realdriveby ... plus more! A complete list of changes can be found here (recommended read) and here (incomplete, from r11302 upwards). List of changes to the resource pack can be found here (starting from and including Apr 22, 2016 upwards). Want to download MTA:SA 1.5.5? Click here to download the build for Win 7+. Looking for a legacy build for XP/Vista? You can download it here. Or you can click here to go to our home page. Once there, click the Download button at the top center of the page, then choose your build and you are set. Linux server packages are also available. This release is backwards compatible with other 1.5-based builds (1.5.4, 1.5.3, 1.5.2, 1.5.1 and 1.5). However if you still use these versions, why not upgrade to the newest one? It works just as good, or even better. Community credits for this release: AboShanab, Arran, CrosRoad95, Dezash, Dutchman101, emre1702, Gothem, lopezloo, Necktrox, qaisjp, Sergeanur, ZReC ^ Have you contributed to MTA:SA 1.5.5's source code/resources pack but were not mentioned in the above list (or maybe you would like to modify your entry above eg. change your nickname or add a link to your Twitter/Github)? PM @jhxp with a link to your contribution (for missing entries only) and you will be added ASAP ^ See y'all. -- MTA Team1 point
-
1 point
-
1 point
-
I guess I'm going to use the weak values then. Thank you for your responses.1 point
-
What are you talking about? Lua is written in, not based on C. It's a managed, interpreted language (just like Java, unlike C/C++). It has a garbage collector, and it is there for a reason - to collect any data that can no longer be accessed (not referenced anywhere). Most of the times you don't need to worry about the garbage collector, it does its work, you do your work, and everyone is happy, but you can control it through the collectgarbage function if you need to. It's a managed language, you don't work with pointers directly.1 point
-
The server is in spanish, anyway I wanted to show you guys our new script! Still giving it the last touch but its already showable, hope you like it.0 points