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

Do add storage to player.

Potar

SocialWorld
Senator
Joined
Mar 1, 2009
Messages
1,661
Reaction score
125
Location
Warsaw, Poland
Hello i looking for talkaction script.

It works like : /addstorage NICK, STORAGE, VALUE

Player can by offline and online.

Its possible only for GoD cahracter.
 
It's a manual talkaction and its already added on every server, [/storage]
It allows Game Masters to manually set a storage to a player. For example:

/storage Potar, 12345, 1
It will set storage "12345," with a value of 1.

/storage Potar, 12345, -1
This will remove the storage value or make it -1.
 
He want to change the player's storage while he's offline.

- - - Updated - - -

dunno, may work:
LUA:
function onSay(cid, words, param)
	local t = string.explode(param, ",")
	if(not t[2]) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
		return true
	end

	local tid = getPlayerByNameWildcard(t[1])
	if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
		return true
	end

	if(not t[3]) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, " [" .. t[1] .. " - " .. t[2] .. "] = " .. getPlayerStorageValue(tid, t[2]))
	else
		local idaz = getPlayerGUID(param)
		db.executeQuery("UPDATE FROM `player_storage` SET `value` = ".. t[2] .." WHERE `key` = ".. t[1] .." AND `player_id` = " .. idaz .. ";")
	end

	return true
end
 
Back
Top