Plate Posted January 22, 2013 Posted January 22, 2013 server side: 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, 302), 0, 0, ex, 38, "hunting", true ) myBlip = createBlipAttachedTo ( slothbot1, 23 ) end end end end addEventHandler ( "onZombieWasted", getRootElement(), zona ) addEventHandler("onBotSpawn",getRootElement(),zona) function restartear ( ) if ( isElementWithinColShape ( source, colshape ) ) then zombiesMatados = 0 end end addEvent ( "onBotWasted", true ) addEventHandler ( "onBotWasted",getRootElement(), restartear ) addEvent ( "onBotWasted", true ) function alto() setElementData(colshape,"zona",high) end addEventHandler("onResourceStart",getRootElement(),alto) function setzonerage() setElementData(colshape,"zona",medium) if getElementData(colshape,"zona",medium) then setElemntData(colshape,"zona",low) end end addEventHandler("onBotWasted",getRootElement(),setzonerage) function sethealth() if getElementData(colshape,"zona",high) then exports.extra_health:setElemntExtraHealth(slothbot1, 10000) elseif getElementData(colshape,"zona",medium) then exports.extra_health:setElementExtraHealth(slothbot1, 7500) elseif getElementData(colshape,"zona",low) then exports.extra_health:setElementExtraHealth(slothbot1, 5000) end end addEventHandler("onBotSpawn",getRootElement(),sethealth) clientside: GUIEditor_Label = {} GUIEditor_Label[1] = guiCreateLabel(562,513,146,30,"Nivel de zona :",false) guiSetFont(GUIEditor_Label[1],"sa-header") GUIEditor_Label[2] = guiCreateLabel(709,516,90,32, getElementData(colshape,"zona"),false) guiSetFont(GUIEditor_Label[2],"sa-header") Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Plate Posted January 23, 2013 Author Posted January 23, 2013 No aparece el label que dice "getElementData(colshape,"zona") y tampoco spawnea el boss Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
NodZen Posted January 23, 2013 Posted January 23, 2013 No aparece el label que dice "getElementData(colshape,"zona")y tampoco spawnea el boss Como activas esos labels? ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
Plate Posted January 23, 2013 Author Posted January 23, 2013 Primero probre con onColShapeHit y despues con onClientResourceStart pero igual no aparece el label que dice el getElementData Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Alexs Posted January 23, 2013 Posted January 23, 2013 setElementData(colshape,"zona",high) High no esta definido ni tiene strings, debe dar error y por eso no lo escribe, también debe ir un true en el 4to argumento de setElementData para usarlo en client ya que lo seteas en server. Developer @ MYVAL
Plate Posted January 25, 2013 Author Posted January 25, 2013 Ahora me da bad argument en el label y en el getElementData aparte no le da la vida al boss Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Recommended Posts