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

How to add a gamemaster ingame in TFS 1.0?

dominique120

Science & Reason
Senator
Premium User
Joined
Jun 16, 2013
Messages
3,881
Solutions
3
Reaction score
1,046
Location
Númenor
Dont tell me to set account type to 5 and group 3, I know this.

My question is how do I do this in-game? in TFS 0.4 there was the /promote command but in TFS 1.0 it does not exist.

@Ninja I'm sure you know the answer :P
 
Code:
function onSay(cid, words, param)
    local player = Player(cid)
    if player:getAccountType() <= ACCOUNT_TYPE_TUTOR then
        return true
    end

    local target = Player(param)
    if target == nil then
        player:sendCancelMessage("A player with that name is not online.")
        return false
    end

    if target:getAccountType() ~= ACCOUNT_TYPE_NORMAL then
        player:sendCancelMessage("You can only promote a normal player to a tutor.")
        return false
    end

    target:setAccountType(ACCOUNT_TYPE_TUTOR)
    target:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been promoted to a tutor by " .. player:getName() .. ".")
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have promoted " .. target:getName() .. " to a tutor.")
    return false
end
Hare is script for add tutor, all what u need to do is set

Code:
ACCOUNT_TYPE_TUTOR
on
Code:
ACCOUNT_TYPE_GAMEMASTER

In the future (tomorrow, after tomorrow) I'll add a script that will work how / Promote - / demote
 
try:
Code:
function onSay(cid, words, param)
    local player = Player(cid)
    if player:getAccountType() <= ACCOUNT_TYPE_GAMEMASTER then
        return true
    end

    local target = Player(param)
    if target == nil then
        player:sendCancelMessage("A player with that name is not online.")
        return false
    end

    if target:getAccountType() ~= ACCOUNT_TYPE_NORMAL then
        player:sendCancelMessage("You can only promote a normal player to a gamemaster.")
        return false
    end

    target:setAccountType(ACCOUNT_TYPE_GAMEMASTER)
    target:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been promoted to a gamemaster by " .. player:getName() .. ".")
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have promoted " .. target:getName() .. " to a gamemaster.")
    return false
end
 

Similar threads

Back
Top