Jak zrobi? w tym kodzie tak, ?eby pokazywa?o maksymalnie 1 wiadomo?? i a nie 10 jak kto? przekroczy pr?dko??? Bo dodaje im x10 kasy
kod
[lua]
--[[ Pobieranie predkosci ]]--
-- #prorok
function isPedAiming ( thePedToCheck )
if getElementData(localPlayer,"player:duty") and getElementData(localPlayer,"player:duty") == "SAPD" or getElementData(localPlayer,"player:duty") == "SMSA" then
else cancelEvent() end
if isElement(thePedToCheck) then
if getElementType(thePedToCheck) == "player" or getElementType(thePedToCheck) == "ped" then
if getPedTask(thePedToCheck, "secondary", 0) == "TASK_SIMPLE_USE_GUN" then
return true
end
end
end
return false
end
function blokujStrzal()
if getPedWeapon(localPlayer) == 22 then
toggleControl("fire",false)
else
toggleControl("fire",true)
end
end
addEventHandler("onClientRender",root,blokujStrzal)
function pobierzPredkosc ( cel )
if getElementData(localPlayer,"player:duty") and getElementData(localPlayer,"player:duty") == "SAPD" or getElementData(localPlayer,"player:duty") == "SMSA" then
else return end
if ( cel ) then
if isPedAiming(source) then
local weapon = getPedWeapon ( source )
if weapon == 22 then
local predkosc = math.floor(getDistanceBetweenPoints3D(0,0,0,getElementVelocity(cel)) * 100 * 1.61)
if predkosc >=... |