Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2021-01-03, 16:55


NoNamik







Wiek: 35
Na forum: 2185 dni
Posty: 289
Nick w MP: JestemNoNamem

Piwa: 374

Respekt: 60

Witam mam skrypt na torbe r1 lecz nwm jak zrobic by jak wyciagnol ktos torbe z schowka to mogl takze uzywac tych komend w sensie /postawr1 itp


local torby = {}


addCommandHandler("torbar1",function(plr,cmd)
if torby[plrthen return end
if not getElementData(plr,"player:faction"then  outputChatBox("Aby u?y? tej torby musisz by? aktywny w jakiejkolwiek frakcji",plr,255,0,0) return end
local x,y,getElementPosition(plr)
local torba createObject(1550,x,y,z)
torby[plr] = torba
outputChatBox("**Wyci?gn??e? torb?r1 z karetki!",plr,255,0,0)
setElementCollisionsEnabled (torbafalse)
exports["bone_attach"]:attachElementToBone(torba,plr,12,-0.05,0.1,0.28,0,170,0)
end)


function stworztorbe(plr)
if not plr then return end
local x,y,getElementPosition(plr)
local torba createObject(1550,x,y,z)
torby[plr] = torba
setElementCollisionsEnabled (torbafalse)
exports["bone_attach"]:attachElementToBone(torba,plr,12,0,-0.09,0.3,0,180,0)
setObjectScale(torba,5)
end


function usuntorbe(plr)
if not plr then return end
local torba torby[plr]
if torba then
if isElement(torbathen
if exports["bone_attach"]:isElementAttachedToBone(torbathen exports["bone_attach"]:detachElementFromBone(torbaend
destroyElement(torba)
end
torby[plr] = nil
end
end

addEventHandler "onPlayerQuit"root, function()
local torba torby[source]
if torba then
if isElement(torbathen
if exports["bone_attach"]:isElementAttachedToBone(torbathen exports["bone_attach"]:detachElementFromBone(torbaend
destroyElement(torba)
end
torby[source] = nil
end
end )

addCommandHandler("podniesr1",function(plr,cmd)
--if not getElementData(plr,"Dylek"then outputChatBox("*****W trakcie test?w :D",plr) return end
if not getElementData(plr,"player:faction"then  outputChatBox("*****Brak uprawnien",plr,255,0,0) return end
if torby[plrthen
usuntorbe(plr)
outputChatBox("**Torb? odda?e? do karetki",plr,255,0,0)
return end
end)


addCommandHandler("postawr1",function(plr,cmd)
--if not getElementData(plr,"Dylek"then outputChatBox("*****W trakcie test?w :D",plr) return end
if not getElementData(plr,"player:faction"then  outputChatBox("*****Brak uprawnien",plr,255,0,0) return end
local veh getPedOccupiedVehicle(plr)
if veh then return end
local torba torby[plr]
if not torba then outputChatBox("**Nie posiadasz torbyr1 przy sobie!",plr,255,0,0) return end
if not isElement(torbathen outputChatBox("**Nie posiadasz torby",plr,255,0,0) return end
if exports["bone_attach"]:isElementAttachedToBone(torbathen 
exports["bone_attach"]:detachElementFromBone(torbasetElementCollisionsEnabled (torbafalse)
local x,y,getElementPosition(plr)
setElementPosition(torba,x,y,z-0.82)
local rz getElementRotation(torba)
setElementRotation(torba,0,0,rz)
else
local x,y,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)




Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-03, 17:01


_jvneczek







Wiek: 22
Na forum: 4326 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5

Masz napisany schowek karetki?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-03, 22:13


NoNamik







Wiek: 35
Na forum: 2185 dni
Posty: 289
Nick w MP: JestemNoNamem

Piwa: 374

Respekt: 60

to jest do PSP nie do samc

Postaw piwo autorowi tego posta
 

 
Tagi: torba
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku