Wysłany: 2020-03-25, 21:12
Shinnowaty
Wiek: 24 Na forum: 2312 dni Posty: 25
Nick w MP: Kirotsune
Piwa : 1
https://imgur.com/a/QbEeIdf
Ot?? posiadam taki problem w tych linijkach:
Do pierwszego:
Kod: if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), cel:lower(), 0, true) then
Drugie:
Kod: local target=exports["pystories-core"]:findPlayer(plr,id)
Wysłany: 2020-03-25, 21:20
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
1. Zmienna cel jest zdefiniowana?
2. Ten b??d jest powi?zany z pierwszym, wystarczy naprawi? pierwszy.
Wysłany: 2020-03-25, 21:39
Shinnowaty
Wiek: 24 Na forum: 2312 dni Posty: 25
Nick w MP: Kirotsune
Piwa : 1
W idSystemu tlyko z cel'em jest to:
Kod: function findPlayer(plr,cel)
local target=nil
if (tonumber(cel) ~= nil) then
target=getElementByID("p"..cel)
else -- podano fragment nicku
for _,thePlayer in ipairs(getElementsByType("player")) do
if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), cel:lower(), 0, true) then
if (target) then
outputChatBox("* Znaleziono wi?cej ni? jednego gracza o pasuj?cym nicku, podaj wi?cej liter.", plr)
return nil
end
target=thePlayer
end
end
end
if target and getElementData(target,"p:inv") then return nil end
return target
end
[ Dodano : 2020-03-26, 18:47 ]
Kto? ma jaki? pomys??
Tagi: pystories-core :: pystories-admins
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: