-
Contenido
428 -
Ingreso
-
Última visita
-
Días ganados
3
Tipo de contenido
Perfiles
Events
Foros
Descargas
Todo lo publicado por Therichter
-
:0 yo tambien me apunto soy un novato en los de scrips pero estoy aprendiendo poco a poco :3
-
Buenos amigos y amigas asdf tengo varias semanas preguntando y pidiendo ayuda y es hora de que yo los ayude xD este es una gui para enseñarles poner un panel de animaciones el panel ya esta echo solo le dare los codigos para que ustedes lo agan como gusten le agrege algunas animaciones de mi parte pero tranquilos si no saben yo les enseños xD bueno empezemos Este es el meta :3 <meta> <info author="Nombre" version="1.2" name="Animations" decription="Animations system" type="script" /> <script src="animations-client.lua" type="client" /> <script src="animations-server.lua" type="server" /> <map src="animations.map" /> </meta> crean un archivo punto lua llamado animations-server.lua y pegan este codigo este seria el server.lua :3 function setAnimation(animationBlock,animationID) setPedAnimation(source,animationBlock,animationID) end addEvent("setAnimation",true) addEventHandler ("setAnimation",getRootElement(),setAnimation) bueno ahora crearemos otro archivo pero con el nombre animations-client.lua este seria el client pegan este codigo pos hay un archivo que se llama bindKey("F3","down",toggleVisible) esa el f3 es para que cuendo le des aparesca el panel eso lo pueden cambiar si lo quieren por ejemplo si no quiero que sea f3 si no f2 lo cambian y listo local resX, resY = guiGetScreenSize() function makeAnimationGUI() animationWindow = guiCreateWindow(resX/2-150,resY/2-200,300,400,"Animations",false) guiSetVisible(animationWindow,false) animationCategoryList = guiCreateGridList(0.01,0.1,0.45,0.7,true,animationWindow) animationList = guiCreateGridList(0.48,0.1,0.45,0.7,true,animationWindow) column1 = guiGridListAddColumn(animationCategoryList,"Category",0.8) column2 = guiGridListAddColumn(animationList,"Animation",0.8) stopButton = guiCreateButton(0.01,0.8,0.9,0.3,"Stop Animation",true,animationWindow) addEventHandler("onClientGUIClick",stopButton,function() setPedAnimation(getLocalPlayer(),nil,nil) end) for k, v in ipairs (getElementsByType("animationCategory")) do local row = guiGridListAddRow(animationCategoryList) guiGridListSetItemText(animationCategoryList,row,column1,getElementID(v),false,false) end addEventHandler("onClientGUIClick",animationCategoryList,getAnimations) addEventHandler("onClientGUIClick",animationList,setAnimation) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),makeAnimationGUI) function toggleVisible() if (guiGetVisible(animationWindow) == false) then guiSetVisible(animationWindow,true) showCursor(true) else guiSetVisible(animationWindow,false) showCursor(false) end end bindKey("F3","down",toggleVisible) function getAnimations() selectedCategory = guiGridListGetItemText(animationCategoryList,guiGridListGetSelectedItem(animationCategoryList),1) if (selectedCategory ~= "") then guiGridListClear(animationList) for k, v in ipairs (getElementChildren(getElementByID(selectedCategory))) do local row = guiGridListAddRow(animationList) guiGridListSetItemText(animationList,row,column1,getElementID(v),false,false) end end if (selectedCategory == "") then guiGridListClear(animationList) end end function setAnimation() selectedAnimation = guiGridListGetItemText(animationList,guiGridListGetSelectedItem(animationList),1) if (selectedAnimation ~= "") then if (not isPlayerDead(getLocalPlayer())) then if (isPedInVehicle(getLocalPlayer()) == false) then local animationBlock = getElementData(getElementByID(selectedAnimation),"block") local animationID = getElementData(getElementByID(selectedAnimation),"code") triggerServerEvent("setAnimation",getLocalPlayer(),animationBlock,animationID) else outputChatBox("You cannot use animations while in a vehicle.",255,0,0) end else outputChatBox("You cannot use animations while you are dead.",255,0,0) end end end bueno ahora se crean un archivo map y le pondremos animations.map y le pegamos este codigo aki es donde pueden poner su animaciones para el panel las animaciones las puedes obtener del feroman animaciones solo copias el block de la animacion y el codigo para que alguien le de al nombre y aga la animacion <map> <animationCategory id="Bailes"> <animation id="Baile 1" block="DANCING" code="bd_clap" /> <animation id="Baile 2" block="DANCING" code="bd_clap1" /> <animation id="Baile 3" block="DANCING" code="dance_loop" /> <animation id="Baile 4" block="DANCING" code="DAN_Down_A" /> <animation id="Baile 5" block="DANCING" code="DAN_Left_A" /> <animation id="Baile 6" block="DANCING" code="DAN_Loop_A" /> <animation id="Baile 7" block="DANCING" code="DAN_Right_A" /> <animation id="Baile 8" block="DANCING" code="DAN_Up_A" /> <animation id="Baile 9" block="DANCING" code="dnce_M_a" /> <animation id="Baile 10" block="DANCING" code="dnce_M_b" /> <animation id="Baile 11" block="DANCING" code="dnce_M_c" /> <animation id="Baile 12" block="DANCING" code="dnce_M_d" /> <animation id="Baile 13" block="DANCING" code="dnce_M_e" /> </animationCategory> <animationCategory id="Especiales"> <animation id="Fap" block="PAULNMAC" code="wank_loop" /> <animation id="Dormir 1" block="CRACK" code="crckidle1" /> <animation id="Dormir 2" block="CRACK" code="crckidle2" /> <animation id="Sentarse" block="Attractors" code="Stepsit_loop" /> <animation id="Parkour 1" block="DAM_JUMP" code="Jump_Roll" /> <animation id="Parkour 2" block="DAM_JUMP" code="DAM_Launch" /> <animation id="Parkour 3" block="DAM_JUMP" code="DAM_Dive_Loop" /> <animation id="Llorar" block="GRAVEYARD" code="mrnF_Loop" /> <animation id="Besar" block="KISSING" code="Grlfrd_Kiss_02" /> <animation id="Aviso" block="MISC" code="BMX_comeon" /> </animationCategory> </map> bueno eso seria todo cual quier duda o problema que tengan me dicen :3
-
listo ya no tengo ese problema pero ahora lo que no me cuadra es que el spaneo a varios lugares y quiero cuando el spawn del inicio sea este -376.650390625, -1455.236328125, 25.7265625 y cuando muera me mande a esa posicion tambien y cuando muero me cambia el skin y me borras los datos por ejemplo me saca del clan y me borra el dinero y me borra las habilidades ayudenme con eso ya le paso los codigo del play :3 este es el meta <meta> <info author="BrophY" description="A playtest/freeroam mode" version="1" type="gamemode" /> <include resource="freeroam" /> <include resource="spawnmanager" /> <settings> <setting name="*spawnreset" value="onSpawn" friendlyname="Spawn Reset" accept="onSpawn,onServerEmpty,onServerStart" desc="When should a new spawnpoint be chosen?" /> </settings> <map src="broph.map" /> <script src="broph.lua"/> </meta> Este es el lua local spawnpoint addEventHandler("onResourceStart", resourceRoot, function() spawnpoint = getRandomSpawnPoint() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) if not isElement(player) then return end if get("spawnreset") == "onSpawn" then spawnpoint = getRandomSpawnPoint() end exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) repeat until setElementModel(player,math.random(312)) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end function getRandomSpawnPoint () local spawnpoints = getElementsByType("spawnpoint") return spawnpoints[math.random(1,#spawnpoints)] end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerQuit",root, function () if getPlayerCount() == 1 and get("spawnreset") == "onServerEmpty" then spawnpoint = getRandomSpawnPoint() end end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end )
-
saxi es haci que lo quiero dejar, quitar el panel y dejar los comandos y daniel no lo tengo el gamemode play lo tengo en amx me diste una idea lo probare aver que pasa xDD
-
e.e no es haci yo quiero dejar el feroman lo que no me cuadra es su panel de f1 ese es que quiero quitar
-
como hago para quitarle el panel de f1 del feroman espero que me ayuden :3
-
ayuda con esto como ago que mis players no se maten
tema responde a xmxexyx3xr de Therichter en Scripting MTA
Y donde podria agregar eso xDD -
ok gracias saxi ya se las estoy agregando :3
-
Daniel no es una copia yo respeto mucho a chile y no seria original si me copio de ellos por eso ago mis cosas aparte pero si no se una cosas le pregunto a la comunidad xD Funki entonces tengo que crear un la barra de pogreso aparte y la uno al client ?
-
mi poblema es que cuando activo mi recurso solo aparece lo que escribe en el pero no me aparece el progreso de la barra y tambien quiero ver si esta bien el server.lua la funcion es cuando mate zombies suba la experiencia y el nivel ayuda y gracias por esto :33
-
ya pueden cerrar este tema arregle mis problemas gracias :33
-
usa el gui editor con el podras hacer lo que sea yo tambien tengo tu problema eh intentado hacer la puta barra y me cuesta sin una guia o un tuto no puedo pero eh avanzado a lo coñaso (apretando todas las funciones del gui editor) jajaja asi eh aprendido a como crear cosas pero no es tan facil que digamos todo a su tiempo te deseo suerte amigo :33
-
quiero aprender hacer un selector de personaje como el del zombiemodroleplay se que es dificil pero con su ayuda sera mas facil gracias por ver mi problema y perdon por las molestias
-
ya arregle ese problema gracias y perdon por las molestias xD
-
ok gracias stark pero nesecito ayuda con eso function PlayerDied(ammo,killer) if killer and getElementType ( killer ) == "player" then local Score = getElementData(killer,"Score") setElementData(killer,"Score",Score+1) end setTimer(PlayerRespawn,1000,1,source) end addEventHandler("onPlayerWasted",getRootElement(),PlayerDied) function PlayerRespawn(diedPlayer) if not diedPlayer then else toggleAllControls(diedPlayer,true) spawnPlayer ( diedPlayer, -1952,271,41, 355.4488525390,playerSkin[diedPlayer][1]) setCameraTarget (diedPlayer, diedPlayer)
-
hola saxi tengo otro problema cuando muere el player se le trasporta para el hospital de los santo pór que sera function PlayerDied(ammo,killer) if killer and getElementType ( killer ) == "player" then local Score = getElementData(killer,"Score") setElementData(killer,"Score",Score+1) end setTimer(PlayerRespawn,1000,1,source) end addEventHandler("onPlayerWasted",getRootElement(),PlayerDied) function PlayerRespawn(diedPlayer) if not diedPlayer then else toggleAllControls(diedPlayer,true) spawnPlayer ( diedPlayer, -1952,271,41, 355.4488525390,playerSkin[diedPlayer][1]) setCameraTarget (diedPlayer, diedPlayer) que tengo ayi malo o que me falta ?? EDIT: Usa [lua]codigo[/lua] para leer correctamente el codigo.
-
ok gracias saxi me as ayudado bastante :33 estoy aprendiendo gracias a ti y al foro :,D
-
addEventHandler("onClientResourceStart,getResourceRootElement() function() panel = guiCreateWindow(234, 200, 317, 258, "Panel De Usuario", true) guiWindowSetSizable(panel, true) cerrar = guiCreateButton(248, 20, 59, 27, "Cerrar", true, panel) pers = guiCreateButton(14, 20, 59, 27, "Personaje", true, panel) inve = guiCreateButton(91, 20, 59, 27, "Inventario", true, panel) psona = guiCreateButton(166, 20, 59, 27, "Personal", true, panel) end ) seria algo haci ?
-
addEventHandler("onClientResourceStart", resourceRoot, function() panel = guiCreateWindow(234, 200, 317, 258, "Panel De Usuario", true) guiWindowSetSizable(panel, true) cerrar = guiCreateButton(248, 20, 59, 27, "Cerrar", true, panel) pers = guiCreateButton(14, 20, 59, 27, "Personaje", true, panel) inve = guiCreateButton(91, 20, 59, 27, "Inventario", true, panel) psona = guiCreateButton(166, 20, 59, 27, "Personal", true, panel) end este es mi panel xD le faltan las funciones y otras weas pero quiero es que cuando active ese recurso salga el panel no me aparece por que sera ?
-
:00 pero no se mueren cuando les disparas D;
-
le agradesco a saxi por aberme resuelto mi anterior problema pero aki tendo una duda mis tengo dos zombies bug el del bombero y el pollo estan bug no lo pueden matar me ayudarian con eso gracias :333
-
ya vi cual es el problema el recurso de spanw que tengo tiene la funcion de cuando spane usa skin aletorio pero ya lo arregle gracias saxi :33
-
ya arregle ese problema pero me surgio otro cuando muero y respanea a su lugar de muerte le cambia el skin como arreglo eso ? function PlayerRespawn(diedPlayer) if not diedPlayer then else toggleAllControls(diedPlayer,true) setPlayerMoney(diedPlayer,StartMoney) spawnPlayer ( diedPlayer, -1952,271,41, 355.4488525390,playerSkin[diedPlayer][1]) setCameraTarget (diedPlayer, diedPlayer) sera ese el codigo con el cual puedo cambiar eso y si lo es diganme como gracias por la ayuda :3
-
jejeje ya eso lo sabia pero gracias por la info toda ayuda es apreciada gracias :33
Sobre nosotros
Desde 2007 la comunidad mas grande de Chile fanática de la saga Grand Thef Auto donde se organizan eventos como: Torneos, Ligas, Guerra de clanes dentro de nuestra red de servidores públicos totalmente gratuitos.