Wysłany: 2018-06-21, 15:12
lolekpl1234
Wiek: 25 Na forum: 3778 dni Posty: 11
Nick w MP: DallaS.
Witam serdecznie, drogich u?ytkownik?w ?w forum. Napotka?em pewien problem przy gm DayZ, mianowicie po na?o?eniu plecaka nie pojawia si? on na plecach. Widzia?em podobny dzia? na tym forum, ale nie potrafi? sobie z tym poradzi?.
Za pomoc daje piwka.
Wysłany: 2018-06-21, 15:17
PatryKK.
Emeryt LUA
Wiek: 26 Na forum: 3061 dni Posty: 1060
Nick w MP: PatryKK.
Piwa : 2322
Mo?esz da? kod?
Podpis
GG:75080675
- ✔
- ✔
- ✔
- ✔
Aktualny projekt: BRAK
Wysłany: 2018-06-21, 17:05
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
"lolekpl1234" napisał/a :Witam serdecznie, drogich u?ytkownik?w ?w forum. Napotka?em pewien problem przy gm DayZ, mianowicie po na?o?eniu plecaka nie pojawia si? on na plecach. Widzia?em podobny dzia? na tym forum, ale nie potrafi? sobie z tym poradzi?.
Za pomoc daje piwka.
Tutaj kod,
https://github.com/ValdriGaR/MTA-DayZ/blob/master/survivorSystem.lua
Potrzebujesz dok?adnie linijki z nazw? funkcji: backPackBack
Więcej szczegółów
Wystawiono 1 piw(a):lolekpl1234
Wysłany: 2018-06-21, 20:11
lolekpl1234
Wiek: 25 Na forum: 3778 dni Posty: 11
Nick w MP: DallaS.
Wiem, ?e to sie robi w survivorsystem ale w tej paczcie kt?r? mam nie ma tego pliku.
dayz beta 0.7
Kod by? dam, ale nie wiem kt?ry plik odpowiada za plecaki.
[ Dodano : 2018-06-22, 14:27 ]
Ok, jednak wszystko ju? wiem. Plecaki s? naprawiona, ale jest kolejny problem. Chodzi o to, i? podmieni?em plecaki to by?y one ustawione pod k?tem 90 stopni wzgl?dem peda.
https://imgur.com/a/7Evipz5
Dodalem do tego rx, ry, rz i nie dziala: elseif (newValue >= 74) then elementBackpack[source] = createObject(2406, x, y, z); -- Coyote Backpack
Jak to zrobi? w inny sposob?
Caly Kod:
Kod: addEventHandler("onElementDataChange", root, function(dataName, oldValue)
if not oldValue then oldValue = 0; end
if (getElementType(source) == "player") then
if (dataName == "MAX_Slots") then
local newValue = getElementData(source, dataName);
removeBackpack(source);
local x,y,z = getElementPosition(source);
if (newValue == 24) then elementBackpack[source] = createObject(3026, x, y, z); -- Assault Pack (ACU)
elseif (newValue == 46) then elementBackpack[source] = createObject(1248, x, y, z); -- Alice Pack
elseif (newValue == 64) then elementBackpack[source] = createObject(1575, x, y, z); -- Czech Backpack
elseif (newValue >= 74) then elementBackpack[source] = createObject(2406, x, y, z); -- Coyote Backpack - plecak z ss
elseif (newValue >= 86) then elementBackpack[source] = createObject(1252, x, y, z); -- Military Backpack
elseif (newValue >= 112) then elementBackpack[source] = createObject(1252, x, y, z); -- The Backpack
elseif (newValue == 8) then return; end
if elementBackpack[source] then
setElementData(source, "tohide2", elementBackpack[source]);
if (newValue >= 36) then
setObjectScale(elementBackpack[source], 0.95);
end
end
if (newValue == 26) then
attachElementToBone(elementBackpack[source], source, 3, 0, -0.16, 0.05, 270, 0, 180);
else
attachElementToBone(elementBackpack[source], source, 3, 0, -0.225, 0.05, 90, 0, 0);
end
elseif (dataName == "Map") then
if (getElementData(source, "Map") >= 1) then
toggleControl(source, "radar", true);
else
toggleControl(source, "radar", false);
end
elseif (dataName == "GPS") then
if (getElementData(source, "GPS") >= 1) then
setPlayerHudComponentVisible(source, "radar", true);
else
setPlayerHudComponentVisible(source, "radar", false);
end
end
local weapon1 = getElementData(source, "currentweapon_1");
local weapon2 = getElementData(source, "currentweapon_2");
local weapon3 = getElementData(source, "currentweapon_3");
if (dataName == weapon1 or dataName == weapon2 or dataName == weapon3) then
if (getElementData(source, dataName) == 0) then
local ammoData,weapID = getWeaponAmmoType(dataName);
takeWeapon(source, weapID);
end
end
local ammoData1,weapID1 = getWeaponAmmoType(weapon1);
if (dataName == ammoData1) then
local newammo = (oldValue-getElementData(source, dataName));
if (newammo == 1) then return; end
if (getElementData(source, dataName) < oldValue) then
takeWeapon(source, weapID1, newammo);
removeWeaponBack(source);
elseif (getElementData(source, dataName) > oldValue) then
giveWeapon(source, weapID1, getElementData(source, dataName)-oldValue, false);
end
end
local ammoData2,weapID2 = getWeaponAmmoType(weapon2);
if (dataName == ammoData2) then
local newammo = oldValue-getElementData(source, dataName);
if (newammo == 1) then return; end
if (getElementData(source, dataName) < oldValue) then
takeWeapon(source, weapID2, newammo);
elseif (getElementData(source,dataName) > oldValue) then
giveWeapon(source, weapID2, getElementData(source, dataName)-oldValue, false);
end
end
local ammoData3,weapID3 = getWeaponAmmoType(weapon3);
if (dataName == ammoData3) then
local newammo = oldValue-getElementData(source, dataName);
if (newammo == 1) then return; end
if (getElementData(source, dataName) < oldValue) then
takeWeapon(source, weapID3, newammo);
elseif (getElementData(source, dataName) > oldValue) then
giveWeapon(source, weapID3, getElementData(source, dataName)-oldValue, false);
end
end
end
end);
Tagi: małe :: zakłopotanie
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: