Plate Posted January 18, 2013 Posted January 18, 2013 Hola tengo un problema es que esto no me anda estoy mejorando mi boss- system (gracias Solid) y necesito ayuda con esto 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 == 1 ) then if ( not isElement ( slothbot1 ) ) then slothbot1 = exports [ "slothbot" ]:spawnBot ( 111.79273223877, 1336.3046875, 10.5859375, 90, math.random(300, 303), 0, 0, ex, 38, "hunting", 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 high() model = getElementModel(slothbot1) if (model == 300 ) then exports.extra_health:setElementExtraHealth(solthbot1, 1000) outputChatBox("[bOSS]:Boss high spawned", 155, 155, 155) end end addEvent("onBotSpawn", true) addEventHandler("onBotSpawn",getRootElement(),high) function medium() model2 = getElementModel(slothbot1) if ( model2 == 301) then exports.extra_health:setElementExtraHealth(solthbot1, 7500) outputChatBox("[bOSS]:Boos medium spawned", 155, 155, 155) end end addEvent("onBotSpawn", true) addEventHandler("onBotSpawn",getRootElement(),medium) function low() model3 = getElementModel(slothbot1) if ( model3 == 303) then exports.extra_health:setElementExtraHealth(solthbot1, 5000) outputChatBox("[bOSS]:Boos low spawned", 155, 155, 155) end end addEvent("onBotSpawn", true) addEventHandler("onBotSpawn",getRootElement(),low)
FraN-724 Posted January 18, 2013 Posted January 18, 2013 Y cual se supone que es el problema, no aparece? o que ?
Other Languages Moderators Cuervo_fi Posted January 18, 2013 Other Languages Moderators Posted January 18, 2013 Hola tengo un problema es que esto no me anda ...
Plate Posted January 18, 2013 Author Posted January 18, 2013 Spawnea y todo pero me da bad argument en getElementModel
Other Languages Moderators Cuervo_fi Posted January 18, 2013 Other Languages Moderators Posted January 18, 2013 Spawnea y todo pero me da bad argument en getElementModel agrégale un setElementModel( slothbot1 , LaID ) después del a linea 8 y me dices que paso.
FraN-724 Posted January 19, 2013 Posted January 19, 2013 Prueba Así 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 == 1 ) then if ( not isElement ( slothbot1 ) ) then slothbot1 = exports [ "slothbot" ]:spawnBot ( 111.79273223877, 1336.3046875, 10.5859375, 90, math.random(300, 303), 0, 0, ex, 38, "hunting", 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 high() local model = getElementModel(slothbot1) if setElementModel(model, 300 ) then exports.extra_health:setElementExtraHealth(solthbot1, 1000) outputChatBox("[bOSS]:Boss high spawned", 155, 155, 155) end end addEvent("onBotSpawn", true) addEventHandler("onBotSpawn",getRootElement(),high) function medium() local model2 = getElementModel(slothbot1) if setElementModel(model2, 301) then exports.extra_health:setElementExtraHealth(solthbot1, 7500) outputChatBox("[bOSS]:Boos medium spawned", 155, 155, 155) end end addEvent("onBotSpawn", true) addEventHandler("onBotSpawn",getRootElement(),medium) function low() local model3 = getElementModel(slothbot1) if setElementModel(model3, 303) then exports.extra_health:setElementExtraHealth(solthbot1, 5000) outputChatBox("[bOSS]:Boos low spawned", 155, 155, 155) end end addEvent("onBotSpawn", true) addEventHandler("onBotSpawn",getRootElement(),low)
FraN-724 Posted January 19, 2013 Posted January 19, 2013 No me anda Que raro porque ami si me anda. A ver postea el meta
Plate Posted January 19, 2013 Author Posted January 19, 2013 No creo que el error sea del meta pero bue
NodZen Posted January 19, 2013 Posted January 19, 2013 Probalo asi haber. function high ( ) local id = getElementModel ( slothbot1 ) if id == 300 then exports.extra_health:setElementExtraHealth(solthbot1, 1000) outputChatBox("[bOSS]:Boss high spawned", getRootElement(), 155, 155, 155, false) end end addEvent("onBotSpawn", true) addEventHandler("onBotSpawn",getRootElement(),high)
Recommended Posts