Jump to content
×
×
  • Create New...

Player Information Command


Recommended Posts

open and search cmd.cpp

Kod:
ACMD(do_block_chat_list);

add under

Kod:
ACMD(do_bilgi_al);

search

Kod:
{ "block_chat_list",do_block_chat_list, 0, POS_DEAD, GM_PLAYER },

add under

Kod:
{ "bilgi",do_bilgi_al, 0, POS_DEAD, GM_IMPLEMENTOR },



cmd_gm.cpp open and add under

Kod:
ACMD (do_bilgi_al)
{
    char arg1[256];
    const char*  Name;
    one_argument(argument, arg1, sizeof(arg1));
    if (!*arg1)
    {
        ch->ChatPacket(CHAT_TYPE_INFO, "/bilgi karakter ismi");
        return;
    }
    Name = arg1;
    LPCHARACTER tch = CHARACTER_MANAGER::instance().FindPC(Name);
    if(!tch)
    {
        ch->ChatPacket(CHAT_TYPE_INFO, "Oyuncu %s bulunamadi.",Name);
        return;
    }
    ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Karakter; %s.",tch->GetName());
    ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Seviye: %d", tch->GetLevel());
    ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Hp miktari: %d", tch->GetHP());
    ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Sp miktari: %d", tch->GetSP());
    ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Exp miktari: %d", tch->GetExp());    
    ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Yang miktari: %d", tch->GetGold());    
}

this command only gamemaster but you want all show player edit this;

 

{ "bilgi",do_bilgi_al, 0, POS_DEAD, GM_IMPLEMENTOR },


in game command

Kod:
/bilgi (oyuncu adı)
/bilgi M2Grand

d21jPZ.thumb.jpg.9aaa5a2c8ba6c638aed1eb8

  • Love 2
Link to comment
Share on other sites

Hello M2Dev Com,

 

 

I think the coding style of it totally awful . I've done it once in English and beautiful

Open cmd.cpp and search :

ACMD(do_block_chat_list);

and add this:

ACMD(do_view_other_stats);

 

Now under this:

{ "block_chat_list",do_block_chat_list, 0, POS_DEAD, GM_PLAYER },

 

add this:

{ "other_stats",do_view_other_stats, 0, POS_DEAD, GM_IMPLEMENTOR },

 

now open the cmd_gm.cpp and add this:

ACMD (do_view_other_stats)
{
    char arg1[256];
    const char*  szName;
    one_argument(argument, arg1, sizeof(arg1));
    if (!*arg1)
    {
        ch->ChatPacket(CHAT_TYPE_INFO, "Usage: /other_stats <name>");
        return;
    }
    szName = arg1;
    LPCHARACTER tch = CHARACTER_MANAGER::instance().FindPC(szName);
    if(!tch)
    {
        ch->ChatPacket(CHAT_TYPE_INFO, "Player %s was not found.", szName);
        return;
    }
    if (tch == ch)
    {
        ch->ChatPacket(CHAT_TYPE_INFO, "You can search any information about you.")
    }
    ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Charaktername; %s.",tch->GetName());
    ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Level: %d", tch->GetLevel());
    ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Hp: %d", tch->GetHP());
    ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Sp: %d", tch->GetSP());
    ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Exp: %d", tch->GetExp());    
    ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Next Exp: %d", tch->GetNextExp());  
    ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Yang: %d", tch->GetGold());  
}
  • Love 4
Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.