0% found this document useful (0 votes)
144 views2 pages

Dano Informer Chat Naito - Lua

The document is a script for a SA-MP (San Andreas Multiplayer) mod called 'Dano Informer' created by Naito, version 1.0. It provides functionality to display chat messages related to player damage events and weapon information. The script includes a list of weapons and their corresponding IDs, and it sends chat messages when a player takes damage, detailing the weapon used and the damage inflicted.

Uploaded by

betsabed26
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
144 views2 pages

Dano Informer Chat Naito - Lua

The document is a script for a SA-MP (San Andreas Multiplayer) mod called 'Dano Informer' created by Naito, version 1.0. It provides functionality to display chat messages related to player damage events and weapon information. The script includes a list of weapons and their corresponding IDs, and it sends chat messages when a player takes damage, detailing the weapon used and the damage inflicted.

Uploaded by

betsabed26
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

script_name('Dano informer')

script_author('Naito')
script_version('1.0')

require 'lib.moonloader'
local sampev = require 'samp.events'

function main()
while not isSampAvailable() do
wait(1000)
end

sampAddChatMessage('[Dano Informer Chat] Cargado!', 0x00FFFFFF)


sampAddChatMessage('Autor: Naito', 0x00FFFFFF)
sampAddChatMessage('Mods para SA-MP: https://discord.gg/mst-community-
1257189867020881962', 0x00FFFFFF)

while true do
wait(0)
end
end

function armas(weaponID)
return ({
[0] = "Punos",
"Puno americano",
"Palo de golf",
"Porra policial",
"Cuchillo",
"Bate",
"Pala",
"Cueva de billar",
"Katana",
"Motosierra",
"Consolador rosa",
"Consolador",
"Vibrador",
"Vibrador plateado",
"Flores",
"Baston",
"Granada",
"Gas lacrimogeno",
"Coctel Molotov",
nil,
nil,
nil,
"Pistola",
"Pistola con silenciador",
"Desert Eagle",
"Escopeta",
"Escopeta recortada",
"Escopeta automatica",
"Micro SMG/Uzi",
"MP5",
"AK-47",
"M4",
"Tec-9",
"Rifle",
"Rifle de francotirador",
"RPG",
"Cohete Heat-Seeking",
"Lanzallamas",
"Minigun",
"Carga explosiva",
"Detonador",
"Bote de gas",
"Extintor",
"Camara",
"Gafas de vision nocturna",
"Gafas termicas",
"Paracaidas"
})[weaponID]
end

function sampev.onSendTakeDamage(playerID, damage, weaponID, bodypart)


if playerID ~= 65535 then
nickname = sampGetPlayerNickname(playerID) .. " {808080}({FFFFFF}" ..
playerID .. "{808080})"
else
nickname = sampGetPlayerNickname(select(2,
sampGetPlayerIdByCharHandle(PLAYER_PED))) .. " {808080}({FFFFFF}Local{808080})"
end

local weaponName = armas(weaponID) or "Desconocido"

sampAddChatMessage("{808080}Arma: {FFFFFF}" .. weaponName .. " | "


.. "Jugador: " .. nickname .. " | "
.. "{808080}Dano: {FF0000}" .. damage, 0x00FFFFFF)
end

You might also like