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

Lua Tutor on TFS 1.2

DougTrajano

New Member
Joined
Nov 23, 2015
Messages
2
Reaction score
0
Hi team.

I have difficulties in adding Tutor Group, Senior, Tutor and Community Manager at TFS 1.2.

This is my original groups.xml from TFS 1.2.

HTML:
<?xml version="1.0" encoding="UTF-8"?>
<groups>
    <group id="1" name="player" flags="0" access="0" maxdepotitems="0" maxvipentries="0" />
    <group id="2" name="gamemaster" flags="137438953471" access="1" maxdepotitems="0" maxvipentries="200" />
    <group id="3" name="god" flags="272730398714" access="1" maxdepotitems="0" maxvipentries="200" />
</groups>

I'm trying to add this groups.xml (down), but he does not perform any talkactions

HTML:
<?xml version="1.0" encoding="UTF-8"?>
<groups>
<group id="1" name="Player"/>
<group id="2" name="Tutor" flags="16809984" customFlags="2" access="1" violationReasons="4" nameViolationFlags="2"/>
<group id="3" name="Senior Tutor" flags="68736352256" customFlags="14" access="5" violationReasons="10" nameViolationFlags="2" statementViolationFlags="63" maxVips="200"/>
<group id="4" name="Gamemaster" flags="3805908148058" customFlags="257215" access="3" violationReasons="19" nameViolationFlags="10" statementViolationFlags="69" depotLimit="3000" maxVips="300" outfit="75"/>
<group id="5" name="Community Manager" flags="3840271032314" customFlags="781823" access="4" violationReasons="20" nameViolationFlags="42" statementViolationFlags="213" depotLimit="4000" maxVips="400" outfit="266"/>

I see that in every script talkactions has the below instruction, how can I fix this?

Code:
function onSay(player, words, param)
if not player:getGroup():getAccess() then
        return true
    end

    if player:getAccountType() < ACCOUNT_TYPE_GOD then
        return false
    end
 
enums.h
Code:
enum AccountType_t : uint8_t {
    ACCOUNT_TYPE_NORMAL = 1,
    ACCOUNT_TYPE_TUTOR = 2,
    ACCOUNT_TYPE_SENIORTUTOR = 3,
    ACCOUNT_TYPE_GAMEMASTER = 4,
    ACCOUNT_TYPE_GOD = 5
};

So it should be something like this:
Code:
if player:getAccountType() < ACCOUNT_TYPE_TUTOR then
So it makes referencw that if the player group ID is lower than 2 (ACCOUNT_TYPE_TUTOR) then return false that means doing nothing
 
Last edited:
i think Tutor and Senior Tutor is just like a normal player , so Group id is 1 and u can just change his account type in DB to 2 or 3 for Tutor or Senior Tutor
 

Similar threads

Back
Top