-
Posts
1,410 -
Joined
-
Last visited
Everything posted by Arsilex
-
adaptar un resource de server sql a server de windows
Arsilex replied to david_mikito's topic in Scripting
ya te lo eh dixo esta en resource/sql/mysql.lua -
es para un server race por eso digo es que cada mapa esta en diferente posicion
-
como se hace eso de su rotación ?
-
function bot() for index, jugador in ipairs getElementsByType("player") do local x, y, z = getElementPosition(jugador) slothBot = exports [ "slothBot" ]:spawnBot ( x, y, z, 90, 287, 0, 0, Nemesis, 30, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothBot, 1000 ) outputChatBox ( "Zombie Bosses have been generated!!, run!", getRootElement(), 255, 0, 0, true ) end end addCommandHandler("crearbots", bot) prueba asi
-
No tiene nada que ver el Radios es el radio de quitar cosas osea si tu pones que quite la reja quitara todas las rejas en el radio de 20000 m
-
adaptar un resource de server sql a server de windows
Arsilex replied to david_mikito's topic in Scripting
los scripts / resource del paradise estan todos configurados con el sql si el sql no se conecto con un mysql no funciona un script . Primero necesitas un mysql segundo necesitas configurar el sql/mysql.lua y settings.xml que estan donde el mtaserver.conf cuando tengas eso te ira. -
local vehicle = getPedOccupiedVehicle ( localPlayer ) local x,y,z = getElementPosition( vehicle ) local Puta2 = createPed ( 63, x, y-7, z ) local Puta1 = createPed ( 34, x, y-5, z ) como hacer que las putas salgan solo a la izquerda y a la derecha del coche aun que cambie de coorendas ? es que aveces aparecen delantes aveces detras y etc
-
eso te dijo getTime y getRealTime
-
encendiéndolo a las 23:00 y poner un timer de 24:00 horas eso esta chupado...
-
Bueno es posible hacer para no poner tantos elseif como sikns permita y que solo ponga el ID del que quiero que muera???? osea lo que digo es if ( skin == 0 ) then para poner que en el skin 0 alli ponga muxos skins los que quiero bloquear y no poner siempre elseif (skin == 50 ) then y asi hasta bloquear todos se puede hacer con una tabla o algo y me podrian explicar como porfavor.
-
mira prueba desactivando 1 y activando los otros y asi siempre hasta que des con el error y si no aparece comenta aqui
-
e.e por que no se ve en colores es lua almenos eso ??? y de paso ese buy lo as creado tu o te lo dio el creador si te lo dio el creador pidele a el ayuda si lo has echo tu deverias saber donde crees que fallas
-
alomejor tienes algun script nuevo que no te deja encender el otro
-
cual es ese?
-
pos algun evento tendras mal o algo por que yo solo te arregle lo que te salia en el debug
-
es lo mismo que tengo yo solo que yo lo tengo con mas cosas asi que tampoco es que cambie.. sabe
-
sigue lo mismo en el debug?
-
si quieres lo puedes quitar yo uso eso por que me parece que es mas interesante el server con eso ._.
-
Prueba asi --Login function playerLogin(username,password,enableKickPlayer,attemptedLogins,maxLoginAttempts) if not (username == "") then if not (password == "") then local account = getAccount (username, password) if (account ~= false) then logIn (source, account, password) outputChatBox ("#ff0000* Has entrado correctamente.",source,255,255,255,true) outputChatBox ("#ff0000* Para activar el autologin utiliza /on",source,255,255,255,true) triggerClientEvent (source,"hideLoginWindow",getRootElement()) else if enableKickPlayer == true then if (attemptedLogins >= maxLoginAttempts-1) then outputChatBox ("#ff0000* Error",source,255,255,255,true) setTimer(outputChatBox,500,1,"#ff0000* Has alcanzado el numero maximo de intentos [#ff0000"..attemptedLogins+1 .."/"..maxLoginAttempts"]",source,255,255,255,true) setTimer(outputChatBox,1000,1,"#ff0000* Seras expulsado en 5 segundos",source,255,255,255,true) setTimer(kickPlayer,5000,1,source,"Logeo fallido") else outputChatBox ("#ff0000* Error",source,255,255,255,true) setTimer(outputChatBox,500,1,"#ff0000* Intentos:, [#ff0000"..attemptLogins+1 .."/"..maxLoginAttemps"#ff0000]",source,255,255,255,true) triggerClientEvent(source,"onRequestIncreaseAttempts",source) end else outputChatBox("#ff0000* Usuario/contrasena incorrecto/a",source,255,255,255,true) end end else outputChatBox("#ff0000* Ingresa tu contrasena",source,255,255,255,true) end else outputChatBox("#ff0000* Infresa tu nombre",source,255,255,255,true) end end --Registro function playerRegister(username,password) if not (username == "") then if not (password == "") then local account = getAccount (username,password) if (account ~= false) then local accountAdded = addAccount (tostring,(username),tostring,(password)) if (accountAdded) then triggerClientEvent (source,"hideLoginWindow",getRootElement()) outputChatBox ("#ff0000* Has sido registrado como"..username.."ff0000.Recuerda tu contrasena:"..password.."#ff0000.",source,255,255,255,true) setTimer (outputChatBox,1000,1,"#ff0000* Bienvenido a mi servidor.",source,255,255,255,true) else outputChatBox ("#ff0000* Elige un nombre/contrasena distinto",source,255,255,255,true) end else outputChatBox ("#ff0000* El nombre de usuario ya esta elegido",source,255,255,255,true) end else outputChatBox ("#ff0000* Ingresa tu contrasena, por favor",source,255,255,255,true) end else outputChatBox ("#ff0000* Ingresa tu nombre, por favor",source,255,255,255,true) end end --Para cuando el juegador vuelva, le pida de nuevo el login function playerLogout () triggerClientEvent (source,"onRequestDisplayPanel",source) end addEventHandler("onPlayerLogout",getRootElement(),playerLogout) --Eventos addEvent("onRequestLogin",true) addEvent("onRequestRegister",true) addEventHandler("onRequestLogin",getRootElement(),playerLogin) addEventHandler("onRequestRegister",getRootElement(),playerRegister) --Settings blackLoginScreen = true enableKickPlayer = true disallowLogout = false removeBlackScreenTime = 3 maxLoginAttempts = 3 -- addEvent("onRequestIncreaseAttempts",true) addEvent("onRequestDisplayPanel",true) function loginPanel() local xmlFile = xmlLoadFile ("user.xml") if xmlFile then if (status == tostring(true)) then if blackLoginScreen == true then fadecamera(false,0,0,0,0) end Panel = guiCreateWindow(307,297,625,352,"Login",false) guiWindowSetMovable(Panel,false) guiWindowSetSizable(Panel,false) panelinfo = guiCreateMemo(34,34,373,168,"Panel de login - Hecho por Xperia^\n\nInfo. del servido:\n\nDueno: Xperia^\n\nPatrocinador: GPC - Great Players Club\n\n------------\n\nSkype: thexperiaplay\n\nCorreo: [email protected]\n\n",false,Panel) guiMemoSetReadOnly(panelinfo,true) foto = guiCreateStaticImage(369,58,264,200,"images/mtalogo.png",false,Panel) nombre = guiCreateLabel(52,226,46,16,"Nombre",false,Panel) guiSetFont(nombre,"default-bold-small") contrasena = guiCreateLabel(52,254,68,16,"Contrasena",false,Panel) guiSetFont(contrasena,"default-bold-small") ponernombre = guiCreateEdit(134,223,272,22,"",false,Panel) ponerpass = guiCreateEdit(135,252,272,22,"",false,Panel) RegisterButton = guiCreateButton(218,301,184,29,"Registrarse",false,Panel) guiSetFont(RegisterButton,"default-bold-small") LoginButton = guiCreateButton(26,301,184,29,"Login",false,Panel) guiSetFont(LoginButton,"default-bold-small") GUIEditor_Scrollbar[1] = guiCreateScrollBar(381,38,17,156,true,false,Panel) showCursor(true) addEventHandler("onClientGuiClick",LoginButton,onClickLogin) addEventHandler("onClientGuiClick",RegistterButton,onClickRegisterToggle) addEventHandler("onRequestIncreaseAttempts",getRootElement(),increaseAttempts) attemptedLogins = 0 end xmlUnloadFile(xmlFile) else savexmlFile() end addEventHandler("onRequestDisplayPanel",getRootElement(),logoutHandler) end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),loginPanel) --LOGIN function loginButton(button,state) if (button == "left" and state == "up") then if (source == loginButton) then username = guiGetText(ponernombre) password = guiGetText(ponerpass) triggerServerEvent("onRequestLogin",getLocalPlayer(),username,password,enableKickPlayer,attemptedLogins,maxLoginAttempts) saveXmlFile() end end end --REGISTRO function registerButton(button,state) if (button == "left" and state == "up") then if (source == RegisterButton) then username = guiGetText(ponernombre) password = guiGetText(ponerpass) triggerServerEvent("onRequestRegister",getLocalPlayer(),username,password) end end end --MOSTRAR VENTANA LOGIN function ventanaLoginOn() guiSetVisible(panel,true) guiSetInputEnabled(true) showCursor(true) end addEvent("showLoginWindow",true) addEventHandler("showLoginWindow",getRootElement(),ventanaLoginOn) --QUITAR VENTANA LOGIN function ventanaLoginOff() guiSetInputEnabled(false) guiSetVisible(panel,false) showCursor(false) if blackLoginScreen == true then fadeCamera (true,removeBlackScreenTime) end end addEvent("hideLoginWindow",true) addEventHandler("hideLoginWindow",getRootElement(),ventanaLoginOff) --GUARDAR XML function saveXmlFile() local xmlFile = xmlLoadFile("user.xml") if not xmlFile then xmlFile = xmlCreateFile("user.xml","settings") end xmlNodeSetAttibrute(xmlFile,"username",guiGetText,tostring(guiEditText("ponernombre"))) xmlNodeSetAttribute(xmlFile,"password",guiGetText,tostring(guiEditText("ponerpass"))) xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) end --INTENTOS function attempts() attemptedLogins = attemptedLogins+1 end
-
addEvent ( "onBotWasted", true ) addEventHandler ( "onBotWasted", root, function( theKiller) exports.exp_system:addPlayerEXP ( theKiller, 50 ) givePlayerMoney ( theKiller, 1000 ) exports.extra_health:setElementExtraHealth ( theKiller, 80000 ) local r,g,b = getPlayerNametagColor ( theKiller ) --get the player's nametag colour local chatterName = getPlayerName ( theKiller ) outputChatBox ( chatterName.." #FF0000ha matado al nemesis", getRootElement(), r, g, b, true ) end ) si te sirve bien si no tambien bien
-
Tengo un porblema que es que cuando meto alguno nuevo en mi servidor que me eh comprado otro nuevo me sale el archivo no se encontro y tengo que reiniciar... el servidor alguna idea para arreglar eso