require 'lib.moonloader'
local triple = false
local double = false
--ON DOUBLE DAMAGE
function ddmg()
double, triple = true, false
sampAddChatMessage("DOUBLE DAMAGER ENABLE", 0x00FF00)
end
--ON TRIPLE DAMAGE
function tdmg()
double, triple = false, true
sampAddChatMessage("TRIPLE DAMAGER ENABLE", 0x00FF00)
end
--OFF DAMAGER
function offdmg()
double, triple = false, false
sampAddChatMessage("DAMAGER DISABLE", 0x00FF00)
end
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
sampRegisterChatCommand("offdmg", offdmg)
sampRegisterChatCommand("ddmg", ddmg)
sampRegisterChatCommand("tdmg", tdmg)
end
function onSendRpc(rpcId, bs, priority, reliability, orderingChannel, shiftTs)
if rpcId == 115 then
local act = raknetBitStreamReadBool(bs)
playerId = raknetBitStreamReadInt16(bs)
playerDamage = raknetBitStreamReadFloat(bs)
playerWeapon = raknetBitStreamReadInt32(bs)
playerBodypart = raknetBitStreamReadInt32(bs)
if not act then
if (triple) then
sampSendGiveDamage(playerId, playerDamage, playerWeapon, playerBodypart)
sampSendGiveDamage(playerId, playerDamage, playerWeapon, playerBodypart)
end
if (double) then
sampSendGiveDamage(playerId, playerDamage, playerWeapon, playerBodypart)
end
end
end
end
2x и 3x работает, который уже тут сделан
это lua
up
local triple = false
local double = false
--ON DOUBLE DAMAGE
function ddmg()
double, triple = true, false
sampAddChatMessage("DOUBLE DAMAGER ENABLE", 0x00FF00)
end
--ON TRIPLE DAMAGE
function tdmg()
double, triple = false, true
sampAddChatMessage("TRIPLE DAMAGER ENABLE", 0x00FF00)
end
--OFF DAMAGER
function offdmg()
double, triple = false, false
sampAddChatMessage("DAMAGER DISABLE", 0x00FF00)
end
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
sampRegisterChatCommand("offdmg", offdmg)
sampRegisterChatCommand("ddmg", ddmg)
sampRegisterChatCommand("tdmg", tdmg)
end
function onSendRpc(rpcId, bs, priority, reliability, orderingChannel, shiftTs)
if rpcId == 115 then
local act = raknetBitStreamReadBool(bs)
playerId = raknetBitStreamReadInt16(bs)
playerDamage = raknetBitStreamReadFloat(bs)
playerWeapon = raknetBitStreamReadInt32(bs)
playerBodypart = raknetBitStreamReadInt32(bs)
if not act then
if (triple) then
sampSendGiveDamage(playerId, playerDamage, playerWeapon, playerBodypart)
sampSendGiveDamage(playerId, playerDamage, playerWeapon, playerBodypart)
end
if (double) then
sampSendGiveDamage(playerId, playerDamage, playerWeapon, playerBodypart)
end
end
end
end
2x и 3x работает, который уже тут сделан
это lua
up
Последнее редактирование: