slaw
Software Developer
Someone know how to make Invisible on 8.0 in TFS? Becouse there is only one for 8.1, but i really fast need for 8.0 ;(
I tried make it from Devland
Devland invisible:
TFS /ghost:
And this is my finnally code, TFS + Devland:
And it wasn't possible to compile, so i needed to change:
I removed it from Private.
But when i'm using /ghost command clien get debug ;<
Please help, i'm newbie in C++, but i'm learning fast ;D
I tried make it from Devland
Devland invisible:
Code:
bool Commands::setInvisible(Creature* c, const std::string &cmd, const std::string ¶m)
{
Player* gm = c->getPlayer();
Outfit_t outfit;
if(!gm)
return false;
if (gm->gmInvisible) {
outfit.lookType = 75;
g_game.playerChangeOutfit(gm, outfit);
gm->gmInvisible = false;
gm->sendTextMessage(MSG_EVENT_ADVANCE,"You are Visible again.");
c->getTile()->onUpdateTile();
}
else
{
Outfit_t outfit;
outfit.lookTypeEx = 4390;
g_game.playerChangeOutfit(gm, outfit);
gm->gmInvisible = true;
gm->sendTextMessage(MSG_EVENT_ADVANCE,"You are Invisible.");
c->getTile()->onUpdateTile();
}
return true;
}
Code:
bool Commands::ghost(Creature* creature, const std::string& cmd, const std::string& param)
{
Player* player = creature->getPlayer();
if(player)
{
player->ghostMode = !player->ghostMode;
char buffer[60];
sprintf(buffer, "You have switched ghost mode mode to: %s.", (player->ghostMode ? "enabled" : "disabled"));
if(player->ghostMode)
{
const int32_t invisibleOutfit = 280;
g_game.internalCreatureChangeOutfit(creature, (const Outfit_t&)invisibleOutfit);
}
player->sendTextMessage(MSG_INFO_DESCR, buffer);
return true;
}
return false;
}
Code:
bool Commands::ghost(Creature* creature, const std::string& cmd, const std::string& param)
{
Player* player = creature->getPlayer();
if(player)
{
player->ghostMode = !player->ghostMode;
char buffer[60];
sprintf(buffer, "You have switched ghost mode mode to: %s.", (player->ghostMode ? "enabled" : "disabled"));
if(player->ghostMode)
{
const int32_t invisibleOutfit = 4390;
g_game.internalCreatureChangeOutfit(creature, (const Outfit_t&)invisibleOutfit);
creature->getTile()->onUpdateTile();
}
player->sendTextMessage(MSG_INFO_DESCR, buffer);
return true;
}
return false;
And it wasn't possible to compile, so i needed to change:
Code:
void onUpdateTile();
But when i'm using /ghost command clien get debug ;<
Please help, i'm newbie in C++, but i'm learning fast ;D