Jump to content

AlvareZ_

Members
  • Posts

    611
  • Joined

  • Last visited

Everything posted by AlvareZ_

  1. Podrias buscas en el Map Editor algun objeto que sea una nota de seguro hay, Si no un libro luego al darle a alguna tecla con un sound (y animarla si quieres) usas dxDraw, Con dxDrawRectangle, dxDrawLine, dxDrawText Bastaría. Si te puedo seguir ayudando no lo dudes
  2. Hm la verdad que no lo entendi muy bien si el anterior no te anda prueba esto, Agregale eso a tu script -- Client function visible(isON) if getElementType ( localPlayer ) == "player" then if (isON) then triggerServerEvent("mirarlo", localPlayer) end end end addEventHandler("onResourceStart", getRootElement(), visible)
  3. Estas Mezclando Client-side con Server-Side, intenta esto: -- Client function visible() if getElementType ( localPlayer ) == "player" then triggerServerEvent("mirarlo", localPlayer) end end addEventHandler("onResourceStart", getRootElement(), visible) -- Server function jugador() setElementVisibleTo ( toggleFlashLight, source, true ) else setElementVisibleTo ( toggleFlashLight, source, false ) end addEvent("mirarlo", true) addEventHandler("mirarlo", getRootElement(), jugador)
  4. No te entendí muy bien, pero por lo que entendí quieres que la linterna se peque a el jugador para siempre podrías usar attachElementToElement
  5. Hm creo que por lo menos el debería intentar, No crearle el script Completo...
  6. getPlayerTeam getTeamName if spawnPlayer "onPlayerJoin" o "onPlayerLogin" --Quizas giveWeapon
  7. Creo con con el thePlayer igual serviría
  8. function giveWeapons ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then giveWeapon ( thePlayer, 31, 200 ) end end addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeapons)
  9. Esto: addEventHandler("onResourceStart", resourceRoot, function() local allTeams = getElementsByType ( "team" ) for index, theTeam in ipairs(allTeams) do if ( getTeamFriendlyFire ( theTeam ) == false ) then setTeamFriendlyFire ( theTeam, true ) end end)
  10. En la wiki esta todo ya como ejemplo, te recuerdo que es Server-Side -- Toma una tabla con todo los Equipos local allTeams = getElementsByType ( "team" ) -- Para cualquier equipo, for index, theTeam in ipairs(allTeams) do -- Si esta en modo apagado el Fuego entre Amigos, if ( getTeamFriendlyFire ( theTeam ) == false ) then -- Lo Enciende setTeamFriendlyFire ( theTeam, true ) end end
  11. No estoy seguro pero intenta: -- #Server-Side function bloqeo ( thePlayer, seat, jacked ) if ( seat == 0 ) then if (getElementModel( thePlayer ) == 67) or (getElementModel( thePlayer ) == 68) or (getElementModel( thePlayer ) == 69) or (getElementModel( thePlayer ) == 70) then outputChatBox ( "No puedes usar este Coche!", thePlayer, 255, 0, 0, false ) cancelEvent() end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), bloqeo )
  12. No entendi mucho pero te dejo un ejemplo quizás te sirva: local ejemplo = guiCreateProgressBar ( 535, 10, 294, 41, false ) -- Primero creas la ProgressBar dandole un nombre function progreso(progress) -- Creas la funcion definiendo progress if progress and getElementType ( progress ) == "gui-progressbar" then local ProgressValue = guiProgressBarGetProgress ( progress ) if ProgressValue > 99 then -- Si el progreso es de 99 luego dira el outputChatBox outputChatBox("asdasdas") end end end en tu caso podrias usar un setTimer cambiando el progreso de la barra cada determinado tiempo, me entiendes?
  13. Para la barra de progresión usas: guiCreateProgressBar
  14. creo que no hace falta el tonumber if (getElementData( thePlayer, "Level" ) < "10") then
  15. Intenta poniendo así TODO SERVER-SIDE: Mi error fue que onPlayerLevelUP es server-side function PrimerNivel(thePlayer) if (getElementData( thePlayer, "Level" ) < "10") then setPedStat(thePlayer, 77, 100) setPedStat(thePlayer, 74, 100) setPedStat(thePlayer, 79, 100) setPedStat(thePlayer, 78, 100) setPedStat(thePlayer, 70, 100) setPedStat(thePlayer, 69, 100) setPedStat(thePlayer, 71, 100) setPedStat(thePlayer, 72, 100) setPedStat(thePlayer, 76, 100) outputChatBox("Habilidad en Armas al 10%",thePlayer, 0, 255, 0, true) outputChatBox("[>---------]",thePlayer, 0, 255, 0, true) end end addEventHandler("onPlayerLevelUP", root, PrimerNivel)
  16. Buen detalle alex, Ejemplo: -- client function propiedades () local level = getElementData( localPlayer, "Level" ) if (level == 5) then triggerServerEvent("nivel1", localPlayer) end end addEventHandler ( "onPlayerLevelUP", resourceRoot, propiedades ) -- server function PrimerNivel() ---M60--- setPedStat(thePlayer, 77, 50) outputChatBox("+5 Skills M60",source, 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 50) outputChatBox("+5 Skills AA-12", source, 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 50) outputChatBox("+5 Skills Sniper/Rifle", source, 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 50) outputChatBox("+5 Skills Lanzagranadas", source, 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 50) outputChatBox("+5 Skills Silend",source, 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 50) outputChatBox("+5 Skills Pistola",source, 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 50) outputChatBox("+5 Skills Deagle", source, 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 50) outputChatBox("+5 Skills Shotgun", source, 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 50) outputChatBox("+5 Skills UMP", source, 0, 255, 0, true) end addEvent("nivel1", true) addEventHandler("nivel1", root, PrimerNivel)
  17. Intenta esto function propiedades () local level = getElementData( thePlayer, "Level" ) if (level == 5) then ---M60--- setPedStat(thePlayer, 77, 50) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 50) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 50) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 50) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 50) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 50) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 50) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 50) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 50) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 10 ) then ---M60--- setPedStat(thePlayer, 77, 100) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 100) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 100) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 100) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 100) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 100) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 100) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 100) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 100) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 15 ) then ---M60--- setPedStat(thePlayer, 77, 150) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 150) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 150) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 150) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 150) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 150) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 150) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 150) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 150) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 20 ) then ---M60--- setPedStat(thePlayer, 77, 200) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 200) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 200) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 200) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 200) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 200) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 200) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 200) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 200) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 25 ) then ---M60--- setPedStat(thePlayer, 77, 250) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 250) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 250) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 250) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 250) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 250) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 250) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 250) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 250) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 30 ) then ---M60--- setPedStat(thePlayer, 77, 300) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 300) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 300) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 300) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 300) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 300) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 300) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 300) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 300) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 35 ) then ---M60--- setPedStat(thePlayer, 77, 350) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 350) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 350) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 350) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 350) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 350) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 350) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 350) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 350) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 40 ) then ---M60--- setPedStat(thePlayer, 77, 400) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 400) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 400) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 400) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 400) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 400) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 400) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 400) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 400) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 45 ) then ---M60--- setPedStat(thePlayer, 77, 450) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 450) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 450) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 450) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 450) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 450) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 450) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun---
  18. playSound "onVehicleStartEnter" setSoundMaxDistance stopSound isVehicleLocked getElementPosition
  19. nada :c se crea como loco al darle seguido a f2 function main() if enabled == false then showCursor(true) start = getTickCount() addEventHandler("onClientRender",getRootElement(),window) setTimer( function() guiSetVisible(GUIEditor.button[1], true) guiSetVisible(GUIEditor.button[2], true) guiSetVisible(GUIEditor.gridlist[1], true) guiSetVisible(GUIEditor.staticimage[1], true) end, 1500, 1) else cancelEvent() removeEventHandler("onClientRender",getRootElement(),window) guiSetVisible(GUIEditor.button[1], false) guiSetVisible(GUIEditor.button[2], false) guiSetVisible(GUIEditor.gridlist[1], false) guiSetVisible(GUIEditor.staticimage[1], false) showCursor(false) end enabled = not enabled end bindKey ( "o", "down", main )
  20. entonces debería crear la gui en otra función y usando en esta solo guiSetVisible, no?
  21. Igual sale :c enabled = false function main() if enabled == false then showCursor(true) start = getTickCount() addEventHandler("onClientRender",getRootElement(),window) setTimer( function() GUIEditor = { gridlist = {}, staticimage = {}, button = {} } GUIEditor.button[1] = guiCreateButton(0.51, 0.48, 0.15, 0.09, "Darmelo", true) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(0.51, 0.63, 0.15, 0.09, "Cerrar", true) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.gridlist[1] = guiCreateGridList(0.32, 0.48, 0.14, 0.26, true) guiGridListAddColumn(GUIEditor.gridlist[1], "V.I.P", 0.9) for i = 1, 3 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Jetpack", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Spray", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Armor 50%", false, false) GUIEditor.staticimage[1] = guiCreateStaticImage(0.32, 0.23, 0.36, 0.22, "logo.png", true) end, 1500, 1 ) else cancelEvent() removeEventHandler("onClientRender",getRootElement(),window) guiSetVisible(GUIEditor.button[1], false) guiSetVisible(GUIEditor.button[2], false) guiSetVisible(GUIEditor.gridlist[1], false) guiSetVisible(GUIEditor.staticimage[1], false) showCursor(false) end enabled = not enabled end bindKey ( "o", "down", main )
  22. Muchas Gracias, Ya lo logre, Pero mira tengo la dxDraw como una ventana animada luego salen los complementos los botones y eso, al darles dos veces seguidas a el bindKey, solo se desaparece la dx y los botones salen mi duda es como cancelar esos botones tambies function main() if enabled == false then showCursor(true) start = getTickCount() addEventHandler("onClientRender",getRootElement(),window) setTimer( function() GUIEditor = { gridlist = {}, staticimage = {}, button = {} } GUIEditor.button[1] = guiCreateButton(0.51, 0.48, 0.15, 0.09, "Darmelo", true) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(0.51, 0.63, 0.15, 0.09, "Cerrar", true) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.gridlist[1] = guiCreateGridList(0.32, 0.48, 0.14, 0.26, true) guiGridListAddColumn(GUIEditor.gridlist[1], "V.I.P", 0.9) for i = 1, 3 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Jetpack", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Spray", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Armor 50%", false, false) GUIEditor.staticimage[1] = guiCreateStaticImage(0.32, 0.23, 0.36, 0.22, "logo.png", true) end, 1500, 1 ) else removeEventHandler("onClientRender",getRootElement(),window) showCursor(false) end enabled = not enabled end bindKey ( "o", "down", main ) Asi es para que se quite la dx pero no encuentro la manera de parar los botones también intente con destroyElement pero no sirvio
×
×
  • Create New...