StanMarsh Posted May 4, 2013 Share Posted May 4, 2013 Hola Tengo un Problema con el Boss de [COD]Plate el problema es este. local colshape = createColRectangle ( 103.88594818115, 1302.0729980469, 220, 200 ) -- estas son las coordenadas donde se va a crear el boss para cambiarlas solamente copien la posicion x e y de su admin panel zombiesMatados = 0 function zona ( ) if ( isElementWithinColShape ( source, colshape ) ) then zombiesMatados = ( zombiesMatados + 1 ) if ( zombiesMatados == 4 ) then if ( not isElement ( slothbot1 ) ) then slothbot1 = exports [ "slothbot" ]:spawnBot ( 111.79273223877, 1336.3046875, 10.5859375, 90, math.random(300, 300), 0, 0, ex, 38, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothbot1, 25000 ) outputChatBox ("#FF0000Nemesis:#EEFF00S.T.A.R.S!!!",getRootElement(), 255, 255, 255, true ) myBlip = createBlipAttachedTo ( slothbot1, 23 ) end end end end addEvent ( "onZombieWasted", true ) addEventHandler ( "onZombieWasted", getRootElement(), zona ) function restartear ( ) if ( isElementWithinColShape ( source, colshape ) ) then zombiesMatados = 0 end end addEvent ( "onBotWasted", true ) addEventHandler ( "onBotWasted",getRootElement(), restartear ) function autor () outputChatBox("BOSSES creados por [COD]Plate", getRootElement(), 0, 255, 255, true) end addEventHandler("onPlayerJoin", getRootElement, autor) addEvent ( "onBotWasted", true ) addEventHandler ( "onBotWasted", root, function ( theKiller ) exports.exp_system:addPlayerEXP ( theKiller, 5000 ) end ) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(100000, 100000)) -- 100000, 100000 money for kill nemesis-- outputChatBox ( getPlayerName ( killer ) .. " #081DBFMato Al Nemesis, !!! !",getRootElement(), 255, 255, 255, true ) end En esta parte addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(100000, 100000)) -- 100000, 100000 money for kill nemesis-- outputChatBox ( getPlayerName ( killer ) .. " #081DBFMato Al Nemesis, !!! !",getRootElement(), 255, 255, 255, true ) me da error no se por que Diganme si tengo un error o algo Gracias. Link to comment
MTA Team 0xCiBeR Posted May 4, 2013 MTA Team Share Posted May 4, 2013 pues postea tu error... ._. EDIT: a simple vista parece la segunda parte...No pones un "End" para la funcion ni tampoco cerras el evento....Prueba con esto remplazandolo..: addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(100000, 100000)) -- 100000, 100000 money for kill nemesis-- outputChatBox ( getPlayerName ( killer ) .. " #081DBFMato Al Nemesis, !!! !",getRootElement(), 255, 255, 255, true ) end) Link to comment
StanMarsh Posted May 4, 2013 Author Share Posted May 4, 2013 pues postea tu error... ._.EDIT: a simple vista parece la segunda parte...No pones un "End" para la funcion ni tampoco cerras el evento....Prueba con esto remplazandolo..: addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(100000, 100000)) -- 100000, 100000 money for kill nemesis-- outputChatBox ( getPlayerName ( killer ) .. " #081DBFMato Al Nemesis, !!! !",getRootElement(), 255, 255, 255, true ) end) Ya lo solucione Link to comment
Recommended Posts