Plate Posted March 20, 2013 Posted March 20, 2013 Hola tengo un problema con este script que me da error en el "createProjectile" y getElementPosition Client: function rocket(boss) x, y, z = getElementPosition(boss) if not (createProjectile(boss, 19, x, y, z, 100, player)) then end end addEvent("onBOSSFire", true) addEventHandler("onBOSSFire", getRootElement(), rocket) Server: function spawnboss() boss = exports.zombies:createZombie(241.96803283691, 1393.2790527344, 10.5859375, 90, math.random(300, 304), 0, 0, 200, 10000, true) giveWeapon(boss, 36, 300) triggerClientEvent("onBOSSFire", boss) end addCommandHandler("b", spawnboss) Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Castillo Posted March 20, 2013 Posted March 20, 2013 -- client side: function rocket ( boss, player ) local x, y, z = getElementPosition ( boss ) createProjectile ( boss, 19, x, y, z, 100, player ) end addEvent ( "onBOSSFire", true ) addEventHandler ( "onBOSSFire", getRootElement(), rocket ) -- server side: function spawnboss ( player ) boss = exports.zombies:createZombie ( 241.96803283691, 1393.2790527344, 10.5859375, 90, math.random ( 300, 304 ), 0, 0, 200, 10000, true ) giveWeapon ( boss, 36, 300 ) triggerClientEvent ( root, "onBOSSFire", root, boss, player ) end addCommandHandler ( "b", spawnboss ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted March 20, 2013 Author Posted March 20, 2013 No da error pero tampoco se crea el projectil Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Plate Posted March 21, 2013 Author Posted March 21, 2013 /// Comentario modificado ///Trata de ponerlo así: function spawnboss ( player ) boss = exports.zombies:createZombie ( 241.96803283691, 1393.2790527344, 10.5859375, 90, math.random ( 300, 304 ), 0, 0, 200, 10000, true ) giveWeapon ( boss, 36, 300 ) triggerClientEvent (getRootElement() , "onBOSSFire", boss ) end addCommandHandler ( "b", spawnboss ) ya lo arregle gracias man jaja pero el tema es que dispara 1 sola vez y que el misil no explota Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Recommended Posts