Tuneradionál nem tudja meghívni a cuccot...
Ötletek?
ERROR: fc_chat/pmS.lua:728: call: failed to call \'fc_itemsystem:updateItemValue\' [string \"?\"]
function setRadioChannel(thePlayer, commandName, slot, channel)
slot = tonumber( slot )
channel = tonumber( channel )
if not channel then
channel = slot
slot = 1
end
if not (channel) then
outputChatBox(\"Használat:#e7d9b0 /\" .. commandName .. \" [frekvencia]\", thePlayer, 0, 206, 209,true)
else
if (exports.fc_core:hasItem(thePlayer, 6)) then
local count = 0
local items = exports[\'fc_itemsystem\']:getItems(thePlayer)
for k, v in ipairs( items ) do
if v[1] == 6 then
count = count + 1
if count == slot then
if tonumber(v[2]) > 0 then
if channel > 0 and channel < 1000000000 then
if exports[\'fc_itemsystem\']:updateItemValue(thePlayer, k, channel) then -- EZ A HIBÁS SOR (728 sor)
outputChatBox(\"Beállítottad a rádiódat a #\" .. channel .. \" frekvenciára.\", thePlayer)
exports.sc_core:sendLocalMeAction(thePlayer, \"átálítja a rádiója frekvenciáját.\")
end
else
outputChatBox(\"Tiltott frekvencia.\", thePlayer, 255, 0, 0)
end
else
outputChatBox(\"A Rádiód ki van kapcsolva. ((/toggleradio))\", thePlayer, 255, 0, 0)
end
return
end
end
end
outputChatBox(\"Érvényltelen rádió ID! Nincs ennyi rádiód.\", thePlayer, 255, 0, 0)
else
outputChatBox(\"Nincs rádiód!\", thePlayer, 255, 0, 0)
end
end
end
addCommandHandler(\"tuneradio\", setRadioChannel, false, false)
Tuneradionál nem tudja meghívni a cuccot...
Ötletek?
ERROR: fc_chat/pmS.lua:728: call: failed to call \'fc_itemsystem:updateItemValue\' [string \"?\"]
function setRadioChannel(thePlayer, commandName, slot, channel)
slot = tonumber( slot )
channel = tonumber( channel )
if not channel then
channel = slot
slot = 1
end
if not (channel) then
outputChatBox(\"Használat:#e7d9b0 /\" .. commandName .. \" [frekvencia]\", thePlayer, 0, 206, 209,true)
else
if (exports.fc_core:hasItem(thePlayer, 6)) then
local count = 0
local items = exports[\'fc_itemsystem\']:getItems(thePlayer)
for k, v in ipairs( items ) do
if v[1] == 6 then
count = count + 1
if count == slot then
if tonumber(v[2]) > 0 then
if channel > 0 and channel < 1000000000 then
if exports[\'fc_itemsystem\']:updateItemValue(thePlayer, k, channel) then -- EZ A HIBÁS SOR (728 sor)
outputChatBox(\"Beállítottad a rádiódat a #\" .. channel .. \" frekvenciára.\", thePlayer)
exports.sc_core:sendLocalMeAction(thePlayer, \"átálítja a rádiója frekvenciáját.\")
end
else
outputChatBox(\"Tiltott frekvencia.\", thePlayer, 255, 0, 0)
end
else
outputChatBox(\"A Rádiód ki van kapcsolva. ((/toggleradio))\", thePlayer, 255, 0, 0)
end
return
end
end
end
outputChatBox(\"Érvényltelen rádió ID! Nincs ennyi rádiód.\", thePlayer, 255, 0, 0)
else
outputChatBox(\"Nincs rádiód!\", thePlayer, 255, 0, 0)
end
end
end
addCommandHandler(\"tuneradio\", setRadioChannel, false, false)
Az item system ezen funkcióját is küld be ide.