• 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!

!backpack talkaction,exhaustion 10 sec rep+ for help

Dramix

New Member
Joined
Jun 26, 2009
Messages
289
Reaction score
1
Hello otlanders, i need help with one script, here is it..
function onSay(cid, words, param)
local cost = 0
local item = 9774
local quantity = 1
if doPlayerRemoveMoney(cid, cost) == TRUE then
doPlayerAddItem(cid, item, quantity)
else
doPlayerSendCancel(cid, "You have not enough gold.")
end
return TRUE
end

I want to add exhaustion 10 sec, so u can execute the command every 10 sec, so you cannot spam it. Rep+ for help
 
Code:
function onSay(cid, words, param)
local cost = 0
local item = 9774
local quantity = 1
if exhaustion.check(cid, 9534) == false then -- 9534 Empty storage
exhaustion.set(cid, 9534, 10) -- 10 seconds to use command again
if doPlayerRemoveMoney(cid, cost) == TRUE then
doPlayerAddItem(cid, item, quantity)
else
doPlayerSendCancel(cid, "You have not enough gold.")
end
return TRUE
end
Not tested
 
Back
Top