-
Posts
1,004 -
Joined
-
Last visited
Everything posted by Narutimmy
-
Bueno lo que susece esque tenia un sistema de spawm de Jefes... funciono bien, pero lo modifique un poco para que lugar de que spawne cuando se maten zombis, sea cuando se mate una cantidad de slotbot, el problema es que cuando spawnea el boss si ahi 2 y matan al primero (mas Debil) recibes las 2 recompensas y e lgrande no muere ademas al matar un boss se reinicia el contador de muertes de boss ----BOSS local colshape = createColRectangle ( -2960, -2960, 5920, 5920 ) -- estas son las coordenadas donde se va a crear el boss para cambiarlas solamente copien la posicion x e y de su admin panel local BosssMatados = 0 local weapons = { [ 36 ] = 5 } function zona (attacker, weapon, bodypart) if ( isElementWithinColShape ( source, colshape ) ) then BosssMatados = ( BosssMatados + 1 ) if ( BosssMatados == 10 ) then --Numero de Zombis por Matar if ( not isElement ( Troll ) ) then local x, y, z = getElementPosition(attacker) local skin = 36 Troll = exports [ "slothbot" ]:spawnBot ( x+20, y+20, z+3, 90, skin, 0, 0, false, weapons [ skin ] or 0, "hunting" ) myBlip2 = createBlipAttachedTo ( Troll, 19 ) local id = getElementModel ( Troll ) if id == 36 then exports.extra_health:setElementExtraHealth(Troll, 500000) outputChatBox ( "#ff0000 Corre HDP!!!", getRootElement(), 255, 255, 255, true) end end end end end addEventHandler ( "onBotWasted", getRootElement(), zona ) ---Matar 1 function bot ( attacker ) if attacker == Troll then --Creo que 'tyrant' es la variable de tu 'BOSS' if ( getElementType ( attacker ) == "ped" ) then killPed ( source, attacker ) blowVehicle ( source ) end end end addEventHandler("onPlayerDamage", getRootElement(), bot) ---RepawnBots function restartear ( ) if ( isElementWithinColShape ( source, colshape ) ) then BosssMatados = 0 end end addEventHandler ( "onBotWasted",getRootElement(), restartear ) --Dinero addEventHandler ( "onBotWasted", root, function ( theKiller ) model = getElementModel( Troll ) -- slothbot 1 cambialo if model == 36 then exports.exp_system:addPlayerEXP ( theKiller, 200000 ) destroyElement(myBlip2) givePlayerMoney(theKiller, 5000000) local r,g,b = getPlayerNametagColor ( theKiller ) --get the player's nametag colour local chatterName = getPlayerName ( theKiller ) outputChatBox ( chatterName.." #FF0000ha matado al Troll!!! *", getRootElement(), r, g, b, true ) end end ) function vida() local vida = exports.extra_health:getElementExtraHealth(Troll) -- acordate de cambiar esto de Troll outputChatBox("la vida del boss es ".. vida.."", 255, 0, 255) end addCommandHandler("lavida", vida)
-
._. mierda porque no se me ocurrio antes >.<
-
Hola bueno lo que sucede es que uso este scrip para crear una zona Segura, el problema es que por ejemplo yo estoy en zona verde y ago logout y entro de nuevo la SafeZone no sirve, debo salir y volver a entrar lo que es un gran problema porque ahi esta el Respawn y los jugadores noobs se ponen a matar a los que recien aparecen. -- Advanced Anti Zombie by Kenix version 1.0.6 --[[ It's example how use it. Change this ]] local aSavePlaces = { Rectangle = { -- X, Y, Width, Height { -3000.1, 2100.1, 800, 800 }; { -250, -150, 500, 300 }; }; } local aRadarAreaPlaces = { -- x, y ,size 1, size 2, color: red, green, blue, alpha. { -3000.1, 2100.1, 800, 800, 0, 255, 0, 100 }; { -250, -150, 500, 300, 0, 255, 0, 100 }; } local sResourceName = getResourceName ( resource ) local bUseGunsInSavePlace = get( sResourceName .. '.UseGunsInSaveZone' ) local bUseRadarArea = get( sResourceName .. '.UseRadarArea' ) local pColshape, pRadarArea local bUseRunInSaveZone = get( sResourceName .. '.UseRunInSaveZone' ) local bUseJumpInSaveZone = get( sResourceName .. '.UseJumpInSaveZone' ) local bUseWeaponHudInSaveZone = get( sResourceName .. '.UseWeaponHudInSaveZone' ) local bUseAmmoHudInSaveZone = get( sResourceName .. '.UseAmmoHudInSaveZone' ) local bUseDamageInSaveZone = get( sResourceName .. '.UseDamageInSaveZone' ) addEventHandler ( 'onResourceStart', resourceRoot, function ( ) for s, _ in pairs( aSavePlaces ) do for _, a in pairs( aSavePlaces[ s ] ) do pColshape = _G[ 'createCol' .. s ]( unpack( a ) ) setElementData( pColshape, 'zombieProof', true ) addEventHandler ( 'onColShapeHit', pColshape, function ( pHitElement ) if getElementType( pHitElement ) == 'player' then if not bUseGunsInSavePlace then toggleControl ( pHitElement, 'fire', false ) toggleControl ( pHitElement, 'aim_weapon', false ) toggleControl ( pHitElement, 'vehicle_fire', false ) end if not bUseRunInSaveZone then toggleControl ( pHitElement, 'sprint', false ) end if not bUseJumpInSaveZone then toggleControl ( pHitElement, 'jump', false ) end if not bUseWeaponHudInSaveZone then showPlayerHudComponent ( pHitElement, 'weapon', false ) end if not bUseAmmoHudInSaveZone then showPlayerHudComponent ( pHitElement, 'ammo', false ) end if not bUseDamageInSaveZone then setElementData( pHitElement, 'damage', 'no' ) end elseif getElementType( pHitElement ) == 'ped' then -- check if the entered ped kill it killPed( pHitElement ) -- kill ped end end ) addEventHandler ( 'onColShapeLeave', pColshape, function ( pLeaveElement ) if getElementType( pLeaveElement ) == 'player' then if not bUseGunsInSavePlace then toggleControl ( pLeaveElement, 'fire', true ) toggleControl ( pLeaveElement, 'aim_weapon', true ) toggleControl ( pLeaveElement, 'vehicle_fire', true ) end if not bUseRunInSaveZone then toggleControl ( pLeaveElement, 'sprint', true ) end if not bUseJumpInSaveZone then toggleControl ( pLeaveElement, 'jump', true ) end if not bUseWeaponHudInSaveZone then showPlayerHudComponent ( pLeaveElement, 'weapon', true ) end if not bUseAmmoHudInSaveZone then showPlayerHudComponent ( pLeaveElement, 'ammo', true ) end if not bUseDamageInSaveZone then setElementData( pLeaveElement, 'damage', 'yes' ) end elseif getElementType( pLeaveElement ) == 'ped' then -- check if the entered ped kill it killPed( pLeaveElement ) -- kill ped end end ) end end if bUseRadarArea then for _, a in ipairs( aRadarAreaPlaces ) do pRadarArea = createRadarArea ( unpack( a ) ) end end end )
-
Tengo un super Bug puse el spawn en el area Segura pero no Sirve.... se pueden matar D:!!!
-
No te preocupes, asi como esta funciona bien.
-
como lo uso para que solo sea cuando esten en el area?
-
El problema es que pueden matar con cuchillo
-
Así a como lo hizo plate esta bien, solamente debes eliminar el primer spawnPlayer, eso no debería ir allí. Creo que así, debería funcionar bien. De echo si lo ocupa, porque en caso de no tener clan quiero que spawnee ahi tenia un pequeño error pero ya esta funcionando.
-
Creo se empiesa asi no? function ReSpawn () spawnPlayer (source, -2616.3608, 2256.6555, 8.20, 0) addEventHandler ( "onPlayerWasted", getRootElement(), ReSpawn )
-
Hola, bueno me bino esta diea y quiero saber que tengo que usar... quiero que cuando un user muera Spawne en un punto fijo pero solo al morir no al hacer login, pero si esa persona esta en un Team (clan) spawne en otro lugar, creo tengo que hacer una tabla si no mal me ekivoco. Que nesesito?
-
mmm.... y hacer que si el boss esta a menos de 1 metro el auto explote aonque no lo toque?
-
mmm no existe otro evento? ---Autos function bot2 ( attacker ) if attacker == slothbot1 then if ( getElementType ( attacker ) == "ped" ) then blowVehicle ( source ) end end end addEventHandler("onClientPedWeaponFire", getRootElement(), bot2)
-
mmmm pero el puño es arma no? es la 0?
-
Alguien conoce un evento para cuando se golpea un auto?
-
Tengo un problema .... ya puse bien todo... pero si por ejemplo el personaje se agacha ola mochila se queda flotando
-
Ahora si aparece... como 10 metros en el cielo pero aparece, como uso el scrip que me distes para saber donde va?
-
que puedo usar en lugar de source?
-
si no esta por ningun lado
-
Probe el scrip asi function Backpack () local x, y, z = getElementPosition ( source ) local mochila = createObject ( 371, x, y, z, 0, 0, 0 ) attachElements ( mochila, source, 0, 0, 5 ) end addEventHandler ( "onResourceStart", getRootElement(), Backpack ) lo inicio pero no pasa nada, no aparece la mochila ni mal puesta... y el debug no muestra nada, y lo puse en server
-
ya probe el scrip pero no me fuciono
-
Algo asi? : function Backpack () local mochila = createObject ( 371, x, y, z, 0, 0, 0 ) attachElements ( mochila, source, 0, 0, 5 ) end addEventHandler ( "onPlayerSpawn", root, Backpack )
-
hola... bueno quiero saber como poner el paracaidas en la espalda de cada user, pero no lo puedan usar y no salga en inventario ni nda, osea solo quiero que de vista como si fuera mochila...
-
>.< gracias, no sabia que iva dentro... y de la s.... estoy acostumbrado a escribir la primer letra mayuscula, gracias
-
Bueno ya lo mofique y pues al llegar a 0 vidas si kickea... pero no borra la cuenta que ago? local sourceAccount = getPlayerAccount ( Source ) local g_root = getRootElement() addEventHandler( "onPlayerWasted", root, function(ammo, attacker, weapon, bodypart) if attacker then setElementData(source, "Vidas", getElementData(source, "Vidas")-1) setElementData(attacker, "Vidas", getElementData(attacker, "Vidas")+1) else setElementData(source, "Vidas", getElementData(source, "Vidas")-2) end Vida = getElementData(source, "Vidas") if Vida <= 0 then kickPlayer ( source, "Te quedastes sin vidas tu cuenta a sido Eliminada" ) removeAccount ( sourceAccount ) end end )
-
Asi? local sourceAccount = getPlayerAccount local g_root = getRootElement() addEventHandler( "onPlayerWasted", root, function(ammo, attacker, weapon, bodypart) if attacker then setElementData(source, "Vidas", getElementData(source, "Vidas")-1) setElementData(attacker, "Vidas", getElementData(attacker, "Vidas")+1) else setElementData(source, "Vidas", getElementData(source, "Vidas")-2) end Vida = getElementData(source, "Vidas") if Vida <= 0 then kickPlayer ( source, "Te quedastes sin vidas tu cuenta a sido Eliminada" ) removeAccount ( sourceAccount ) end end )
