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: r-1
1. Torba R-1
Jak tutaj doda? aby animacja by?a przy k?adzieniu torby i podnoszeniu? (Po wpisaniu tej samej komendy ma wykona? animacj? i wzi?? j? w r?ke)
Kod:
addCommandHandler("polozr1",function(plr,cmd)

local veh getPedOccupiedVehicle(plr)
if 
veh then return end
local torba 
torby[plr]
exports["LR-notyfikacje"]:addNotification(plr,"* K?adziesz/Podnosisz torb? R-1.")
setPedAnimation(plr"BOMBER""BOM_Plant")
setTimer (function(plrsetPedAnimation(plrend20001plr)
if 
exports["bone_attach"]:isElementAttachedToBone(torbathen 
exports
["bone_attach"]:detachElementFromBone(torba
setElementCollisionsEnabled (torbafalse)
local x,y,getElementPosition(plr)
setElementPosition(torba,x+0.80,y-0.03,z-0.82)
local rz getElementRotation(torba)
setElementRotation(torba,0,0,rz-90)
end
end
)
2. R-1 Animacja
Mam tutaj taki kod: [lua]addCommandHandler("polozr1",function(plr,cmd)

local veh = getPedOccupiedVehicle(plr)
if veh then return end
local torba = torby[plr]
exports["LR-notyfikacje"]:addNotification(plr,"* K?adziesz/Podnosisz torb? R-1.")
setPedAnimation(plr, "ped", "WOMAN_walknorm")
if exports["bone_attach"]:isElementAttachedToBone(torba) then
exports["bone_attach"]:detachElementFromBone(torba)
setElementCollisionsEnabled (torba, false)
local x,y,z = getElementPosition(plr)
setElementPosition(torba,x,y,z-0.82)
local rz = getElementRotation(torba)
setElementRotation(torba,0,0,rz)
else
local x,y,z = getElementPosition(plr)
local x2,y2,z2 = getElementPosition(torba)
local distance = getDistanceBetweenPoints3D(x,y,z,x2,y2,z2)
if distance > 5 then outputChatBox("** Za daleki dystans nie siegniesz po torbe",plr,255,0,0) return end
exports["bone_attach"]:attachElementToBone(torba,plr,12,0,-0.09,0.3,0,180,0)
end
end)[/lua]

nadaj? graczowi dan? animacj? a jak j? ustawi? aby po czasie si? zastopowa?a?

[ Dodano : 2017-04-05, 22:27 ]
Uda?o mi si? takie co? stworzy?: [lua]setPedAnimation(plr, "BOMBER", "BOM_Plant")
setTimer (setPedAnimation, 1000, 1, false )[/lua] tylko przy setTimer (wiem ?e setPedAnimation tam nie mo?e by?) nie wiem co wstawi? aby stopowa?o animacj?...