Jump to content

[Ayuda] Money al Matar un SlothBot


Narutimmy

Recommended Posts

Posted

Hola, buenas, me podrian decir como le ago para que al matar a un Slothbot te paguen? asi como los zombis, pero que pague mas :roll:

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

Posted
addEvent( "onZombieWasted" ); 
addEventHandler( "onZombieWasted", getRootElement(), 
       function( killer ) 
           givePlayerMoney( killer, 100 ) --cambia el 100 por el dinero que quieras 
       end 
) 
  

No es una tabla no se necesita ;

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted
addEvent ( "onBotWasted", true ) 
addEventHandler ( "onBotWasted", root, 
function( theKiller) 
    exports.exp_system:addPlayerEXP ( theKiller, 50 ) 
    givePlayerMoney ( theKiller, 1000 ) 
    exports.extra_health:setElementExtraHealth ( theKiller, 80000 ) 
    local r,g,b = getPlayerNametagColor ( theKiller ) --get the player's nametag colour 
    local chatterName = getPlayerName ( theKiller ) 
    outputChatBox ( chatterName.." #FF0000ha matado al nemesis", getRootElement(), r, g, b, true ) 
end 
) 

si te sirve bien si no tambien bien xD

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted
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.

Posted

Tengo 1 prgunata pro que no queria abrir otro temacon esta funcion:

  
    local r,g,b = getPlayerNametagColor ( theKiller ) 
  

que pasa si el player tiene 2 colores?

Posted

El nametag solo es un color, si vos te referis a los colores HEX, entonces esa funcion no es para obtenerlos.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
addEvent ( "onBotWasted", true ) 
addEventHandler ( "onBotWasted", root, 
function( theKiller) 
    exports.exp_system:addPlayerEXP ( theKiller, 50 ) 
    givePlayerMoney ( theKiller, 1000 ) 
    exports.extra_health:setElementExtraHealth ( theKiller, 80000 ) 
    local r,g,b = getPlayerNametagColor ( theKiller ) --get the player's nametag colour 
    local chatterName = getPlayerName ( theKiller ) 
    outputChatBox ( chatterName.." #FF0000ha matado al nemesis", getRootElement(), r, g, b, true ) 
end 
) 

si te sirve bien si no tambien bien xD

Use este Muchas Gracias :B, Funciona de maravilla, solo faltaria que al morir deje Un Armas tirada y se pueda Recoger n_n

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...