Problem polega na tym, ?e pr?buj?c usun?? Equipped w paczce Tekkena, w pewien spos?b mi si? to uda?o. Jednak?e wyskakuje taki b??d:
[code]WARNING: dayz/core.lua:459: Bad argument @ 'takeWeapon' [Expected weapon-type at argument 2, got boolean][/code]
Plik:
[code]addEventHandler("removeBackWeaponOnDrop", root, function(check, slot)
if (slot == 1) then
removeWeaponBack(source);
removeWeaponReplace(source);
elseif (slot == 2) then
removeWeaponBack2(source);
end
if check then
local weapon = getElementData(source, "currentweapon_"..tostring(slot));
local _,id,_ = getWeaponAmmoType(weapon);
takeWeapon(source, id);
if (slot == 3) then
takeWeapon(client, id);
local weapon = getElementData(client, "currentweapon_3");
if weapon then
setElementData(client, weapon.." (Equipped)", getElementData(client, weapon.." (Equipped)") - 1);
setElementData(client, "currentweapon_3", "");
end
end
setElementData(source, "currentweapon_"..tostring(slot), "");
triggerClientEvent(source, "refreshInventoryManual", source);
end
end);[/code]
Co podejrzewam o z?e dzia?anie?
[code]addEventHandler("onPlayerMoveItemOutOFInventory", root, function(itemName, loot)
local itemPlus = getItemPlus(itemName)
if itemPlus == 1 and itemName then
triggerServerEvent("removeBackWeaponOnDrop", localPlayer, true, getEquippe... |