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

!save

Lava Titan

Developer
Joined
Jul 25, 2009
Messages
1,571
Solutions
3
Reaction score
98
Location
Portugal
Hello Otland.
Today i had some problems with crash's and players told me to get a command: !save

So i wanted to request that command.
A save command with exh, this command is only allowed to do each 60 seconds.

Using 0.3.5pl1
Script type: talkaction

Regards!
Lava Titan
 
Try using this not tested
LUA:
local exhaust = {
    storage = 3336,
    duration = 60
}
function onSay(cid, words, param)
  if (os.time() - getPlayerStorageValue(cid, exhaust.storage)) >= exhaust.duration then
     doPlayerSave(cid)
	 setPlayerStorageValue(cid, exhaust.storage, os.time()) 
	 doPlayerSendTextMessage(cid, 25, "You character have been saved") 
  else
      doPlayerSendCancel(cid, "You cannot use this yet.")
       return TRUE
  end
  return TRUE
end
 
Code:
function onSay(cid, words, param, channel)
	if (exhaustion.get(cid, xxxx) == false) then
		doPlayerSave(cid)
		exhaustion.set(cid, xxxx, 60)
	else
		doPlayerSendCancel(cid, "You are exhausted.")
	end
	return true
end
 
Back
Top