- Версия MoonLoader
- .026-beta
Lua:
function sampev.onSendBulletSync()
local weap = getCurrentCharWeapon(PLAYER_PED)
if targetPed ~= -1 and not isPlayerDead(targetPed) and weap ~= nil then
local result, id = sampGetPlayerIdByCharHandle(targetPed)
if result then
local mX, mY, mZ = getCharCoordinates(PLAYER_PED)
local tX, tY, tZ = getCharCoordinates(targetPed)
sampSendGiveDamage(id, GetWeapDmg(weap), weap, 3)
fireSingleBullet(mX, mY, mZ, tX, tY, tZ, 1)
addBlood(tX, tY, tZ, 0.0, 0.0, 0.0, 1, targetPed)
end
end
end
targetPed - Ped игрока в таргете.