Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: quotpedquot
1. clientside element "ped" at argument 4 @'TriggerSe
peda znajduje

function addLabelOnCli buttonstateabsoluteXabsoluteYworldXworldYworldZclickedElement )
if 
button == "left" and state == "down" then
if isEventHandlerAdded("onClientRender"root,przestanfizlfoathen
if isMouseInPosition (**********154*w51*hthen
triggerServerEvent
("Przestepca:kajdany"localPlayer,localPlayer,ped)
(
tutaj dalam printa na pobieranie modelu peda to pobra?o wi?c znajduje ped'a)
end
end
end

end
addEventHandler ( "onClientClick", root, addLabelOnCli )
c-side



s
-side
addEvent
("Przestepca:kajdany"true)
addEventHandler("Przestepca:kajdany"getRootElement(), function(gracz,npc)
if 
exports.global:hasItem(gracz45,1then
outputChatBox
("Zakuwasz przest?pce",gracz,255,255,255,true)
else
outputChatBox("#ff0000Nie masz kajdanek",gracz,255,255,255,true)
setPedAnimation(npc"ROB_BANK""CAT_Safe_Rob")
end
end
)

co? tu zrobi?am ?le, prosz? tylko powiedziec co db3 w tytu?u tematu
2. zły argument "ped"
Dzie? Dobry/Dobry wiecz?r mam pewien problem, a mianowicie podczas rozpocz?cia napadu mimo i? s? SAPD pokazuje, ?e musi by? na s?u?bie przynajmniej jeden SAPD(nic w debugu nie wywala). Drugi b??d jest taki, jak chce rozpocz?? napad i celuje na ped'a wywala taki b??d w debugu: https://imgur.com/a/xDvlL8A


Tutaj kod:

[code]--[[

author: NyAngel (© 2019)
discord: NyAngel#9094
all rights reserved.

]]

local sx, sy = guiGetScreenSize()
local zoom = 1920/sx

-- // Przydatna funkcja do animacji

local anims, animID = { }, 0
local rendering = false

local function renderAnimations( )
local now = getTickCount( )
for k,v in ipairs(anims) do
v.onChange(interpolateBetween(v.from, 0, 0, v.to, 0, 0, (now - v.start) / v.duration, v.easing))
if now >= v.start+v.duration then
table.remove(anims, k)
if type(v.onEnd) == "function" then
v.onEnd( )
end
if #anims == 0 then
rendering = false
removeEventHandler("onClientRender", root, renderAnimations)
end
end
end
end

function animate(f, t, easing, duration, onChange, onEnd)
if #anims == 0 and not rendering then
addEventHandler("onClientRender", root, renderAnimations)
rendering = true
end
assert(type(f) == "number", "Bad argument @ 'animate' [expected number at arg...