Javier Posted March 26, 2013 Share Posted March 26, 2013 Hola chicos, miren este script, me dice BOSS\Jason.lua:22: Bad argument @ 'getElementPosition' [Expected element at argument 1, got nil] El script function kill ( slothbot ) local x, y, z = getElementPosition( slothbot ) -- Este me dice que está mal.. local hora,minuto = getTime() if ( hora == 02 and minuto == 58 ) then createExplosion(x, y, z, 4) killPed( slothbot ) destroyElement( blip ) outputChatBox("NEMESIS HA SIDO DESTRUIDO", getRootElement(), 0, 255, 0) end end setTimer(kill, 2000, 0) Link to comment
Renkon Posted March 26, 2013 Share Posted March 26, 2013 Debes pasar en el setTimer el argumento que usaras como slothbot Link to comment
Javier Posted March 26, 2013 Author Share Posted March 26, 2013 Debes pasar en el setTimer el argumento que usaras como slothbot Como?. Link to comment
Javier Posted March 26, 2013 Author Share Posted March 26, 2013 asi?, No entiendo. setTimer(getElementPosition, 5000, 0, (slothbot)) Link to comment
Castillo Posted March 26, 2013 Share Posted March 26, 2013 function kill ( slothbot ) Borra slothbot de ahi. Link to comment
Javier Posted March 27, 2013 Author Share Posted March 27, 2013 Gracias Solidsnake Ahora si anda, el unico problema es que cuadno no está el BOT , me dá en la consola Bad Argumente. Pero el scrpt en Si anda. Link to comment
Castillo Posted March 27, 2013 Share Posted March 27, 2013 Pone: if isElement ( slothbot ) then -- El codigo tuyo aqui. end dentro de la funcion del timer. Link to comment
Javier Posted March 27, 2013 Author Share Posted March 27, 2013 Hay está!! Gracias Brother. Link to comment
Recommended Posts