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

[REQUEST]GM says !nice "nameplayer

Guapoke

Member
Joined
Nov 21, 2008
Messages
259
Reaction score
5
Talkacion that when GM says !nice "nameplayer
Player then can open the door X
Is it possible?
Thanks!
 
Use storage values, you can use this script made by SantCool you can add storages values just saying /storagevalue Pitufo,9090,1

Pitufo = Name of player
9090 = StorageNumber
1 = StorageValue

In talkactions:

PHP:
function onSay(cid, words, param)
	if(param == "") then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
		return FALSE
	end

	local tmpValue = string.explode(param, ",")

	if(tmpValue[3]) then
		setPlayerStorageValue(getPlayerByName(tmpValue[1]),tmpValue[2],tmpValue[3])
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "".. tmpValue[2] .." set to ".. tmpValue[3] .." to player " .. tmpValue[1].. ".")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
		return FALSE
	end
end

Then you should just make the door available for X storage value!
 
PHP:
  function onSay(cid, words, param)
    if(param == "") then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
        return FALSE
    end

    setPlayerStorageValue(getPlayerByName(param),__PUT_YOUR_ACTION_ID_ON_THE_DOOR_THAT_THEY_CAN_OPEN_HERE__,1)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have niced ".. param ..".")

    return FALSE

end
 
Back
Top