Tematy otagowane jako: wyciąganie
1. Wyciąganie siatek z pojazdów
Mam pytanie czy kto? tutaj z zgromadzonych potrafi wyci?gn?? siatke z pojazdu od zera, ew ja poprawi? ?eby dalo sie na?o?y? na pojazd w?asnego paintjoba.
2. Dodawanie rekordów do bazy danych oraz ich wyciąganie
Witam. Chcia?bym zrobi? ?e po oddaniu paczki dodaje mi si? od bazy danych w tabelce truck jeden i tak za ka?dym razem kiedy oddamy skrzynie.
I p??niej jak mog? wyci?gn?? baz? danych informacje z tej tabelki i wy?wietli? je w 3d texcie.
I jak by kto? pom?g? jak zrobi? ?eby tylko danymi autami mo?na by by?o aktywowa? prac?. Osoba kt?ra pomo?e dostanie piwko
3. Torba R1 Wyciąganie z karetki
Gdy wyci?gam torbe R1 z karetki to bierze mi j? i odrazu chowa pom?g? by mi kto? z tym z g?ry dzi?kuje. Za pomoc stawiam zimne piwko
Tutaj daje kod:
[code]local torbysamc = {}
addEvent("onTryTakeSAMCItem1",true)
addEventHandler("onTryTakeSAMCItem1",root,function ()
if not getElementData(client,"SAMC:item:r1") then
stworztorbe(client)
setElementData(client,"SAMC:item:r1",true)
toggleControl(client,"sprint", false )
else
usuntorbe(client)
setElementData(client,"SAMC:item:r1",nil)
toggleControl(client,"sprint", true )
end
end)
function stworztorbe(plr)
if not plr then return end
local x,y,z = getElementPosition(plr)
local torba = createObject(323,x,y,z)
torbysamc[plr] = torba
setElementCollisionsEnabled (torba, false)
exports["bone_attach"]:attachElementToBone(torba,plr,12,0.02,0.1,0.3,0,180,0)
setObjectScale(torba,1.0)
end
function usuntorbe(plr)
if not plr then return end
local torba = torbysamc[plr]
if torba then
if isElement(torba) then
if exports["bone_attach"]:isElementAttachedToBone(torba) then exports["bone_attach"]:detachElementFromBone(torba) end
destroyElement(torba)
end
torbysamc[plr] = nil
end
end
addEventHandler ( "onPlayerQuit", root, function()
local torba = torbysamc[source]
if torba then
if isElement(torba) then
if exports["bone_attach"]:isElementAttachedToBone(torba) then export...
4. Wyciąganie i chowanie
Witam. Ot?? przerobi?em skrypt IgorPL222 pod ACL ale wyst?pi? ma?y problem. Ot?? gdy chc? wyci?gn?? nosze to jednocze?nie je chowam. Za pomoc oraz
[lua]
--[[
Autor: IgorPL222
Nie zezwalam na usuwanie tej notatki
--]]
local objectnosze = {}
local nosze = {}
local mrk = {}
local cols = {}
local timer = {}
resourceRoot = getResourceRootElement(getThisResource())
function dnosze(plr)
local accName = getAccountName ( getPlayerAccount ( plr ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then
x,y,z = getElementPosition(plr)
x2,y2,z2 = getElementRotation(plr)
local veh = getPedOccupiedVehicle(plr)
if not veh then return end
mrk[veh] = createMarker(0, 0, 0, "cylinder", 2, 255, 0, 0, 50)
attachElements(mrk[veh], veh, 0, -4, -1)
objectnosze[veh] = createObject(1997, 0, 0, 0, 0, 0, 0)
setElementCollisionsEnabled(objectnosze[veh], false)
attachElements(objectnosze[veh], veh, 0, -1, -0.5)
outputChatBox("Dodano nosze do karetki!", plr, 255, 255, 255)
end
end
addCommandHandler("dnosze", dnosze)
function onMarker(plr)
local accName = getAccountName ( getPlayerAccount ( plr ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "PR" ) ) then
outputChatBox("Aby wzi???/schowa? nosze wpisz: /wez-nosze", plr, 255, 255, 255)
setElementData(plr, "able:to:nosze", true)
end
end
addEventHandler("...
5. Jednoczesne chowanie i wyciąganie
Witam mam problem, ot?? gdy wpisuj? komend? na wyci?gni?cie noszy jednocze?nie si? chowaj?. Za pomoc i
KOD
[lua]
--[[
Autor: IgorPL222
Nie zezwalam na usuwanie tej notatki
--]]
local objectnosze = {}
local nosze = {}
local mrk = {}
local cols = {}
local timer = {}
resourceRoot = getResourceRootElement(getThisResource())
function dnosze(plr)
local accName = getAccountName ( getPlayerAccount ( plr ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then
x,y,z = getElementPosition(plr)
x2,y2,z2 = getElementRotation(plr)
local veh = getPedOccupiedVehicle(plr)
if not veh then return end
mrk[veh] = createMarker(0, 0, 0, "cylinder", 2, 255, 0, 0, 50)
attachElements(mrk[veh], veh, 0, -4, -1)
objectnosze[veh] = createObject(1997, 0, 0, 0, 0, 0, 0)
setElementCollisionsEnabled(objectnosze[veh], false)
attachElements(objectnosze[veh], veh, 0, -1, -0.5)
outputChatBox("Dodano nosze do karetki!", plr, 255, 255, 255)
end
end
addCommandHandler("dnosze", dnosze)
function onMarker(plr)
local accName = getAccountName ( getPlayerAccount ( plr ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "PR" ) ) then
outputChatBox("Aby wzi???/schowa? nosze wpisz: /wez-nosze", plr, 255, 255, 255)
setElementData(plr, "able:to:nosze", true)
end
end
addEventHandler("onMarkerHit", resourceRoot, onMar...
6. Wyciąganie liczb z bazy danych
Tak jak w temacie, chcia?bym wyci?gn?? pewn? liczb? z bazy danych i j? napisa? na chacie gracza, z g?ry dzi?ki.
function sprawdzpunkty ( plr )
local uid = getElementData ( plr , "player:uid" )
local result = exports [ "ogrpg-db" ]: dbGet ( "SELECT * FROM job_kurier_topka WHERE uid=? AND ulepszenienapiwki=? AND punkty=?" , tonumber ( uid ), 0 )
outputChatBox ( "Twoja liczba punkt?w: " .. #result.."", plr)
end
addCommandHandler ( "kurier-punkty" , sprawdzpunkty )
7. Wyciąganie danych z SQLite
Witam, mam problem z wyci?ganiem danych z SQLite, ucz? si? dopiero LUA i pr?buje ale nie potrafi? tego zrobi?:
local gate= createObject ( 8378 , 2882.5 ,- 246.19999694824 , 11.199999809265 , 0 , 0 , 90 )
function bramacrips ( plr )
if ( getAccount ( data . account )) then
local player = getAccountPlayer ( getAccount ( data . account ))
users [ data . groupName ] = {}
table . insert ( users [ data . groupName ], data . account )
if ( player ) then
moveObject ( gate , 2000 , 2882.5 ,- 246.19999694824 , 4.199999809265 )
end
end
function bramacrips2 ( plr )
if ( getAccount ( data . account )) then
local player = getAccountPlayer ( getAccount ( data . account ))
users [ data . groupName ] = {}
table . insert ( users [ data . groupName ], data . account )
if ( player ) then
moveObject ( gate , 2000 , 2882.5 ,- 246.19999694824 , 11.199999809265 )
end
end
addCommandHandler ( 'otworz' , bramacrips )
addCommandHandler ( 'zamknij' , bramacrips2 )
end
end
(S? na ko?cu dwa endy bo bez tego skrypt si? nie uruchamia?.)
Zamierzam zrobi? bramy pod bazy do grup(DayZ)
Oto skrypcik razem z db:
[CLICK]
Mo?e przy okazji si? czego? naucz?, dzi?ki z g?ry