-
Posts
60 -
Joined
-
Last visited
Everything posted by ELmarcoS.
-
addEventHandler("onPlayerWasted", getRootElement(), function(source) if (getTeamName(getPlayerTeam()) == "Civilian") then spawnPlayer (source, 312.30529785156, -2040.5495605469, 2.4078125953674, 90, getElementModel ( source )) fadeCamera (source, true) setCameraTarget (source, source) end ) addEventHandler ("onPlayerWasted", getRootElement(), function spawnOnDie(source) if (getTeamName(getPlayerTeam()) == "Umbrella Corporation") then spawnPlayer (source, 245.29811096191, 1859.5770263672, 14.084012985229, 180, getElementModel ( source )) fadeCamera (source, true) setCameraTarget (source, source) end ) hize esto pero creo que está mal porque al morir la pantalla queda en negro D:
-
Esto estaría bien? addEventHandler("onPlayerWasted", getRootElement(), function(source) local civilian = getTeamFromName ( "Civilian" ) if ( civilian ) then spawnPlayer (source, 312.30529785156, -2040.5495605469, 2.4078125953674, 90, getElementModel ( source )) local umbrella = getTeamFromName ( "Umbrella Corporation" ) if ( umbrella ) then spawnPlayer (source, 245.29811096191, 1859.5770263672, 14.084012985229, 180, getElementModel ( source )) fadeCamera (source, true) setCameraTarget (source, source) end )
-
Hola tengo un problema con este script, que spawnea al jugador cuando muere a una base que cree con unos amigos, estoy usando el spawn menu de 50p y tengo 2 opciones para elegir hasta ahora, civilian y umbrella corporation, el problema es que al elegir umbrella cuando el jugador muere lo spawnea a la base de los civilians, quiero saber como hago para que el script vea en que equipo está el jugador y si está en umbrella lo spawnee al morir a las coordenadas que yo ponga, acá les dejo lo que tengo: addEventHandler("onPlayerWasted", getRootElement(), function() spawnPlayer (source, 312.30529785156, -2040.5495605469, 2.4078125953674, 90, getElementModel ( source )) fadeCamera (source, true) setCameraTarget (source, source) end ) Gracias.
-
Ni me he había fijado en el texto yo no lo tenia así, no lo quería con comando pero si no se puede de otra forma lo dejo con comando
-
Ya no seguiré jodiendo con esto, el script está tal cual como tu lo escribiste: function bot() for index, player in ipairs getElementsByType("player") do local x, y, z = getElementPosition(player) slothBot = exports [ "slothBot" ]:spawnBot ( x, y, z + 10, 90, 287, 0, 0, Nemesis, 22, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothBot, 1000 ) end outputChatBox ( "Zombie Bosses have been generated!!, run!", root, 255, 0, 0, true ) end addCommandHandler("crearbots", bot) Y aquí esta el meta:
-
Lo copié tal cual , lo copié denuevo y sale lo mismo
-
'do' expected near getElementsByType Si es muy dificil lo que estoy pidiendo mejor lo hago con las coordenadas para no molestarlos más
-
x,y,z = getElementPosition(source) slothBot = exports [ "slothBot" ]:spawnBot ( x + 15, y, z, 90, 287, 0, 0, Nemesis, 22, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothBot, 1000 ) outputChatBox ( "Zombie Boss has been generated!!, run!", root, 255, 0, 0, true ) end setTimer ( boss, 300000, 0 ) addEventHandler ( "onResourceStart", resourceRoot, boss ) WARNING: Loading script failed nemesis/nemesis.lua:5: '' expected near 'end' ._.?
-
No funciona ;/, creo que lo dejaré como estaba
-
Pues al parecer no tiene ningun error, pero no aparece el bot ._., le quite lo de +15 y nada
-
Error: nemesis/nemesis.lua:10: attempt to perform arithmetic on global 'x' (a nil value )
-
function boss ( ) if ( isElement ( slothbot ) ) then destroyElement ( slothbot ) end if ( isElement ( myBlip ) ) then destroyElement ( myBlip ) end getElementPosition ( player ) slothBot = exports [ "slothBot" ] spawnBot ( x, y, z + 15, 90, 287, 0, 0, Nemesis, 22, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothBot, 1000 ) outputChatBox ( "Zombie Boss has been generated!!, run!", root, 255, 0, 0, true ) end setTimer ( boss, 300000, 0 ) addEventHandler ( "onResourceStart", resourceRoot, boss ) Nose si esta bien ;s
-
Sólo que aparesca cerca de los jugadores
-
function boss ( ) if ( isElement ( slothbot ) ) then destroyElement ( slothbot ) end if ( isElement ( myBlip ) ) then destroyElement ( myBlip ) end slothBot = exports [ "slothBot" ]:spawnBot ( for index, player in ipairs getElementsByType("players") do local x, y, z = getElementPosition(player), 90, 287, 0, 0, Nemesis, 22, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothBot, 1000 ) outputChatBox ( "Zombie Boss has been generated!!, run!", root, 255, 0, 0, true ) end setTimer ( boss, 300000, 0 ) addEventHandler ( "onResourceStart", resourceRoot, boss ) Asi quedaria?
-
No entendí ._.' soy novato en esto
-
function boss ( ) if ( isElement ( slothbot ) ) then destroyElement ( slothbot ) end if ( isElement ( myBlip ) ) then destroyElement ( myBlip ) end slothBot = exports [ "slothBot" ]:spawnBot ( getRandomPlayer ( ), 90, 287, 0, 0, Nemesis, 22, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothBot, 1000 ) outputChatBox ( "Zombie Boss has been generated!!, run!", root, 255, 0, 0, true ) end setTimer ( boss, 300000, 0 ) addEventHandler ( "onResourceStart", resourceRoot, boss ) Así?
-
function boss ( ) if ( isElement ( slothbot ) ) then destroyElement ( slothbot ) end if ( isElement ( myBlip ) ) then destroyElement ( myBlip ) end slothBot = exports [ "slothBot" ]:spawnBot ( 249.16796875, -1822.9938964844, 3.3400845527649, 90, 287, 0, 0, Nemesis, 22, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothBot, 1000 ) outputChatBox ( "Zombie Boss has been generated!!, run!", root, 255, 0, 0, true ) end setTimer ( boss, 300000, 0 ) addEventHandler ( "onResourceStart", resourceRoot, boss ) Tengo este script que crea un bot en la playa de los santos, pero quiero que aparesca cerca de todos los jugadores, osea que obtenga las coordenadas del jugador y se spawnee cerca de el
-
function messageOnKill ( killer ) givePlayerMoney ( killer, 1500 )------ Aquí editas el dinero que quieres outputChatBox ( getPlayerName ( killer ) .. " killed Nemesis, well done!, he has got a reward: $1500!" ) end addEvent ( "onBotWasted", true ) addEventHandler ( "onBotWasted", getRootElement(), messageOnKill ) Ese es el que yo tengo, cuando lo matas te da plata y muestra un mensaje.