Julian09123 Posted January 25, 2013 Posted January 25, 2013 Osea ya tengo el script de ped pero nose como hacer para q tenga AI osea funcion para que, el ped te sigua hasta matarte Client: ped createPed ( int modelid, float 2194, float -1747, float 17 [, float rot = 0.0 ] ) Server: ped = createPed ( skin, X, Y, Z, R) addCommandHandler( "give", function ( player, command, id, amount ) if not tonumber ( id ) then return end if not tonumber ( amount ) then amount = 9001 end giveWeapon( ped, id, amount, true ) end ) function makePed() ped1 = createPed(skin, X, Y, Z) setPedRotation(ped1, R) setPedAnimation( ped1, "AnimationSection", "Animation") end addCommandHandler("Pedsappearswhitcommandhere", makePed)
Julian09123 Posted January 25, 2013 Author Posted January 25, 2013 que tendria que usar y me descargo eso?
FraN-724 Posted January 25, 2013 Posted January 25, 2013 Podrías guiarte desde este resource https://community.multitheftauto.com/index.php?p=resources&s=details&id=5722
Julian09123 Posted January 25, 2013 Author Posted January 25, 2013 Gracias Fran, Ya se lo que debo hacer. Gracias NOD tu tambien.
Julian09123 Posted January 25, 2013 Author Posted January 25, 2013 Tengo u problema Pongo start a todo Y me dice en la console Warning: nemesis/nemesis11.lua:12: Bad Argument SetElementHealth y lo tengo haci function Nemesisbymanawydan ( ) baz = createObject ( 360, -1935.5480957031, 665.44055175781, 48, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( -1935.5480957031, 665.44055175781, 47.0, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #0D9905Perras las matare, Si bienen!",getRootElement(), 255, 255, 255, true ) local myBlip = (createBlipAttachedTo ( nemesi, 0 )) attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) triggerClientEvent ( "nsound", root ) triggerClientEvent ( "nemesismissel", root ) setTimer( function() setElementHealth ( Nemesis, 900 ) end, 1100, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(4000,6000)) -- 120000, 150000 money for kill nemesis-- outputChatBox ( getPlayerName ( killer ) .. " #081DBFkilled Nemesis, congratulations",getRootElement(), 255, 255, 255, true ) setTimer(Nemesisbymanawydan, 1000, 1) -- 60000 time for nemesis respawn in milliseconds-- end end)
Plate Posted January 25, 2013 Posted January 25, 2013 Tenes que usar el extra_health de Castillo(SolidSnake14) [url=https://community.multitheftauto.com/index.php?p=resources&s=details&id=5195]https://community.multitheftauto.com/index.php?p= ... ls&id=5195[/url] function Nemesisbymanawydan ( ) baz = createObject ( 360, -1935.5480957031, 665.44055175781, 48, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( -1935.5480957031, 665.44055175781, 47.0, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #0D9905Perras las matare, Si bienen!",getRootElement(), 255, 255, 255, true ) local myBlip = (createBlipAttachedTo ( nemesi, 0 )) attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) triggerClientEvent ( "nsound", root ) triggerClientEvent ( "nemesismissel", root ) setTimer( function() exports.extra_health:setElementExtraHealth(nemesi, 900) -- es para darle mas de 200 de vida con el setElementHealth le podes dar 200 nada mas end, 1100, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(4000,6000)) -- 120000, 150000 money for kill nemesis-- outputChatBox ( getPlayerName ( killer ) .. " #081DBFkilled Nemesis, congratulations",getRootElement(), 255, 255, 255, true ) setTimer(Nemesisbymanawydan, 1000, 1) -- 60000 time for nemesis respawn in milliseconds-- end end)
Julian09123 Posted January 25, 2013 Author Posted January 25, 2013 que tendria que hacer reemplazar ese por el que tengo ahora?
NodZen Posted January 25, 2013 Posted January 25, 2013 @Plate , ya te diò echo el script. Reemplazalo por el que tienes.
Julian09123 Posted January 25, 2013 Author Posted January 25, 2013 Ahora me da Call-to non-running server resource (Extra_Health)
Xperia Posted January 25, 2013 Posted January 25, 2013 Inicia el recurso del extra-health y despues el slothbot y despues el que hiciste tu.
Julian09123 Posted January 25, 2013 Author Posted January 25, 2013 Gracias a todos por la ayuda me sirvio de mucho. Gracias
Recommended Posts