Chce zeby za napad dostawalo sie randomow? kase np. od 15000 do 50000
[code]local sx,sy = guiGetScreenSize()
local sc = 1920/sx
local font = dxCreateFont("f.ttf", 17)
local celuje = nil
local czas = 5
local ped = createPed(46, -2076.93,-2430.00,30.63)
setElementRotation(ped, 0, 0, 230)
setElementData(ped, "napad:stacja", true)
local blip = createBlip(-2072.95,-2433.10,30.63, 17)
setBlipVisibleDistance(blip, 250)
function isPedAiming ( thePedToCheck )
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
addEventHandler("onClientPlayerTarget", root, function(el)
if isPedAiming(localPlayer) and el then
if getElementType(el) == "ped" and getElementData(el, "napad:stacja") and not celuje then
if getElementData(el, "napad:okradziony") then exports['yd-noti']:noti("To miejsce zosta?o niedawno okradzione!", "error") return end
if getElementData(el, "napad:okradany") then exports['yd-noti']:noti("Aktualnie kto? jest w trakcie napadu tego miejsca!", "error") return end
toggleControl("fire", false)
celuje = true
setElementData(el, "napad:okradany", true)
... |