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

Help with a script

Gourxis

New Member
Joined
Mar 4, 2015
Messages
7
Reaction score
0
Can someone fix that script for me?

function onSay(cid, words, param)

local storage = 121212
local staff = getPlayerGroupId(cid)
local storage1 = getPlayerStorageValue(cid,storage)

if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
elseif getPlayerGroupId(cid) >= 6 and param == "off" then
setPlayerStorageValue(cid,storage,staff)
doPlayerSetGroupId(cid,1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You enter in game mode.")

elseif storage1 >= 2 and param == "on" then
doPlayerSetGroupId(cid,storage1)
doPlayerSetStorageValue(cid,storage,1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You enter in staff mode.")
doRemoveCondition(cid, CONDITION_INFIGHT)

elseif (getPlayerGroupId(cid) >= 2 and param == "on") or (storage1 >= 2 and param == "off") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You already are in that mode.")

else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You dont are a staff.")
end
end

TFS 0.3.6 Tibia 8.54 i need some help to fix that script because when you say the talkaction the works dont hide
 
Can someone fix that script for me?

function onSay(cid, words, param)

local storage = 121212
local staff = getPlayerGroupId(cid)
local storage1 = getPlayerStorageValue(cid,storage)

if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
elseif getPlayerGroupId(cid) >= 6 and param == "off" then
setPlayerStorageValue(cid,storage,staff)
doPlayerSetGroupId(cid,1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You enter in game mode.")

elseif storage1 >= 2 and param == "on" then
doPlayerSetGroupId(cid,storage1)
doPlayerSetStorageValue(cid,storage,1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You enter in staff mode.")
doRemoveCondition(cid, CONDITION_INFIGHT)

elseif (getPlayerGroupId(cid) >= 2 and param == "on") or (storage1 >= 2 and param == "off") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You already are in that mode.")

else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You dont are a staff.")
end
end

TFS 0.3.6 Tibia 8.54 i need some help to fix that script because when you say the talkaction the works dont hide

What's wrong with the script? Or what issues are you having?
 
The script dont show any errors in the console, but when i say it in game the command go like a normal message http://prntscr.com/7u17an
Code:
function onSay(cid, words, param)
local storage = 121212
local staff = getPlayerGroupId(cid)
local storage1 = getPlayerStorageValue(cid,storage)

    if(param == "") then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
    elseif getPlayerGroupId(cid) >= 6 and param == "off" then
        setPlayerStorageValue(cid,storage,staff)
        doPlayerSetGroupId(cid,1)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You enter in game mode.")
    elseif storage1 >= 2 and param == "on" then
        doPlayerSetGroupId(cid,storage1)
        doPlayerSetStorageValue(cid,storage,1)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You enter in staff mode.")
        doRemoveCondition(cid, CONDITION_INFIGHT)
    elseif (getPlayerGroupId(cid) >= 2 and param == "on") or (storage1 >= 2 and param == "off") then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You already are in that mode.")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You dont are a staff.")
    end
    return true
end
 
Back
Top