Jump to content

Monsthers

Members
  • Posts

    108
  • Joined

  • Last visited

Everything posted by Monsthers

  1. A que te refieres "Con dinero de internet"?
  2. Como lo puedes leer en el titulo, No saben de algun host para mta en ese precio? asi sea de 10slots
  3. Buenas a toda la comunidad de MTA, por medio de este hilo quiero presentarles mi servidor RPG llamado SAVG. Este servidor estuvo abierto anteriormente, Nada oficial (BETA), Pero esta vez si abrimos decididos a llegar lejos como RPG. Este servidor cuenta con trabajos desde civiles hasta criminales, Con grupo como el gobierno que ordena nuevas estructuras para San Andreas, Hasta partidos democraticos que arremeten contra el Sebin (Grupo de Seguridad Nacional). En este servidor podras encontrar gente con muy buen humor y ganas de pasar un buen rato, Amables y Respetuosos, Cualquier jugador incitando ala violencia o insultado sera kickead y hasta baneado. Contamos con miembros de staff muy amables, Si tienes alguna duda no tengas pena de preguntar ellos con gusto te responderan. Tenemos scripts de mucha calidad sin ningun fallo al menos el 99%. Scripts hechos por SAVG Scripting Team, En este servidor queremos que sea parte de ti, Tomando en cuenta cada reaccion negativa o positiva de algun jugador hacia algo dentro del servidor. ---------- Informacion del Servidor ---------- Nombre: SAVG:RPG | Policias, Criminales, Civiles, Clanes, Robos, Territorios Y Mas!Foro: http://savgrpg.esforos.com/IP: 144.217.92.2:27215GameMode; RPGMapa: San Andreas. ---------- Grupos del Servidor ---------- -----Movimiento Democratico----- Es un movimiento democratico, Que lucha en contra del gobierno y con la estabilidad del pais. El objetivo es tomar el control de la presidencia o dominar todo San Andreas y expropiarlo. Para ingresar a Este grupo, debe ser activo en juego como en el foro, y hablar con un miembro de dicho grupo para poder entrar, El te dira que hacer. -----SEBIN----- El Servicio Bolivariano de Inteligencia Nacional (SEBIN) es un organismo de inteligencia y contra-inteligencia interior y exterior de San Andreas, Este grupo Resguarda al gobierno junto a Lock & Load Security y la Policia Nacional Contra el Movimiento Democratico, Criminales Armados, Venta de Armas Ilegales, Y Ventas de Drogas. Su funcion es mantener San Andreas sin ningun revuelo, Para ingresar a Este grupo, debe ser activo en juego como en el foro, y hablar con un miembro de dicho grupo para poder entrar, El te dira que hacer. -----Lock & Load Security----- Este grupo se encarga de transportar el dinero de de todo San Andreas, Desde negocios hasta los bancos, Su funcion es llevar el camion de dinero hasta dicho lugar e hacer un papeleo donde se llevara una contabilidad de todo el dinero cargado y a donde se repartira dicho dinero, Lo mas dificil de esa labor es pasar desapercibido de cualquier criminal, Ya que por la inseguridad de San Andreas han asesinado muchos miembros de LLS para robar el camion y sacar el dinero. -----American Airline, inc----- Este grupo como dicho nombre lo dice, Es un grupo de pilotos donde tendras que transportar pasajeros que quieran migrar otro estado de San Andreas, La tarea mas dificil de este grupo es cuando trasladan al Presidente de San Andreas y el partido democrata intenta derrivar los aviones. -----San Andreas Event Manager----- Este grupo se encarga de todo lo que tenga que ver con eventos en todo San Andreas, Desde fiestas en la playa hasta guerras con M4. Este grupo puede crear variedades de eventos que dara muy buena recompensa a los ganadores -----Construccion Civil----- Este grupo se encargar de elaborar construcciones en todo San Andreas, Este grupo puede hasta detener el trafico para modificar una calle hasta crear nuevos puentes en todo San Andreas. -----CargoExpress----- Los trabajadores de CE se encargan de distrubuir mercancia a todo San Andreas, Es un grupo de camioneros que le apasiona su trabajo y el dinero y su labor es llevar cargas pesadas legales e ilegales en todo San Andreas ---------- Trabajos ---------- Civiles (Pilotos, Mecanicos, Taxistas, camioneros, Generales, Conductores de Autobus, Etc) Policias (Sheriff, Oficial de Policia, Vigilante de Prision) Criminales (Vendedor de armas, Vendedor de drogas, Ladron, entre otros) ---------- Gangs/Squads Y Compañias ---------- En SAVG puedes crear tu propia Gang/Squad o Compañia cuando quieras, Pero esta debe pasar por 5 niveles para se la numero 1. (Por cada nivel que hayas pasado se te dara una recompenza) ---------- SAVG Real State ---------- Usted puede comprar una propiedad visitando las cedes de Real State o Entrando en la Tablet y viendo cuales casas hay disponibles a la venta. Si hay una casa sin venta ni dueño puede hacer un topic explicando que la quiere comprar y a que precio (Siempre y cuando no tenga dueño y no este ala venta) Doy gracias a las personas que han dedicado minutos de su tiempo en leer definidamente este post, Y alas que se han pasado ya por el servidor sin ser anunciado oficialmente. Algunas fotos del servidor Sistema de Login Sistema de Prision Sistema de estrellas Sistema de Robos Sistema de Reparacion de autos Sistema de Comida Sistema de Housing Scoreboard Con Columnas Nuevas Sistema de Modificacion de Autos Sistema de Ventas de Autos de Segunda Mano Sistema de Ventas de Armas Pista de Carreras Sistema de Banco Sistema de ATM
  4. Hello everyone, since today I come looking for / recruiting scripters who want to help in a RPG based on the GM "Nerd Gaming" I have an ally that hosts the server and will take 40% of the server's revenue the other 60% I would stay for the scripter or for the money, I do not care, I'm not interested in that, I just want a good community and decent players! I have several scripting from my old RPG in Spanish and this only needs to change some functions of serElementData and other ribs! And scripter that we create new things and innovate in this server and be one of the best! Because not only I think to have this community in MTA if not in other games but, as time goes by growing all together! Anyone interested in joining fully leave a comment that I get to the private
  5. Hola a todos, pues el de hoy vengo buscando/reclutando scripters que quieran ayudar en un server RPG basado en el GM "Nerd Gaming" tengo un aliado que hostea el server y se llevara el 40% de los ingresos del server el otro 60% quedaría para los scripter yo por el dinero ni me preocupo no me interesa eso solo quiero una buena comunidad y con players decentes! Tengo varios scripting de mi antiguo RPG en español (Este es en ingles) y solo faltan cambiar unas funciones de serElementData y otras costillas! Y scripter que creemos nuevas cosas e innovemos en este server y seamos uno de los mejores! pues no solo pienso tener esta comunidad en MTA si no en otros juegos mas, al pasar el tiempo ir creciendo todos juntos! Algún interesado en unirse plenamente deje un comentario que yo les llego al privado
  6. Hola a todos, Tengo una duda muy grande, Pues me baje el GM Nerd Gaming y pues ando mejorando algunas cosas y cambiando algunas funciones, Tambien cambiando el nombre de las carpetas y el nombre en los exports pero tengo una duda por ejemplo esta export.NGphone:sendmessage yo lo cambio por export.(Nombre del server)Phone.SendMessage hasta hay todo bien pero triggerEvent y setElementData asi triggerEvent ( "NGEvents:onEventCreated", resourceRoot, eventInfo ) y tiene el "NG" si cambio ese NG por el nombre de mi server se podria bugear el script?
  7. ¿Empleais elementData? Si, Gamemode de base! WSS:RPG, Optimizacion? 50 a 60, He generado con SAVG 8.000bsf que es la moneda local de mi pais, Los que compraron el pack del servidor y el vip era venezolanos y pagaron con la moneda local!
  8. Hola gente de MTA, pues tengo un servidor RPG desde septiembre llamado SAVG pues con este servidor y gm me ha ido bien, de 10 a 20 players activos diarios. contaba con 6 staff y 2 admins yo como lider y mi otro socio colider! Pues yo solo cree el servidor el colider solo pagaba el hosting ya que no sabe de scripting solo subia algunos autos reales y ya (Lo tenia de colider porque lo conocia desde hace 2 años)! lo que hacia era pagar el hosting y ayudar a los players! Mientras que yo solo me mataba reparando los bugs y subiendo scripts al server! La cosa es que mi socio se fue el quiere crear su propio servidor de el solo y pues nos quedamos sin fondos para seguir con SAVG. Yo viviendo en venezuela se me hace muy dificil conseguir dolares para pagar un hosting y ya los host por sms a venezuela es imposible comprarlos (Era el metodo que usaba) Pues estoy buscando scripters que se quieran unir a mi comunidad plenamente y a alguien que quiera apoyarla economicamente, Ovbio si pagas le host pero no eres scripter ni nada no te dejaremos igual que un player normal te daremos vip y muchas bonificaciones mas! Gracias por leer esto y un cordial saludo!
  9. Me estas diciendo que tendre que darle pocicion de spawneo a todos los vehiculos? El script no me respawnea los vehiculos a su pocicion original. me los desaparece, Ejemplo el trabajo del piloto, Tengo un shamal en el aerepuerto de los santos y el piloto lo llevo al aereopuerto de san fierro. El respawn deberia poner el avion en su spawn original que vendria siendo el aereopuerto de los santos y no lo que hace es eliminar el coche entonces yo tendria que estar reseteando el script de vehiculos para poner el avion otra vez
  10. Hola gente de la comunidad tengo un problema y tal vez ustedes puedan solucionarmelo Pues tengo un sistema de respawn de autos pero no hace lo que quiero, osea el sistema va asi despues de cada 15 minutos el script da 60 segundos para respawnear los autos vacios hasta hay todo bien, cuando termina el tiempo elimina los autos vacios y asi no es como deberia funcionar osea deberia respawnear los autos vacios ala pocicion donde estaban... Mi server es RPG y mediante una registry tengo el spawn de los autos y bloqueados a dicha clase, pues cuando da el respawn me elimina los autos de los trabajos y deberia ponerlos en la posicion inicial o la pocicion que esta en la db. Creo que me explique bien, Gracias antemano respawnlock = false addEventHandler("onResourceStart", resourceRoot, function() mainTimer = setTimer(respawnVehicles, 900000, 0) end) function respawnVehicles() if not respawnlock then respawnlock = true exports.SAVGcommands:sendMessage("*RESPAWN* Respawneando todos los vehículos desocupados en 30 segundos!", 0, 255, 0, root) setTimer ( function(msg, target, r, g, b) exports.SAVGcommands:sendMessage(msg, r, g, b, target) end , 10000, 1, "*RESPAWN* Respawneando todos los vehículos desocupados en 20 segundos!!", getRootElement(), 0, 255, 0 ) setTimer ( function(msg, target, r, g, b) exports.SAVGcommands:sendMessage(msg, r, g, b, target) end, 20000, 1, "*RESPAWN* Respawneando todos los vehículos desocupados en 10 segundos!", getRootElement(), 0, 255, 0 ) setTimer ( function(msg, target, r, g, b) exports.SAVGcommands:sendMessage(msg, r, g, b, target) end, 25000, 1, "*RESPAWN* Respawneando todos los vehículos desocupados en 5 segundos!", getRootElement(), 0, 255, 0 ) setTimer ( vehrestask, 30000, 1) resetTimer(mainTimer) end end function respawnCommand(player) if not respawnlock then if exports.SAVGacl:isPlayerInGroup(player, "subadmin") then respawnVehicles() end else exports.SAVGcommands:sendMessage("*RESPAWN* Esperando respawneo completo para finalizar!", 0, 255, 0, player) end end addCommandHandler("vehiclerespawn", respawnCommand) function vehrestask() local resVehicles = getElementsByType("vehicle") exports.SAVGvehicles:fullRecache() for i,v in ipairs(resVehicles) do local occupants = getVehicleOccupants(v) -- Get all vehicle occupants local occupied = false if occupants then for seat, occupant in pairs(occupants) do if occupant then occupied = true break end end end if getVehicleController(v) then occupied = true end if not occupied then if getElementData(v, "WSSvehicles") then local id = tonumber(getElementData(v, "vehicleID")) if id then destroyElement(v) exports.SAVGvehicles:vehicleRecache(id) else destroyElement(v) end --[[elseif getElementData(v, "personalVehicle") then exports.WSShousing:vehicleRecache(v)]]-- else if not getElementData(v, "personalVehicleID") then destroyElement(v) end end end end if getResourceState(getResourceFromName("SAVGpublicvehicles")) == "running" then exports.SAVGpublicvehicles:spawnPublicCars() end exports.SAVGcommands:sendMessage("*RESPAWN* Todos los autos vacios han sido respawneados", 0, 255, 0, root) respawnlock = false end
  11. NO RESPONDAN ESTE TOPIC, YA SOLUCIONE EL PROBLEMA, PERO NO BORRO EL TOPIC YA QUE NO SE CON ESTE NUEVO FORO, GRACIAS DE TODOS MODOS
  12. Despues de haberle cambiado las funciones, sigue sin mostrar los jugadores que entran y sale pero hay algo curioso si habilito la opcion de que me anuncie quien entra y sale por outputchatbox si funciona pero por el sendLogMessage no funciona el problema seria aqui function sendLogMessage(msg,r,g,b) local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do if (getElementData(thePlayer, "keysPilotBound") == false) then triggerClientEvent(thePlayer,"newLogMessage",root,nil,thePlayer,msg,"log",r,g,b) end end end Pero no se que esta fallando, Asi me quedo el codigo despues de cambiar la funcion function scriptStart() setPlayerBlurLevel ( root, 0) setWeather ( 1 ) end addEventHandler ( "onResourceStart", resourceRoot, scriptStart ) -- from joinquit resource addEvent( 'onPlayerLogin',true) addEventHandler('onPlayerLogin', root, function() --outputChatBox('* ' .. getPlayerName(source) .. ' has joined the game [logged in]',root, 255, 100, 100) sendLogMessage('* ' .. getPlayerName(source) .. ' has joined the game [logged in]',255,100,100) end ) addEvent( 'onPlayerLogout',true) addEventHandler('onPlayerLogout',root, function () --outputChatBox('* ' .. getPlayerName(source) .. ' has left the game [logged out]',root, 255, 100, 100) sendLogMessage('* ' .. getPlayerName(source) .. ' has left the game [logged out]',255,100,100) end ) addEventHandler('onPlayerQuit', root, function(quitType, reason, responsibleElement) if getElementData( source , "loggedIn" ) then if quitType == "Kicked" or quitType == "Banned" then if responsibleElement then if isElement(responsibleElement) then responsibleElement = getPlayerName(responsibleElement) end else responsibleElement = "Unknown" end if not reason then reason = "unknown" end --outputChatBox('* ' .. getPlayerName(source) .. ' was ' .. quitType .. ' by ' .. getPlayerName(responsibleElement) .. ' [' .. reason .. ']',root, 255, 100, 100) sendLogMessage('* ' .. getPlayerName(source) .. ' was ' .. quitType .. ' by ' .. responsibleElement .. ' [' .. reason .. ']',255,100,100) else --outputChatBox('* ' .. getPlayerName(source) .. ' has left the game [' .. quitType .. ']',root, 255, 100, 100) sendLogMessage('* ' .. getPlayerName(source) .. ' has left the game [' .. quitType .. ']',255,100,100) end end end ) function sendLogMessage(msg,r,g,b) local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do if (getElementData(thePlayer, "keysPilotBound") == false) then triggerClientEvent(thePlayer,"newLogMessage",root,nil,thePlayer,msg,"log",r,g,b) end end end
  13. Hola amigos, tengo un problema uso este joinquit modificado para un server RPG donde antes usaba un sistema de login donde los usuarios quedaban registrado en una base de dato aparte ala de MTA, y el joinquit funcionaba bien, Ahora que cree un RPG distinto y mas facil de usar pues uso la database por defecto de mta y ahora el joinquit no me quiere funcionar el cambiado las funciones y nada. Y por eso estoy aqui haber si me pueden ayudar function scriptStart() setPlayerBlurLevel ( root, 0) setWeather ( 1 ) end addEventHandler ( "onResourceStart", resourceRoot, scriptStart ) -- from joinquit resource addEvent( 'onPlayerLogIn',true) addEventHandler('onPlayerLogIn', root, function() --outputChatBox('* ' .. getPlayerName(source) .. ' has joined the game [logged in]',root, 255, 100, 100) sendLogMessage('* ' .. getPlayerName(source) .. ' has joined the game [logged in]',255,100,100) end ) addEvent( 'onPlayerLogOut',true) addEventHandler('onPlayerLogOut',root, function () --outputChatBox('* ' .. getPlayerName(source) .. ' has left the game [logged out]',root, 255, 100, 100) sendLogMessage('* ' .. getPlayerName(source) .. ' has left the game [logged out]',255,100,100) end ) addEventHandler('onPlayerQuit', root, function(quitType, reason, responsibleElement) if getElementData( source , "loggedIn" ) then if quitType == "Kicked" or quitType == "Banned" then if responsibleElement then if isElement(responsibleElement) then responsibleElement = getPlayerName(responsibleElement) end else responsibleElement = "Unknown" end if not reason then reason = "unknown" end --outputChatBox('* ' .. getPlayerName(source) .. ' was ' .. quitType .. ' by ' .. getPlayerName(responsibleElement) .. ' [' .. reason .. ']',root, 255, 100, 100) sendLogMessage('* ' .. getPlayerName(source) .. ' was ' .. quitType .. ' by ' .. responsibleElement .. ' [' .. reason .. ']',255,100,100) else --outputChatBox('* ' .. getPlayerName(source) .. ' has left the game [' .. quitType .. ']',root, 255, 100, 100) sendLogMessage('* ' .. getPlayerName(source) .. ' has left the game [' .. quitType .. ']',255,100,100) end end end ) function sendLogMessage(msg,r,g,b) local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do if (getElementData(thePlayer, "keysPilotBound") == false) then triggerClientEvent(thePlayer,"newLogMessage",root,nil,thePlayer,msg,"log",r,g,b) end end end
  14. Hola comunidad española de MTA esta vez tengo un problema que no entiendo, pues tengo un script bajado de la comunidad que es un Vehicle System donde puedo bloquear los autos para team,class y user. El script funciona al pelo pero tiene algo que no me gusta y lo quiero cambiar la cosa es que cuando un jugador no es de una class,team o user que se ha bloqueado el auto le manda un mensaje con lo siguiente escrito "Este vehículo está bloqueado a el siguientes Grupo:Nombre del grupo al que ha sido bloqueado" Pues ese mensaje lo manda en outputchatbox y yo no lo quiero por hay si no un export que tengo. Pues le hago un export como estoy acostrumbado a hacerle a mis otros script y funciona y con este no, Aqui el script. function enterVehicle(player,seat,jacked) if getElementData(source,"lockedTo") then local carGroup = getElementData(source,"lockedTo") local lockKind = getElementData(source,"lockType") local carGroups = split(carGroup,",") local carCheckingTable = {} for i,v in ipairs(carGroups) do carCheckingTable[v] = true end if lockKind == "team" then local playerTeam = getTeamName(getPlayerTeam(player)) if seat == 0 then if not carCheckingTable[playerTeam] then cancelEvent() outputDebugString("Locked") exports.SAVGcommands:sendMessage("Este vehículo está bloqueado a el siguiente Equipo: ".. carGroup ..".",player,255,255,0) end end elseif lockKind == "user" then local playerAccount = getAccountName(getPlayerAccount(player)) if seat == 0 then if not carCheckingTable[playerAccount] then cancelEvent() outputDebugString("Locked") exports.SAVGcommands:sendMessage("Este vehículo está bloqueado a el siguiente Usuario: ".. carGroup ..".",player,255,255,0) end end elseif lockKind == "acl" then local playerAcl = isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(carGroup)) if seat == 0 then if playerAcl == false then cancelEvent() outputDebugString("Locked") outputChatBox("This vehicle is locked to ".. lockKind .. "(s) : ".. carGroup ..".",player,255,0,0) end end elseif lockKind == "class" then local playerClass = getElementData(player,"class") or "" if seat == 0 then if not carCheckingTable[playerClass] then cancelEvent() outputDebugString("Locked") exports.SAVGcommands:sendMessage("Este vehículo está bloqueado a el siguiente Clase: ".. carGroup ..".",player,255,255,0) end end elseif lockKind == "group" then local playerGroup = getElementData(player,"group") if seat == 0 then if not carCheckingTable[playerGroup] then cancelEvent() outputDebugString("Locked") outputChatBox("Este vehículo está bloqueado a el siguientes Grupo: ".. carGroup ..".",player,255,0,0) end end elseif lockKind == "gang" then local playerGang = getElementData(player,"gang") if seat == 0 then if not carCheckingTable[playerGang] then cancelEvent() outputDebugString("Locked") outputChatBox("Este vehículo está bloqueado a la siguiente Pandilla: ".. carGroup ..".",player,255,0,0) end end end end end
  15. Este login solo lee los miembros añadidos ala database "Registry.db" lo que quiero es que lea tambien los de acl! Yo tengo un panel para los staff que se loguen en la database pero el panel admin lo quiero para los miembros full.. Y como el panel loguea solo a los de database cuando un admin full entra tiene que loguearse manualmente usando /Login o /Register y asi no lo quiero! Quiero que lea a ambos (Ala database "Registry.db" y alos miembros añadidos a ACL) con el fin de loguear a ambos sin necesidad de estar uno manualmente y otro con el panel... Lo que quisiera sin mas pedir es que le añadan esa funcion ya el tiene las funciones para que logue alos de la database ahora si ustedes como ayuda podrian añadirle las funciones para que registre y logue alos de ACL asi podria tener el panel bien Gracias antemano
  16. Hola comunidad de MTA tengo un panel login que logea a miembros de SQL añadidos a registry.db mi problema es que he intentado que lea tambien a miembros de ACL pero se me ha hecho imposible, Era para pedirles una ayuda a ustedes haber si podian ayudarme :cc Quiero que registre y que haga logeo a miembros de SQL (Registry.db) y a miembros de ACL Si no es mucho pedir :c Gracias antemano Client local resX,resY = guiGetScreenSize() local login = {} local register = {} local feedback = {} login.rules = "Una vez que estes logeado, porfavor lee las reglas en F1, si no cumples las reglas puedes ser baneado del servidor, en F1 puedes encontrar informacion de trabajos, gangs, grupos, etc." login.message = "Ingresa tu usuario y clave" local passwordEditChanged = true function createGUI() local serial = getPlayerSerial() login.window = guiCreateWindow ( resX /2 -190 , resY /2-120 , 380, 240, "SAVG:RPG Ventana de Logeo", false ) login.savePWCheck = guiCreateCheckBox ( 285, 142.5, 16, 16, "", false, false, login.window ) login.ruleslabel = guiCreateLabel ( 10, 30, 360, 100, login.rules, false, login.window ) login.usernameEdit = guiCreateEdit ( 150, 110, 130, 25, "", false, login.window ) login.passwordEdit = guiCreateEdit ( 150, 140, 130, 25, "", false, login.window ) login.instructions = guiCreateLabel ( 72.5, 80, 240, 15, login.message, false, login.window ) login.save = guiCreateLabel ( 285, 158, 34, 18, "(Guardar)", false, login.window ) login.usernameLabel = guiCreateLabel( 80, 115, 60, 15, "Usuario:", false, login.window ) login.passwordLabel = guiCreateLabel( 80, 145, 60, 15, "Clave:", false, login.window ) login.loginbtn = guiCreateButton( 90, 190, 80, 30, "Logearse", false, login.window ) login.regbtn = guiCreateButton ( 190, 190, 80, 30, "Registrarse", false, login.window ) guiSetInputMode("no_binds_when_editing") guiSetFont ( login.loginbtn, "default-bold-small" ) guiSetFont ( login.regbtn, "default-bold-small" ) guiEditSetMasked(login.passwordEdit,true) guiSetFont ( login.save, "default-small" ) guiLabelSetColor ( login.ruleslabel, 255, 0, 0 ) guiSetFont ( login.ruleslabel, "default-bold-small" ) guiLabelSetHorizontalAlign ( login.ruleslabel, "center", true ) guiWindowSetMovable ( login.window, false ) guiWindowSetSizable ( login.window, false ) if not getElementData(localPlayer,"loggedIn") then showCursor(true) showBackground(true) guiSetVisible(login.window,true) guiSetInputEnabled(true) else showBackground(false) guiSetVisible(login.window,false) end -- register GUI register.window = guiCreateWindow ( resX /2 -250 , resY /2-200, 500, 400, "SAVG:RPG Ventana de Registro", false ) local registernode = xmlLoadFile("files/xml/register.xml") local registertext = xmlNodeGetValue(registernode) xmlUnloadFile(registernode) register.memo = guiCreateMemo( 5, 25, 490, 220, registertext, false, register.window ) guiCreateLabel ( 15, 262.5, 60, 15, "Usuario:", false, register.window ) register.useredit = guiCreateEdit ( 80, 260, 100, 25, "", false, register.window ) guiCreateLabel ( 15, 292.5, 60, 15, "Clave:", false, register.window ) register.passedit = guiCreateEdit ( 80, 290, 100, 25, "", false, register.window ) guiCreateLabel ( 190, 292.5, 100, 15, "", false, register.window ) guiCreateLabel ( 15, 322.5, 120, 15, "Confirmar Clave:", false, register.window ) register.confpassedit = guiCreateEdit ( 120, 320, 100, 25, "", false, register.window ) guiCreateLabel ( 15, 352.5, 60, 15, "Email:", false, register.window ) register.emailedit = guiCreateEdit ( 80, 350, 100, 25, "", false, register.window ) guiCreateStaticImage ( 310, 250, 115, 95, "files/images/savg.png", false, register.window ) register.regbtn = guiCreateButton ( 280, 350, 80, 25, "Register", false, register.window ) register.closebtn = guiCreateButton( 380, 350, 80, 25, "Cancelar", false, register.window ) guiEditSetMasked ( register.passedit, true ) guiEditSetMasked ( register.confpassedit, true ) if isElement(register.caselabel) then guiSetFont ( register.caselabel, "default-bold-small" ) end guiMemoSetReadOnly ( register.memo, true ) guiWindowSetMovable ( register.window, false ) guiWindowSetSizable ( register.window, false ) guiSetVisible ( register.window, false ) -- errorbox GUI feedback.window = guiCreateWindow ( resX /2 -150 , resY /2-100, 300, 200, "SAVG:RPG - Informacion", false ) guiSetProperty(feedback.window,"AlwaysOnTop","True") feedback.memo = guiCreateMemo ( 5, 25, 295, 125, "", false, feedback.window ) feedback.okbutton = guiCreateButton ( 110, 160, 80, 25, "OK", false, feedback.window ) guiMemoSetReadOnly ( feedback.memo, true ) guiWindowSetMovable ( feedback.window, false ) guiWindowSetSizable ( feedback.window, false ) guiSetVisible ( feedback.window, false ) -- Message GUI noticewindow = guiCreateWindow ( resX /2 -175 , resY /2-100, 350, 200, "SAVG:RPG - Informacion", false ) guiSetProperty(noticewindow,"AlwaysOnTop","True") guiSetAlpha(noticewindow, 1) noticetext = guiCreateLabel ( 15, 20, 332, 125, "", false, noticewindow ) noticeokbutton = guiCreateButton ( 135, 160, 80, 25, "OK", false, noticewindow ) guiWindowSetMovable ( noticewindow, false ) guiWindowSetSizable ( noticewindow, false ) guiSetText ( noticetext, "Por Favor Leer La Nota: Bievenido a SAVG:RPG un servidor con la mejor experiencia de juego, Por ahora estamos usando 2 Login por motivos de seguridad! Recuerda nuestro server es nuevo y no queremos que pierdas tus cosas! Pronto usaremos solo 1 estamos trabajando en eso." ) guiLabelSetColor(noticetext, 255,0,0) guiSetFont ( noticetext, "default-bold-small" ) guiLabelSetHorizontalAlign ( noticetext, "center", false ) guiSetVisible ( noticewindow, false ) guiBringToFront ( noticewindow ) addEventHandler("onClientGUIClick",resourceRoot,onWindowClicked) addEventHandler("onClientGUIAccepted",resourceRoot,onGUIAccepted) addEventHandler("onClientGUIChanged",resourceRoot,onEditChanged) loginFilePath = "files/xml/"..md5(serial.."SAVGlogin")..".xml" oldFile = xmlLoadFile("files/xml/login.xml") if oldFile then xmlNodeSetValue(oldFile,"") xmlSaveFile(oldFile) xmlUnloadFile(oldFile) oldFile = nil end loginFile = xmlLoadFile(loginFilePath) if loginFile then usernameNode = xmlFindChild(loginFile,"username",0) if not usernameNode then usernameNode = xmlCreateChild(loginFile,"username","") end --passwordNode = xmlNodeFindChild(loginFile,"password",0) passkeyNode = xmlFindChild(loginFile,"passkey",0) if not passkeyNode then passkeyNode = xmlCreateChild(loginFile,"passkey","") end local passwordNode = xmlFindChild(loginFile,"password",0) if passwordNode then xmlDestroyNode(passwordNode) end xmlSaveFile(loginFile) else loginFile = xmlCreateFile(loginFilePath,"login") usernameNode = xmlCreateChild(loginFile,"username","") passkeyNode = xmlCreateChild(loginFile,"passkey","") xmlSaveFile(loginFile) end fillCredentials() end addEventHandler("onClientResourceStart",resourceRoot,createGUI) function onWindowClicked(button,state) if button == "left" and state == "up" then if source == login.loginbtn then local username = guiGetText(login.usernameEdit):lower() local password = guiGetText(login.passwordEdit) if username and username ~= "" and password and password ~= "" then if passwordEditChanged then triggerServerEvent("SAlogin.playerLogin",localPlayer,username,md5(username.."SAVG"..password):lower(),getPlayerSerial()) else triggerServerEvent("SAlogin.playerLogin",localPlayer,username,password,getPlayerSerial()) end else showError("Ingresa un usuario y una contraseña.") end elseif source == login.regbtn then showRegister() showBackground(true) elseif source == register.closebtn then hideRegister() elseif source == feedback.okbutton then hideError() elseif source == noticeokbutton then hideMsg() elseif source == register.regbtn then local username = guiGetText(register.useredit):lower() local password = guiGetText(register.passedit) local confpass = guiGetText(register.confpassedit) local email = guiGetText(register.emailedit) if username and password and confpass and email and username ~= "" and password ~= "" and email ~= "" then if password == confpass then if #password >= 6 then password = md5(username.."SAVG"..password):lower() if string.find (email, "@") and string.find (email, "%.") then triggerServerEvent("SAlogin.playerRegisterAccount",localPlayer,username,password,email) else showError("Direccion de email incorrecta") end else showError("La clave debe tener como minimo 6 numeros") end else showError("Las claves no coinciden") end else showError("Llena todos los formatos por favor") end end end end function onGUIAccepted() if source == login.passwordEdit then local username = guiGetText(login.usernameEdit):lower() local password = guiGetText(login.passwordEdit) if username and username ~= "" and password and password ~= "" then if passwordEditChanged then triggerServerEvent("SAlogin.playerLogin",localPlayer,username,md5(username.."SAVG"..password):lower(),getPlayerSerial()) else triggerServerEvent("SAlogin.playerLogin",localPlayer,username,password,getPlayerSerial()) end else showError("Ingresa un usuario y una clave.") end end end function onEditChanged() if source == login.passwordEdit then passwordEditChanged = true end end function fillCredentials() -- we assume loginFile, passkeyNode and usernameNode exist if loginFile and passkeyNode and usernameNode then local usertext = xmlNodeGetValue(usernameNode) local passkey = xmlNodeGetValue(passkeyNode) if usertext and passkey and usertext ~= "" then guiSetText(login.usernameEdit,usertext) guiSetText(login.passwordEdit,passkey) guiCheckBoxSetSelected(login.savePWCheck,true) passwordEditChanged = false end end end function saveCredentials() if loginFile and passkeyNode and usernameNode then local usertext,passkey if guiCheckBoxGetSelected(login.savePWCheck) == false then usertext,passkey = "","" else usertext = guiGetText(login.usernameEdit):lower() passkey = guiGetText(login.passwordEdit) end if usertext and passkey then if passwordEditChanged then passkey = md5(usertext.."SAVG"..passkey):lower() end xmlNodeSetValue(usernameNode,usertext) xmlNodeSetValue(passkeyNode,passkey) xmlSaveFile(loginFile) --xmlUnloadFile(loginFile) loginFile = nil end end end addEventHandler("onClientResourceStop",resourceRoot,saveCredentials) function showLogin() showBackground(true)
  17. Hola gente del foro, tiempo sin postear aqui xdd, Pues vale tengo un script que es un housing y para poder usarlo correctamente necesito crear varias table en una database el problema es que no soy bueno en eso, podria decir bastante pesimo en cosas .db Y por eso busco ayuda aver quien me puede ayudar a crear las table Estos son ejemplos de el script local houses = executeSQLQuery("SELECT * FROM `housingdata`") local houses = executeSQLQuery("SELECT * FROM `housingdata` WHERE `id` = ?", houseID) executeSQLQuery("UPDATE `housingdata` SET `status`=1, `price`=? WHERE `id`=?", price, houseID) No tengo ni idea de que poner en la .db ya que no me dise ejemplo "housingdata TEXT" para guiarme no entiendo! Gracias por su colaboracion!
  18. Hola a todas las personas del foro, Como muchos ya saben tengo abierto desde diciembre un servidor RPG llamado SAMS! pues en estos ultimos meses, los compañeros con que he trabajado en 1.0 - 1.1 - 1.2 Se han ido alejando del proyecto debido a los estudios,problemas familiares entre otros pues! solo quede yo y otro compañero mas que apenas tiene tiempo por la escuela! Pues estoy buscando a personas interesadas en unirse a mi comunidad (Gratis) Yo puedo pagar todo el host! pero no a un scripter! no por no querer, Si no porque no me alcanza. Estoy es buscando a alguien que le interese crear un servidor y tenga tiempo suficiente... En esta vercion 1.3 Planeo cambiar todo! es como hacerlo desde 0 ya tengo el 60% de la vercion 1.3 con un sistema SQL bastante estable! pero necesito ayuda! yo solo no podria terminarlo y mi compañero pues aveces se conecta! Asi que alguien interesado en unirse a mi comunidad gratiutamente! Sera bienvenido! Por favor si no quieres unirte no compentes cosas como (Si no pagas nadien te ayudara) Como lo dije arriba! Busco a alguien que tenga pensado crear o quiera crear un servidor y tenga tiempo suficiente en SAMS:RPG sera bienvenido!
  19. Hello MTA, I have a problem with my server, I have 2 system, and I use 2 login! 1 for login in database SQl and other for login in registry! I need only use 1, 1 only login what do login and registry in database sql and registry normal! If I use only the login SQL no give me admin! I need use the second login for have admin! for that I use 2 login but I want only 1, Please help me, 2 login in 1 server is very bad and I don't know what do :C It is to unite the 2 Login in 1, Without having 2 gui! only 1 Code of login normal (Server) function PlayerLogin(username,password,checksave) if not (username == "") then if not (password == "") then local account = getAccount ( username, password ) if ( account ~= false ) then logIn(source, account, password) triggerClientEvent (source,"hideLoginWindow",getRootElement()) if checksave == true then triggerClientEvent(source,"saveLoginToXML",getRootElement(),username,password) else triggerClientEvent(source,"resetSaveXML",getRootElement(),username,password) end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","nombre de usuario y/o contraseña incorrecta!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","¡Por favor, introduzca su contraseña!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","¡Por favor, ingrese su nombre de usuario!") end end addEvent("onRequestLogin",true) addEventHandler("onRequestLogin",getRootElement(),PlayerLogin) function registerPlayer(username,password,passwordConfirm) if not (username == "") then if not (password == "") then if not (passwordConfirm == "") then if password == passwordConfirm then local account = getAccount (username,password) if (account == false) then local accountAdded = addAccount(tostring(username),tostring(password)) if (accountAdded) then outputChatBox ("#FF0000* #00FF00You Se ha registrado correctamente! [Nombre: #FFFFFF" .. username .. " #00FF00| Contraseña: #FFFFFF" .. password .. "#00FF00 ]",source,255,255,255,true ) else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Un error ha ocurrido !Elija un nombre de usuario/contraseña diferente.") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Una cuenta con este nombre de usuario ya existe!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Las contraseña no coinciden!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Por favor confirme su contraseña!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Por favor ingrese una contraseña!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Por favor, introduzca un nombre de usuario que desea registrar!") end end addEvent("onRequestRegister",true) addEventHandler("onRequestRegister",getRootElement(),registerPlayer) Code login normal (Client) wdwLogin_Pannel = {} tabPannel_Main = {} tab_Login = {} tab_Register = {} --Settings blackLoginScreen = false --True/false Black screen, while player login... blackScreenTime = 1000000 --Time to complete disappearance of the black screen in seconds. GuestEnable = false --Can a Player play as Guest, or no. [true/false] EnableMTAControlsOnLogin = false --Set false to not open the chat when you press "t" on fields, for example. [true/false] function open_log_reg_pannel() if not(isElement(wdwLogin_Pannel)) then if blackLoginScreen == true then fadeCamera(false,0,0,0,0) end local sWidth,sHeight = guiGetScreenSize() -- The variables local Width,Height = 350,284 --Main Window sizes local X = (sWidth/2) - (Width/2) --Main Window horizontal position local Y = (sHeight/2) - (Height/2) --Main Window vertical position toggleAllControls(EnableMTAControlsOnLogin) wdwLogin_Pannel = guiCreateWindow(X,Y,Width,Height,"SAMS:RPG Ventana De Logeo 2",false) guiWindowSetSizable(wdwLogin_Pannel,false) tabPannel_Main = guiCreateTabPanel(9,50,350,251,false,wdwLogin_Pannel) tab_Login = guiCreateTab("Login",tabPannel_Main) lbl_Login = guiCreateLabel(57,30,42,19,"Nombre:",false,tab_Login) guiLabelSetVerticalAlign(lbl_Login,"center") guiLabelSetHorizontalAlign(lbl_Login,"right",false) guiSetFont(lbl_Login,"default-bold-small") edit_Login = guiCreateEdit(110,30,130,23,"",false,tab_Login) --Поле ввода логина edit_password = guiCreateEdit(110,58,130,23,"",false,tab_Login) --Поле ввода пароля guiEditSetMaxLength ( edit_Login,25) guiEditSetMaxLength ( edit_password,25) guiEditSetMasked ( edit_password, true ) lbl_Password = guiCreateLabel(3,58,96,19,"Contraseña:",false,tab_Login) guiLabelSetVerticalAlign(lbl_Password,"center") guiLabelSetHorizontalAlign(lbl_Password,"right",false) guiSetFont(lbl_Password,"default-bold-small") --[[lbl_top_info = guiCreateLabel(74,6,244,35,"Enter with your username and password.",false,tab_Login) guiLabelSetColor(lbl_top_info,137,26,26) guiLabelSetVerticalAlign(lbl_top_info,"center") guiLabelSetHorizontalAlign(lbl_top_info,"center",false) guiSetFont(lbl_top_info,"default-bold-small")]] --[[lbl_about_legth = guiCreateLabel(142,42,184,18,"Max Length: 25 symbols",false,tab_Login) guiLabelSetColor(lbl_about_legth,253,255,68) guiLabelSetVerticalAlign(lbl_about_legth,"center") guiLabelSetHorizontalAlign(lbl_about_legth,"center",false)]] checkbox_save = guiCreateCheckBox(165,87,100,20,"(Guardar)",false,false,tab_Login) guiSetFont(checkbox_save,"default-small") btn_Login = guiCreateButton(110,140,130,40,"Login",false,tab_Login) guiSetFont(btn_Login,"default-bold-small") login_tab_error_msg = guiCreateLabel(0,112,350,25,"Error_login_tab",false,tab_Login) guiLabelSetColor(login_tab_error_msg,255,0,0) guiLabelSetVerticalAlign(login_tab_error_msg,"center") guiLabelSetHorizontalAlign(login_tab_error_msg,"center",false) guiSetFont(login_tab_error_msg,"default-bold-small") --Guest func if GuestEnable == true then btnGuest = guiCreateButton(29,168,94,32,"Play as Guest",false,tab_Login) guiSetFont(btnGuest,"default-small") guiSetVisible(btnGuest,true) else if isElement(btnGuest) then guiSetVisible(btnGuest,false) end btnGuest = nil end tab_Register = guiCreateTab("Register",tabPannel_Main) lbl_account_name = guiCreateLabel(13,39,119,21,"Nombre de la cuenta:",false,tab_Register) guiLabelSetVerticalAlign(lbl_account_name,"center") guiLabelSetHorizontalAlign(lbl_account_name,"right",false) guiSetFont(lbl_account_name,"default-bold-small") lbl_reg_top_info = guiCreateLabel(80,5,364,31,"No use caracteres especiales.",false,tab_Register) guiLabelSetColor(lbl_reg_top_info,255,234,55) guiLabelSetVerticalAlign(lbl_reg_top_info,"center") guiLabelSetHorizontalAlign(lbl_reg_top_info,"left",false) edit_account_name = guiCreateEdit(142,40,130,23,"",false,tab_Register) guiEditSetMaxLength ( edit_account_name,25) lbl__reg_tab_password = guiCreateLabel(13,71,119,21,"Contraseña:",false,tab_Register) guiLabelSetVerticalAlign(lbl__reg_tab_password,"center") guiLabelSetHorizontalAlign(lbl__reg_tab_password,"right",false) guiSetFont(lbl__reg_tab_password,"default-bold-small") edit__reg_tab_password = guiCreateEdit(142,71,130,23,"",false,tab_Register) guiEditSetMaxLength ( edit__reg_tab_password,25) edit__reg_tab_Repassword = guiCreateEdit(142,102,130,23,"",false,tab_Register) guiEditSetMaxLength ( edit__reg_tab_Repassword,25) lvl_reg_tab_Repassword = guiCreateLabel(13,102,119,21,"Repita Contraseña:",false,tab_Register) guiLabelSetVerticalAlign(lvl_reg_tab_Repassword,"center") guiLabelSetHorizontalAlign(lvl_reg_tab_Repassword,"right",false) guiSetFont(lvl_reg_tab_Repassword,"default-bold-small") btn_reg_tab_register = guiCreateButton(142,135,130,42,"Registrar",false,tab_Register) guiSetFont(btn_reg_tab_register,"default-bold-small") reg_tab_error_msg = guiCreateLabel(0,170,350,31,"Error_reg_ttab",false,tab_Register) guiLabelSetColor(reg_tab_error_msg,255,20,0) guiLabelSetVerticalAlign(reg_tab_error_msg,"center") guiLabelSetHorizontalAlign(reg_tab_error_msg,"center",false) guiSetFont(reg_tab_error_msg,"default-bold-small") guiEditSetMasked(edit__reg_tab_password, true) guiEditSetMasked(edit__reg_tab_Repassword, true) guiSetVisible(wdwLogin_Pannel,true) --guiSetInputEnabled(true) showCursor(true) --Изменение надписей: guiSetText(reg_tab_error_msg, "") --Поле ошибки в Reg табе guiSetText(login_tab_error_msg, "") --Поле ошибки в Login табе local username, password = loadLoginFromXML() if not( username == "" or password == "") then guiCheckBoxSetSelected ( checkbox_save, true ) guiSetText ( edit_Login, tostring(username)) guiSetText ( edit_password, tostring(password)) else guiCheckBoxSetSelected ( checkbox_save, false ) guiSetText ( edit_Login, tostring(username)) guiSetText ( edit_password, tostring(password)) end --Эвенты addEventHandler("onClientGUIClick",btn_Login,onClickBtnLogin) addEventHandler("onClientGUIClick",btn_reg_tab_register,onClickBtnRegister) if GuestEnable == true then addEventHandler("onClientGUIClick",btnGuest,onClickGuest) end --else --destroyElement(wdwLogin_Pannel) --guiSetInputEnabled(false) --wdwLogin_Pannel = nil --showCursor(false) end end function start_cl_resource() --При старте open_log_reg_pannel() end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),start_cl_resource) function loadLoginFromXML() --Загрузка логина и пароля из XML local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if usernameNode and passwordNode then return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) else return "", "" end xmlUnloadFile ( xml_save_log_File ) end function saveLoginToXML(username, password) --Сохрание логина и пароля в XML local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end xmlNodeSetValue (usernameNode, tostring(username)) end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, tostring(password)) end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("saveLoginToXML", true) addEventHandler("saveLoginToXML", getRootElement(), saveLoginToXML) function resetSaveXML() --Сохрание логина и пароля в XML local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, "") end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("resetSaveXML", true) addEventHandler("resetSaveXML", getRootElement(), resetSaveXML) function onClickBtnLogin(button,state) --При нажатии на кнопку Login if(button == "left" and state == "up") then if (source == btn_Login) then username =
  20. Hola tengo este trabajo para mi server RPG de trucker! pues el trabajo deberia funcionar! su funcion seria esta! El jugador hace spawn en la clase camionero! y al subirse a un camion le deben salir varios blip en el mapa! donde podra ir a cojer una carga! una vez llegado al blip estara un marke pero ni salen los blips ni los marke... ¿Cual es el problema? truckstation = {} truckstation[1]={2035.5, -2220.3, 12, 8, "Los Santos Airport"} -- LSA TRUCKPOINT truckstation[2]={2275.7, 30.6, 25.5, 8, "Palomino Creek"} -- PALOMINO CREEK TRUCKPOINT truckstation[3]={1349.8, 360.5, 18.5, 8, "Montgomery"} -- MONTGOMERY TRUCKPOINT truckstation[4]={-128.3, -360.9, 0.5, 8, "Blueberry"} -- BLUEBERRY TRUCKPOINT truckstation[5]={796.7, -606.6, 15.5, 8, "Dillimore"} -- DILLIMORE TRUCKPOINT truckstation[6]={-2476.22, 786.53, 34, 8, "SupaSave - San Fierro"} -- SUPASAVE IN SF TRUCKPOINT truckstation[7]={-1650.54,44.54,2, 8, "San Fierro Harbor"} -- SF TRUCKPOINT truckstation[8]={-2265.2, 2316.1, 3.8, 8, "Bayside"} -- BAYSIDE TRUCKPOINT truckstation[9]={-1264.1, 2701.7, 49.0, 8, "El Quebrados"} -- EL QUEBRADOS TRUCKPOINT truckstation[10]={-221.3, 2601.5, 61.7, 8, "Las Payasadas"} -- LAS PAYASADAS TRUCKPOINT truckstation[11]={-369.5, 2222.7, 41.5, 8, "E. C. Del Diablo"} -- EL CASTILLO DEL DIABLO TRUCKPOINT truckstation[12]={-859.4, 1556.3, 23.0, 8, "Las Barrancas"} -- LAS BARRANCAS TRUCKPOINT truckstation[13]={-33.8, 1174.9, 18.3, 8, "Fort Carson"} -- FORT CARSON TRUCKPOINT truckstation[14]={270.9, 1411.2, 9.5, 8, "F.C. Oil Refinery"} -- FORT CARSON OILRAFFENERY TRUCKPOINT truckstation[15]={829.7, 851.5, 11.0, 8, "Las Venturas Mine"} -- LV MINE TRUCKPOINT truckstation[16]={-559.77, -78.13, 62, 8, "The Panopticon"} -- The Panopticon TRUCKPOINT truckstation[17]={-1238.86, 17.28, 13, 8, "Easterbay Airport S.F."} -- SF AIRPORT TRUCKPOINT truckstation[18]={-1904.44, -1718.3, 20, 8, "Angel Pine Junkyard"} -- ANGEL PINE JUNKYARD TRUCKPOINT truckstation[19]={-1966.51, -2436.94, 29, 8, "Angel Pine Sawmill"} -- ANGEL PINE SAWMILL TRUCKPOINT truckstation[20]={-2316.96,-1633.2, 482, 8, "Mount Chilliad"} -- Mount Chilliad Truckpoint truckstation[21]={-1137.8, -1042.4, 127, 8, "The Truths Farm"} -- The Truths Farm Truckpoint truckstation[22]={1367.25, -1637.54, 12, 8, "Commerce"} -- Commerce Truckpoint truckstation[23]={2197.68, -2647.74, 13, 8, "Los Santos Docks"} -- LS Docks truckpoint truckstation[24]={2773.09, -1609.98, 9, 8, "East Beach"} -- East Beach truckpoint truckstation[25]={2819.34, 956.77, 9, 8, "Linden Side"} -- Linden side truckpoint -- truckstation[26]={2789.12, 2598.15, 9, 8, "Creek"} -- Creek truckpoint(Removed due to it being in GJMC base) truckstation[26]={1746.27, 2224.24, 9, 8, "Redsands West"} -- redsands west truckpoint truckstation[27]={1074.25, 1877.63, 9, 8, "Whitewood Estates"} -- whitewood estates truckpoint truckstation[28]={1419.32, 1053.19, 9, 8, "LVA Freight Depot"} -- LVA Depot truckpoint truckstation[29]={-1285.53, 2494.01, 87.06, 8, "Aldea Malvada"} -- Teirra Roboda truckpoint local trucks = {[403]=true,[514]=true,[515]=true} transportation = {} transportation[1] = {"Automobiles"} transportation[2] = {"Food"} transportation[3] = {"Drugs"} transportation[4] = {"Parts"} transportation[5] = {"Groceries"} transportation[6] = {"Parcels"} transportation[7] = {"Meat Products"} transportation[8] = {"Stone"} transportation[9] = {"Gravel"} transportation[10] = {"Toys"} transportation[11] = {"Clothing"} transportation[12] = {"Immigrants"} transportation[13] = {"Electronics"} transportation[14] = {"Frozen Food"} transportation[15] = {"Boxes"} transportation[16] = {"Steel Cables"} transportation[17] = {"Pallets"} transportation[18] = {"Recycled Goods"} transportation[19] = {"Woodchip"} transportation[20] = {"Food For Jolardy"} local trucker_save = 0 local truckAbleData = {["Camionero"]=true, ["All Load Trucking"]=true, ["Trucker"]=true} local mission = 0 -- === TRUCKERGUI truckerGUI = guiCreateWindow(0.2242,0.3369,0.5461,0.3594,"Estacion de Entregas - Panel",true) guiSetAlpha(truckerGUI,1) guiWindowSetSizable(truckerGUI,false) truckergridlist = guiCreateGridList(0.0129,0.0734,0.9742,0.7908,true,truckerGUI) guiGridListSetSelectionMode(truckergridlist,0) trucker_freight = guiGridListAddColumn(truckergridlist,"Carga",0.2) trucker_destination = guiGridListAddColumn(truckergridlist,"Destino",0.2) trucker_distance = guiGridListAddColumn(truckergridlist,"Distancia",0.2) trucker_money = guiGridListAddColumn(truckergridlist,"Dinero",0.2) trucker_illegal = guiGridListAddColumn(truckergridlist,"Ilegal",0.1) trucker_acceptBTN = guiCreateButton(0.0157,0.8859,0.2804,0.0842,"Aceptar",true,truckerGUI) trucker_closeBTN = guiCreateButton(0.7053,0.8859,0.2804,0.0842,"Cerrar",true,truckerGUI) guiSetVisible(truckerGUI, false) function truckerFunctions() if source == trucker_acceptBTN then local selected = guiGridListGetSelectedItem(truckergridlist) hideTruckStations() if selected >= 0 then local destination = guiGridListGetItemText(truckergridlist, selected, trucker_destination) local truckM = guiGridListGetItemText(truckergridlist, selected, trucker_money) local illegal = guiGridListGetItemText(truckergridlist, selected, trucker_illegal) if destination and destination ~= "" and truckM and truckM ~= "" then trucker_save = tonumber(truckM) for i, v in pairs(truckstation) do if truckstation[i][5] == destination then local marker = createMarker(truckstation[i][1], truckstation[i][2], truckstation[i][3], "cylinder", truckstation[i][4], 255, 100, 100, 30) setElementData(marker, "trucker", true) if isPedInVehicle(getLocalPlayer()) then addEventHandler("onClientMarkerHit", marker, showTruckerGUI) createBlipAttachedTo(marker, 42, 1) triggerServerEvent("attachTrailerNow", getPedOccupiedVehicle(getLocalPlayer()), getLocalPlayer()) guiSetVisible(truckerGUI, false) showCursor(false) if illegal == "Yes" then triggerServerEvent("setTruckerWanted", getLocalPlayer(), getLocalPlayer()) end break end end end end end end if source == trucker_closeBTN then guiSetVisible(truckerGUI, false) showCursor(false) showTruckStations() end end addEventHandler("onClientGUIClick", trucker_acceptBTN, truckerFunctions) addEventHandler("onClientGUIClick", trucker_closeBTN, truckerFunctions) -- === addEventHandler("onClientPlayerVehicleExit", getLocalPlayer(), function(vehicle, seat) if truckAbleData[getElementData(source, "class")] then if (mission == 1) then if not isElement(colExitTruck) then local x,y,z = getElementPosition(vehicle) colExitTruck = createColTube(x, y, z-5, 50.0, 50.0) outputChatBox("Oh, Se a desprendido tu carga! no te alejes mucho o la perderas!", 0, 200, 0) colSaveTruck = createColTube(x, y, z-1.5, 1.53, 2.5) attachElements(colSaveTruck, vehicle, 0, 1.5, -1) end else hideTruckStations() end end end) addEventHandler("onClientPlayerVehicleEnter", getLocalPlayer(), function(vehicle, seat) if truckAbleData[getElementData(source, "class")] then if trucks[getElementModel(vehicle)] and seat == 0 then if (mission == 1) then if isElement(colExitTruck) and (trailerIsLost == false) then if isElementWithinColShape(vehicle, colSaveTruck) then destroyElement(colExitTruck) destroyElement(colSaveTruck) outputChatBox("Tu carga se perdera vuelva rapido!", 255, 255, 0) else abortMission() destroyElement(colSaveTruck) destroyElement(colExitTruck) outputChatBox("Usted no está en el vehículo original en el que empezó. Misión abortada!", 255, 255, 0) end end --hideTruckStations() else showTruckStations() end end end end) -- addEventHandler("onClientColShapeHit", getLocalPlayer(), function() -- if (colSaveTruck) then -- if (mission == 1) then -- destroyElement(colSaveTruck) -- end -- else -- abortMission() -- destroyElement(colSaveTruck) -- outputChatBox("You changed trucks! Mission aborted!", 255, 255, 0) -- end -- end) addEventHandler("onClientPlayerWasted", getLocalPlayer(), function() hideTruckStations() guiSetVisible(truckerGUI, false) showCursor(false) if save_trailer then triggerServerEvent("killTrailer", save_trailer, localPlayer) save_trailer = nil end if mission == 1 then abortMission() end hideTruckStations() end) addEventHandler("onClientPlayerQuit", getLocalPlayer(), function() if save_trailer then triggerServerEvent("killTrailer", save_trailer, localPlayer) save_trailer = nil end end) --=========== FUNCTIONS function showTruckerGUI(trucker, dimension) if trucker == getLocalPlayer() and isPedInVehicle(getLocalPlayer()) and trucks[getElementModel(getPedOccupiedVehicle(getLocalPlayer()))] then trailer = nil local trailer = getVehicleTowedByVehicle(getPedOccupiedVehicle(getLocalPlayer())) if isPedInVehicle(localPlayer) then if mission == 1 and not trailer then if isElement(save_trailer) then triggerServerEvent("destroyTrailerNow",save_trailer,localPlayer) save_trailer = nil showTruckStations() end end if trailer and trailer == save_trailer then setTimer(fadeScreenOut, 2000, 1) fadeCamera(false,1) outputChatBox("Has entregado correctamente la entrega y que ganó $"..trucker_save, 255,255,255) exports.SAcommands:giveMoney(getLocalPlayer(),trucker_save) mission = 0 elseif trailer then triggerServerEvent("destroyTrailerNow",trailer,localPlayer) elseif mission == 0 then triggerEvent("onClientGUIRequest",resourceRoot,"trucker.truckergui","Estacion de Entregas - Panel") end trucker_save = 0 else outputChatBox("Debe estar en su camión para abrir el menú!", 0, 200, 0) end end end function fadeScreenOut() showTruckStations() triggerServerEvent("destroyTrailerNow",save_trailer,localPlayer) save_trailer = nil fadeCamera(true, 1) triggerEvent("onClientGUIRequest",resourceRoot,"trucker.truckergui","Estacion de Entregas - Panel") end function showActualTruckerGUI (id) if isPedInVehicle(localPlayer) then if id == "trucker.truckergui" then fillTruckerList() guiSetVisible(truckerGUI, true) showCursor(true) setTimer(setElementFrozen, 500, 1, getPedOccupiedVehicle(getLocalPlayer()),true) setTimer(setElementFrozen, 1500, 1, getPedOccupiedVehicle(getLocalPlayer()),false) end end end addEventHandler("onClientGUIShow",resourceRoot,showActualTruckerGUI) function fillTruckerList() guiGridListClear(truckergridlist) for i, place in pairs(truckstation) do local x, y, z = getElementPosition(getLocalPlayer()) local distance = getDistanceBetweenPoints3D(x, y, z, truckstation[i][1], truckstation[i][2], truckstation[i][3]) if distance > 50 then local distance = math.round(distance, 0, "ceil") local row = guiGridListAddRow(truckergridlist) if getDistanceBetweenPoints3D(x, y, z, truckstation[17][1], truckstation[17][2], truckstation[17][3]) < 20 then freight = "Drugs" else local number = math.random(1,20) freight = transportation[number][1]
  21. Hello everyone! I have a housing for a server RPG. A housing like this My question is. Who can help me for repair this script in private! and I can or sell you. or give it. Thanks.
  22. Delete Please
  23. Delete Please
  24. Hello again! I just have 3 script with error! 1 Solved for community <3 and 2 with error! this time is a login system I have a login with system sql! this login is good but i need what to login too in acl. I need add a function from login player of ACL! this login just login player in groups SQL, But I want the two login in sql and ACL. Help me! this login use database.db just login player in database.db And i want too acl. For I be admin i need use /login name and password i need only with click in button "Login" login me in database and acl local blockedUsernames = {["console"] = true,["admin"]= true,["moderator"]= true,["guest"]= true,["none"]= true,["sams"]= true,["[sams]"]= true,["sa agencia de casas"]= true,["sa_agencia_de_casas"] = true} function playerLogin(username,password,serial) if getElementData(source,"loggedIn") then return triggerClientEvent(source,"SAlogin.errorBox",source,"Ya estas logeado.") end local ip = getPlayerIP(source) local playername = getPlayerName(source) local playerQuery = executeSQLQuery("SELECT id, loggedin FROM user_data WHERE username = ? AND pwsalted = ? LIMIT 1",username,password) if playerQuery and #playerQuery > 0 then if (playerQuery[1].loggedin == 1) then return triggerClientEvent(source,"SAlogin.errorBox",source,"Tu cuenta ya se encuentra en uso.") end local account = setElementData(source,"username",username) local id = setElementData(source,"id",playerQuery[1].id) if account and id then local thetime = getRealTime() local MM = thetime.month+1 if MM < 10 then MM = "0"..MM end local DD = thetime.monthday if DD < 10 then DD = "0"..DD end local thedate = (thetime.year+1900).."-"..MM.."-"..DD local ip = getPlayerIP(source) local serial = getPlayerSerial(source) executeSQLQuery("UPDATE user_data SET lastlogin = '"..thedate.."', ip = '"..ip.."', serial = '"..serial.."', loggedin = 1 WHERE username = '"..username.."'") outputChatBox("Usted se a logeado con el nombre de usuario: "..username,source,0,255,255) setElementData(source,"loggedIn",true) triggerEvent("onPlayerLogIn",source,playerQuery[1].id,username) triggerClientEvent(source,"SAlogin.clearLoginGUI",source) outputServerLog(("SAlogin: %s has successfully logged in as %q. (IP: %s Serial: %s)"):format(playername,username,ip,serial)) triggerClientEvent(source,"SAlogin.hideLogin",source,true) else triggerClientEvent(source,"SAlogin.errorBox",source,"Error de login.") end elseif playerQuery then triggerClientEvent(source,"SAlogin.errorBox",source,"Contraseña no especificada.") outputServerLog(("SAlogin: %s failed to log in as %q. Wrong password. (IP: %s Serial: %s)"):format(playername,username,ip,serial)) else triggerClientEvent(source,"SAlogin.errorBox",source,"Ocurrio un error, por favor intentalo de nuevo") end end addEvent("SAlogin.playerLogin",true) addEventHandler("SAlogin.playerLogin",root,playerLogin) function registerPlayer(username,password,email) if username and password and email then if not blockedUsernames[username] then if not username:match("[%s%p]") then local accountQuery = executeSQLQuery("SELECT id FROM user_data WHERE username=? LIMIT 1",username) if accountQuery and #accountQuery == 0 then if executeSQLInsert("user_data","'"..username.."','"..password.."','"..email.."',0,0,1000,0","'username','pwsalted','email','wanted','jailed','money', 'loggedin'") then triggerClientEvent(source,"SAlogin.showLogin",source) triggerClientEvent(source,"SAlogin.errorBox",source,"Registro de la cuenta terminada. Su nombre de usuario es "..username..". Recuerdalo.") else triggerClientEvent(source,"SAlogin.errorBox",source,"Error en registro de cuenta") end elseif accountQuery and #accountQuery > 0 then triggerClientEvent(source,"SAlogin.errorBox",source,"Este nombre de cuenta ya esta registrado") else triggerClientEvent(source,"SAlogin.errorBox",source,"Error en registro de cuenta") end else triggerClientEvent(source,"SAlogin.errorBox",source,"El nombre de usuario que se registra no debe tener ningun espacio o puntuacion") end else triggerClientEvent(source,"SAlogin.errorBox",source,"Esta nombre de usuario esta bloqueado") end end end addEvent("SAlogin.playerRegisterAccount",true) addEventHandler("SAlogin.playerRegisterAccount",root,registerPlayer) function markAsLogOut() local id = getElementData(source,"id") if id then executeSQLUpdate("user_data","loggedin = 0","id = "..id) end end addEventHandler("onPlayerQuit", root,markAsLogOut) addEvent("onPlayerLogOut",true) addEventHandler("onPlayerLogOut",root,function() setElementData(source,"loggedIn",false) local username = getElementData(source,"username") local id = getElementData(source,"id") if id then executeSQLUpdate("user_data","loggedin = 0","id = "..id) end if not username then username = "N/A" end local ip = getPlayerIP(source) local serial = getPlayerSerial(source) if ip and serial then outputServerLog("SAlogin: "..getPlayerName(source).." ha cerrado la sesion '"..username.."' (IP: "..ip.." Serial: "..serial..")") end setElementData(source,"username",nil) setElementData(source,"id",nil) triggerClientEvent(source,"SAlogin.showLogin",source) killPed(source) fadeCamera(source,false) setElementInterior(source,0) setElementDimension(source,0) end) executeSQLQuery("CREATE TABLE IF NOT EXISTS user_data (id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT, pwsalted TEXT, groups TEXT, email TEXT, money INTEGER, wanted TINYINT, jailed BOOLEAN, lastnick TEXT, lastlogin TEXT, loggedin INTEGER, ip TEXT, serial TEXT)")
×
×
  • Create New...