What's new

Skrypty & Kody Efekt dla Buffa

Czopeq

Advanced User
Joined
Jun 29, 2015
Messages
191
Reaction score
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??
 

new sell

Active User
Joined
Mar 25, 2015
Messages
112
Reaction score
4
Odp: Efekt dla Buffa

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

nwm czy pomoze ale sprawdz
 

Czopeq

Advanced User
Joined
Jun 29, 2015
Messages
191
Reaction score
6
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
 

new sell

Active User
Joined
Mar 25, 2015
Messages
112
Reaction score
4
Odp: Efekt dla Buffa

a masz w ogole exhaustion ustawiony w xml?
 

Czopeq

Advanced User
Joined
Jun 29, 2015
Messages
191
Reaction score
6
Odp: Efekt dla Buffa

@up
Co? A co to ma do rzeczy?
Nie, ustawi?em w skrypcie.
 

buchaLL

bez spiny, luźno
Joined
Aug 2, 2011
Messages
1,013
Reaction score
68
Age
27
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]
 
Top