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?...