Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2020-03-25, 21:12


Shinnowaty







Wiek: 24
Na forum: 2312 dni
Posty: 25
Nick w MP: Kirotsune

Piwa: 1

Respekt: 50

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)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-03-25, 21:20


Wilq







Wiek: 24
Na forum: 4429 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

1. Zmienna cel jest zdefiniowana?
2. Ten b??d jest powi?zany z pierwszym, wystarczy naprawi? pierwszy.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-03-25, 21:39


Shinnowaty







Wiek: 24
Na forum: 2312 dni
Posty: 25
Nick w MP: Kirotsune

Piwa: 1

Respekt: 50

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??

Postaw piwo autorowi tego posta
 

 
Tagi: pystories-core :: pystories-admins
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » pystories-core i pystories-admins Odpowiedz do tematu

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku