Skrypty & Kody Efekt dla Buffa

Czopeq

Advanced User
Zarejestrowany
Dołączył
Czerwiec 29, 2015
Posty
191
Liczba reakcji
6
Hello, pr?buj? od d?u?szego czasu zrobi? funkcj? kt?ra sprawdza czy gracz ma exhaustion... jak ma to dostaje efekt jak nie to nie... Ale co? mi nie wychodzi ;d
pr?buje z czym? takim:
[LUA]function onThink(interval)
local players = getPlayersOnline()
for _, cid in ipairs(getPlayersOnline()) do
if exhaustion.get(cid, 12345) == true then
doSendMagicEffect(getPlayerPosition(cid), 12)
end
end
return true
end[/LUA]

Do spella doda?em to: exhaustion.set(cid, 12345, 20)
Efektu niema, b??du niema... jak daj? na "false" Efekt jest, ale dla ka?dego gracza czy u?yje spella czy nie.
Kto? co??
 
Odp: Efekt dla Buffa

[LUA]if exhaustion.check(cid, 12345) == true then[/LUA]

nwm czy pomoze ale sprawdz
 
Odp: Efekt dla Buffa

@up
Wcze?niej pr?bowa?am
[LUA]if exhaustion.check(cid, 12345) == true or exhaustion.get(cid, 12345) == true or getPlayerStorageValue(cid, 12345) >= 1 then[/LUA]
?eby zobaczy? czy co? wy?apie i nic :D
 
Odp: Efekt dla Buffa

a masz w ogole exhaustion ustawiony w xml?
 
Odp: Efekt dla Buffa

@up
Co? A co to ma do rzeczy?
Nie, ustawi?em w skrypcie.
 
Odp: Efekt dla Buffa

Spr?buj w ten spos?b.
[lua]local exhaust = 1234

if getPlayerStorageValue(cid, exhaust) > os.time() then
doPlayerSendCancel(cid, "You're exhausted")
return 1
end

setPlayerStorageValue(cid, exhaust, os.time() + 1)[/lua]
 
Back
Do góry