• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction Add Reset.. /addreset DevilMoon, 1

DevilMoon

New Member
Joined
Feb 15, 2010
Messages
4
Reaction score
0
Go to Date> Talkactions> Scripts Create a pasta.lua addreset and take this call!

Code:
-- [[ Script by Devilmoon e Vodkart ]] --
function onSay(cid, words, param) 
 
local t = string.explode(param, ",") 
if not t[2] then 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") 
end 
 
local s = 36874 
local player = getPlayerByName(t[1]) 
local quanty = t[2] 
local pid = getPlayerByNameWildcard(t[1]) 
local storageplayer = getPlayerStorageValue(player, s) 
local time = storageplayer+quanty 
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") 
return TRUE 
end 
 
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Were added "..quanty.." reset your character.") 
setPlayerStorageValue(player, s, time) 
return TRUE
end

in Talkactions.xml

Code:
       <talkaction words="/addreset" event="script" value="addreset.lua"/>

You should now be wondering, who Aff vo te add access = "5" on the tag, why is not the player will use! and what'd getresets that means?

None of the script already comes with the!

getPlayerAccess if (cid) == 5 then

For Gods..

Bye..

Sorry for my English sucks. I'm Brazilian
 
eH? who would use this script, it's just a storage value :ninja:
 
The StorageValue is My System Reset System, More Can Change for 1020 which is the !Reset
 
Back
Top