Gelio
Lua PHP C++ programmer
Hello. I've written code for my ot server, because I didn't known when I was ghost. On TFS 0.3b3 if you are ghost nothing except message you can't see about it. So to know when I'm ghost I've written this code. It change your hp to 1 when you are ghost, and when ghost are disable your health change to max health. So, let'a go:
In talkaction.cpp:
Under:
Add:
Under:
Add:
Now compile.
Yours,
Gelio
In talkaction.cpp:
Under:
Code:
player->sendTextMessage(MSG_INFO_DESCR, "You are now invisible.");
Code:
player->changeHealth(1);
Code:
player->sendTextMessage(MSG_INFO_DESCR, "You are visible again.");
Code:
player->changeHealth(player->getMaxHealth());
Yours,
Gelio