maauroo Posted April 30, 2012 Posted April 30, 2012 Hola.. Hise Un ZonaDm Hace Poco Pero Se Me Olvido De Poner Las Armas.. ¿Como Puedo Hacer Para Que Se Teletrasporte Y Obtenga Un Armas y Municiones? y Que Al Salir De ZonaDm Se Les Saque las armas.
maauroo Posted May 1, 2012 Author Posted May 1, 2012 EDIT: Ya Lo Hise y Funciona Pero Tengo Un Problema.. Al Respawnear En ZonaDm, No Me Da El Arma.. ¿Como Lo Soluciono? addEventHandler ( "onPlayerWasted", getRootElement( ), function ( ) if ( jugadoresEnDM [ source ] ) then local azar = math.random ( #posiciones ) local interior = getElementInterior ( source ) local skin = getElementModel ( source ) local x, y, z = unpack ( posiciones [ azar ] ) setTimer( spawnPlayer, 2000, 1, source, x, y, z,0, skin, interior ) giveWeapon ( source, 38, 999) -- Aqui Esta La Funcion Por Lo Cual Tiene Que Funcionar Cuando Respawnean... Pero No Funciona. end end ) Cuando Respawnean Tiene Dar El Arma Pero No Funciona.. Se Los Agradesco Si Me Ayudan!!
maauroo Posted May 1, 2012 Author Posted May 1, 2012 Lo Ise Asi Porque Nadie Sabe Que Lo Edite.. Ademas El 2 Pasaron 24 hora Me Parece.. Y Nesesito La Ayuda Posible Para Terminar Con Mi Dm..
Edikosh998 Posted May 2, 2012 Posted May 2, 2012 No te convendria hacer... setTimer(giveWeapon,2000,1,source,38,999) O usar el "onPlayerSpawn" WRS( World Racing Server) [server] = 8%
maauroo Posted May 2, 2012 Author Posted May 2, 2012 Lo Que Pasa Que Lo Hise Para Cuando Lo Matan Vuelva A DM.. Por Eso. No Funca Asi. setTimer( giveWeapon,2000,1,source,38,999) -- No Hay Otra Forma? setTimer( spawnPlayer, 2000, 1, source, x, y, z, 0, skin, interior ) -- Si o Si A Esta Funcion Lo Tengo Que Dejas Asi. ¿Como Lo Soluciono?
Soren Posted May 2, 2012 Posted May 2, 2012 addEventHandler ( "onPlayerWasted", getRootElement( ), function ( ) if ( jugadoresEnDM [ source ] ) then local azar = math.random ( #posiciones ) local interior = getElementInterior ( source ) local skin = getElementModel ( source ) local x, y, z = unpack ( posiciones [ azar ] ) setTimer( spawnPlayer, 2000, 1, source, x, y, z,0, skin, interior ) giveWeapon ( source, 38, 999) -- Aqui Esta La Funcion Por Lo Cual Tiene Que Funcionar Cuando Respawnean... Pero No Funciona. end end ) function dararma( source ) if (jugadoresEnDM [ source] ) then giveWeapon ( source, 38, 999) end addEventHandler ("onPlayerSpawn", dararma) Lo hice rapido no me jusgues si no funca
Edikosh998 Posted May 2, 2012 Posted May 2, 2012 Soren, para que pones source de primer parametro?...No es necesario ponerlo WRS( World Racing Server) [server] = 8%
maauroo Posted May 2, 2012 Author Posted May 2, 2012 Lo Puse Asi: addEventHandler ("onPlayerSpawn", dararma) function dararma( source ) if (jugadoresEnDM [ source] ) then giveWeapon ( source, 38, 999) end end Pero Sige Sin Funcionar ¿Que Problema Hay?
Edikosh998 Posted May 2, 2012 Posted May 2, 2012 Porque esta mal el addEventHandler.... addEventHandler ("onPlayerSpawn", root,dararma) WRS( World Racing Server) [server] = 8%
Edikosh998 Posted May 2, 2012 Posted May 2, 2012 Saca el source que aparece como primer parametro de la funcion.... WRS( World Racing Server) [server] = 8%
maauroo Posted May 2, 2012 Author Posted May 2, 2012 Lo Tengo Asi.. addEventHandler ("onPlayerSpawn", root,dararma) function dararma( ) if (jugadoresEnDM [ source] ) then giveWeapon ( source, 38, 999) end end Sige Sin Funcionar.. No Me Da El Arma Al Respawnear. ¿Como Se Puede Solucionar? ¿No Hay Otra Manera?
Edikosh998 Posted May 2, 2012 Posted May 2, 2012 Que dice el debugger? (debugscript 3) WRS( World Racing Server) [server] = 8%
maauroo Posted May 2, 2012 Author Posted May 2, 2012 Mira Mi Dm Completo: local posiciones = { { 2170.3459, 1611.5499, 999.9727 }, { 2193.1315, 1625.0666, 999.9719 }, { 2199.9279, 1608.9176, 999.9716 }, { 2225.5649, 1620.4234, 999.9655 }, { 2229.4406, 1597.1533, 999.968 }, { 2229.7163, 1574.3369, 999.9692 }, { 2219.9885, 1552.2485, 1004.7188 }, { 2205.5302, 1580.3706, 999.9785 }, { 2187.1303, 1591.5382, 999.9782 }, { 2175.5495, 1577.6177, 999.9683 }, { 2177.8242, 1601.6416, 999.9774 } } local jugadoresEnDM = { } addEventHandler ( "onPlayerWasted", getRootElement( ), function ( ) if ( jugadoresEnDM [ source ] ) then local azar = math.random ( #posiciones ) local interior = getElementInterior ( source ) local skin = getElementModel ( source ) local x, y, z = unpack ( posiciones [ azar ] ) setTimer( spawnPlayer, 2000, 1, source, x, y, z,0, skin, interior ) end end ) addEventHandler ("onPlayerSpawn", root,dararma) -- El Problema Es El Reespawn Que No Me Da Arma. function dararma( ) if (jugadoresEnDM [ source] ) then giveWeapon ( source, 38, 999) end end function consoleSetPlayerPosition ( thePlayer ) local azar = math.random ( #posiciones ) local interior = getElementInterior ( thePlayer ) local x, y, z = getElementPosition ( thePlayer ) setElementInterior ( thePlayer, 1 ) giveWeapon ( thePlayer, 38, 999) setElementPosition ( thePlayer, unpack ( posiciones [ azar ] ) ) jugadoresEnDM [ thePlayer ] = { interior, x, y, z } end addCommandHandler ( "minigun", consoleSetPlayerPosition ) addCommandHandler ( "salirdm", function ( thePlayer ) if ( jugadoresEnDM [ thePlayer ] ) then setElementInterior ( thePlayer, unpack ( jugadoresEnDM [ thePlayer ] ) ) jugadoresEnDM [ thePlayer ] = nil end end ) Fijate Si Ves Algun Error O Problema..
Edikosh998 Posted May 2, 2012 Posted May 2, 2012 Muy simple el problema ....la linea 29 (El evento) lo tenes que poner debajo de la funcion... WRS( World Racing Server) [server] = 8%
iFoReX Posted May 2, 2012 Posted May 2, 2012 addEventHandler ("onPlayerSpawn", root, function ( ) if (jugadoresEnDM [ source] ) then giveWeapon ( source, 38, 999) end end ) :3 elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Edikosh998 Posted May 2, 2012 Posted May 2, 2012 Tambien como puso el Mota es valido WRS( World Racing Server) [server] = 8%
maauroo Posted May 2, 2012 Author Posted May 2, 2012 Funciona Correctamente.. Gracias a Edikosh998, ElMota y A Los Que Querian Ayudarme.. Pueden Cerrar Tema.
Recommended Posts