Witam mam skrypt na paralizator lecz przez niego regenuje sie hp i nie da sie nikogo zabic przez co np bw tez jest bez sensowne
c.lua
[lua]
local weaponid = 23
function onFire(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement)
if weapon == weaponid then
if hitElement then
if hitElement ~= source then
if getElementType(hitElement) == "player" then
triggerServerEvent("onParalyze", hitElement)
elseif getElementType(hitElement) == "vehicle" then
triggerServerEvent("onVehicle", hitElement)
Witam ot?? po wystrzale razi gracza kilka razy chcia?bym go jeszcze przerobi? , tak aby po trafienie dzia?a? a nie po wycelowaniu tak jak jest teraz. SS Z DB3
local shotmsg = false --Show message when you shot someone
local nshomsg = false --Show message, when your deagle dont shot a player
local smsg = "* You shot player " --Message, when you shot someone (text + player name) local nmsg = "* You didn't shot anyone" --Message, when you don't shot anyone
local weaponid = 23
function onFire(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement)
if weapon == weaponid then
if getElementType (hitElement) == "player" then
if shotmsg then
outputChatBox(smsg .. getPlayerName(hitElement), 0, 255, 0)
end
triggerServerEvent("onParalyze", hitElement)
else
if nshomsg then
outputChatBox(nmsg, 255, 0 ,0)
end
end
end
end