• 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 Skull System - Custom TFS 1.x

HeberPcL

[PowerOT.com.br]
Joined
Aug 21, 2007
Messages
1,292
Reaction score
51
Location
Brazil
GitHub
heberpcl
Hey OtLanders,

I'm making a server Enforced and would like to customize the Skull System, based on frags per storage and using all Skull Colors.
{ SKULL_YELLOW, SKULL_GREEN, SKULL_WHITE, SKULL_RED, SKULL_BLACK, SKULL_ORANGE }

I tried using worldType = "pvp" and the setSkull() function works, but Black Skull disables the PVP.

Already using worldType = "enforced" and the setSkull() function does not work!


Could you help me with that?

:)
 
You should set the worldType to PvP then make a few changes in your sources to make it to enforced, xD. I did that a few months ago.
 
Code:
void Game::updateCreatureSkull(const Creature* creature)
{
    if (getWorldType() == WORLD_TYPE_NO_PVP) {
        return;
    }

    SpectatorVec list;
    map.getSpectators(list, creature->getPosition(), true, true);
    for (Creature* spectator : list) {
        spectator->getPlayer()->sendCreatureSkull(creature);
    }
}
 
Code:
void Game::updateCreatureSkull(const Creature* creature)
{
    if (getWorldType() == WORLD_TYPE_NO_PVP) {
        return;
    }

    SpectatorVec list;
    map.getSpectators(list, creature->getPosition(), true, true);
    for (Creature* spectator : list) {
        spectator->getPlayer()->sendCreatureSkull(creature);
    }
}

I tested your code with worldType = "enforced" but it did not work.
 
I tested your code with worldType = "enforced" but it did not work.
where are you using setSkull?
is it inside an if statement with getWorldType() != WORLD_TYPE_PVP ?
if it isn't then i guess you can't update skulls on enforced
 

Similar threads

Back
Top