NodZen Posted September 11, 2012 Share Posted September 11, 2012 Hola amigos , miren , hice un script para que se genere un "nemesis" , pero no funca function boss ( ) slothBot = exports [ "slothBot" ]:spawnBot ( 2294.82, 2450.75, 10.82, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 36, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothbot, 8000 ) outputChatBox ("Nemesis se ah generado") local myBlip = (createBlipAttachedTo ( slothBot, 23 ) end addEventHandler ( "onResourceStart", getRootElement() boss ) En el mtaserver.exe me dice '>' expected near 'end' Ayudenme que esta mal PD: El nemesis no se genera , ni tampoco el blip Link to comment
Alexs Posted September 11, 2012 Share Posted September 11, 2012 function boss ( ) slothBot = exports [ "slothBot" ]:spawnBot ( 2294.82, 2450.75, 10.82, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 36, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothbot, 8000 ) outputChatBox ("Nemesis se ah generado") local myBlip = (createBlipAttachedTo ( slothBot, 23 )) end addEventHandler ( "onResourceStart", getRootElement() boss ) Link to comment
NodZen Posted September 11, 2012 Author Share Posted September 11, 2012 function boss ( ) slothBot = exports [ "slothBot" ]:spawnBot ( 2294.82, 2450.75, 10.82, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 36, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothbot, 8000 ) outputChatBox ("Nemesis se ah generado") local myBlip = (createBlipAttachedTo ( slothBot, 23 )) end addEventHandler ( "onResourceStart", getRootElement() boss ) Es script es type server verdad? Link to comment
Alexs Posted September 11, 2012 Share Posted September 11, 2012 function boss ( ) slothBot = exports [ "slothBot" ]:spawnBot ( 2294.82, 2450.75, 10.82, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 36, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothbot, 8000 ) outputChatBox ("Nemesis se ah generado") local myBlip = (createBlipAttachedTo ( slothBot, 23 )) end addEventHandler ( "onResourceStart", getRootElement() boss ) Es script es type server verdad? Si usas ese evento, si. Link to comment
NodZen Posted September 11, 2012 Author Share Posted September 11, 2012 Ok Gracias , lo probare Link to comment
NodZen Posted September 12, 2012 Author Share Posted September 12, 2012 Alex , sigue sin funcionar mira lo que me sale puse lo que me dijiste Link to comment
Arsilex Posted September 12, 2012 Share Posted September 12, 2012 function boss ( ) slothBot = exports [ "slothBot" ]:spawnBot ( 2294.82, 2450.75, 10.82, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 36, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothbot, 8000 ) outputChatBox ("Nemesis se ah generado") local myBlip = (createBlipAttachedTo ( slothBot, 23 )) end addEventHandler ( "onResourceStart", getRootElement(), boss ) prueba asi Link to comment
BorderLine Posted September 12, 2012 Share Posted September 12, 2012 por si no te fijaste, en tu codigo, entre getRootElement() y boss faltaba una "," y ai pekio me parece ke lo reparo Link to comment
NodZen Posted September 12, 2012 Author Share Posted September 12, 2012 Ya funciona Gracias , ah pero como le hago para que tenga respawn cada 5 minutos? Link to comment
BorderLine Posted September 12, 2012 Share Posted September 12, 2012 setTimer(boss,300000,0) Link to comment
NodZen Posted September 12, 2012 Author Share Posted September 12, 2012 Ahora el problema es que el skin de ranrom, Pero yo le puse para que sea el ID 287 pero no funciona el script... Link to comment
BorderLine Posted September 12, 2012 Share Posted September 12, 2012 function boss ( ) slothBot = exports [ "slothBot" ]:spawnBot ( 2294.82, 2450.75, 10.82, 90, 287, 0, 0, Nemesis, 36, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothBot, 8000 ) outputChatBox ("Nemesis se ah generado") local myBlip = (createBlipAttachedTo ( slothBot, 23 )) end addEventHandler ( "onResourceStart", getRootElement(), boss ) a todo esto, que es lo que no funciona? no da spawn? Link to comment
NodZen Posted September 13, 2012 Author Share Posted September 13, 2012 No , no hay problema el slothBot se genera perfecto , solo que en la parte del skin esta random , pero Yo quiero ponerle para que sea el ID 287. Link to comment
Arsilex Posted September 13, 2012 Share Posted September 13, 2012 y si pruebas usas setElementModel ( slothBot, 287 ) Link to comment
NodZen Posted September 13, 2012 Author Share Posted September 13, 2012 Gracias Pekio , funciona perfecto Link to comment
Plate Posted September 13, 2012 Share Posted September 13, 2012 No es necesario eso simplemente cambias el math.random y enves de eso pones el 287 Y ese script de donde lo sacastes por que si lo hisistes vos supongo que deves saber donde va el skin Link to comment
NodZen Posted September 14, 2012 Author Share Posted September 14, 2012 No es necesario eso simplemente cambias el math.random y enves de eso pones el 287Y ese script de donde lo sacastes por que si lo hisistes vos supongo que deves saber donde va el skin `Supones que alguien lo hizo por Mi? Le puse math.random para probar si el script funcionaba. Link to comment
Arsilex Posted September 14, 2012 Share Posted September 14, 2012 Plate ese script son 2 script osea es el script de la comunidad el de extrahealth de Castillo y Zombies de SlothMachine o lago asi no me acuerdo... Link to comment
Recommended Posts