Hegemonia OTS

Forum Hegemonia OTS


  • Index
  •  » CVS & Kody
  •  » !rs - pokazuje ile czasu do znikniecia red skulla.

#1 2006-11-04 17:45:58

RaFi

Noob

Zarejestrowany: 2006-10-30
Posty: 10
Punktów :   

!rs - pokazuje ile czasu do znikniecia red skulla.

Przyklad :
13:37 GM: !rs
13:37 Redskull zniknie za 6 hours 33 minutes

commands.cpp:
Za:

Kod:

{"/kick",&Commands::kickPlayer},

Dodaj:

Kod:

{"!rs",&Commands::showRs},

Za:

Kod:

bool Commands::kickPlayer(Creature* c, const std::string &cmd, const std::string ¶m)
{
        Player* playerKick = game->getPlayerByName(param);
        if(playerKick){
                Player* player = dynamic_cast<Player*>(c);
                if(player && player->access <= playerKick->access){
                        player->sendTextMessage(MSG_BLUE_TEXT,"You cannot kick this player.");
                        return true;
                }
                playerKick->kickPlayer();
                return true;
        }
        return false;
}

Dodaj:

Kod:

bool Commands::showRs(Creature* c, const std::string &cmd, const std::string ¶m)
{
        Player* player = dynamic_cast<Player*>(c);

        if (player && player->skullType==SKULL_RED)
        {
                std::ostringstream info;
                info << "Red Skull zniknie za " << str(player->skullTicks) << '.';
                player->sendTextMessage(MSG_BLUE_TEXT, info.str().c_str());
        }
        else
        {
        std::ostringstream info;
        info << "Ty nie masz Red Skulla";
        player->sendTextMessage(MSG_BLUE_TEXT, info.str().c_str());
        }

        return true;
}

commands.h:
Za:

Kod:

bool kickPlayer(Creature* c, const std::string &cmd, const std::string ¶m);

Dodaj:

Kod:

bool showRs(Creature* c, const std::string &cmd, const std::string ¶m);

Hegemonia Respect ^^

Offline

 
  • Index
  •  » CVS & Kody
  •  » !rs - pokazuje ile czasu do znikniecia red skulla.
Hegemonia OTS

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.ableton.pun.pl www.vstransmys.pun.pl www.wige2011egzaminie.pun.pl www.strazrepki.pun.pl www.uniapodkarpacka.pun.pl