• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

exhaus na talkaction

destro84

New Member
Joined
Apr 14, 2010
Messages
43
Reaction score
0
Witam, mam problem. Nie wiem czemu mi nie działa exhausted na talkaction

Code:
function onSay(cid, words, param, channel)
	local guild = getPlayerGuildId(cid)
[COLOR="Red"]        local waittime = 1200
        local storage = 9843
[/COLOR]
(...)
        [COLOR="Red"]if exhaustion.get(cid, storage) == FALSE then[/COLOR]
	doBroadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE)
[COLOR="Red"]exhaustion.set(cid, storage, waittime)
        else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait another " .. exhaustion.get(cid, storage) .. " seconds.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
        end   [/COLOR] 
return true
(...)


Mimo tego, że ustawiłem exhausted to i tak można wypowiadać non stop wojnę. Co jest nie tak?
 
Ja to jednak jestem jakiś inny;x
to co tu napisałem w 100% działa a mi nie działało bo u siebie nie dałem
Code:
if exhaustion.get(cid, storage) == FALSE then

pff zal mi sie:P (a i btw ma być 1200 a nie 120000)

anyway chcialbym zeby pokazywalo w minutach za ile czasu ktoś będzie mógł wypowiedzieć kolejną wojnę, więc:
Code:
" .. exhaustion.get(cid, storage)/60 .. "

tylko, że teraz pokazuje bardzo dużo liczb po przecinku..
You must wait another 17.583333333333 minutes...


Jak zrobić żeby pokazywało tylko 2 liczby po przecinku?
 
Hmm dałem:
Code:
local waittime = math.floor(1200)
próbowałem też
Code:
local waittime = math.floor(1200/60)

Ale cały czas pokazuje kilkanaście liczb po przecinku :/
 
Back
Top