Author Message
Guser Tatunkh Youres
PostPosted: Thu 11:46, 27 Dec 2007    Post subject:

O kurcze niewcziskaj mi tu golych lasek :( :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil:
dney
PostPosted: Sun 19:15, 07 Oct 2007    Post subject:

kgfakjhadgl jahfllkfhak dldjhvalk 34241 141353 hakljfh65f7adgdshs 3457kagfakj g45 fak 34 5 63462 4625 6 65 6 65 43 t54 fc3535g54gcvqewv78 65 765 5 65 5 5 576578 jiyt 8v7nycv yitcgi87y dt ytr98 yriohtr98 hriglurh oriu rhow4ith g58 9y8oiru
RHTM
PostPosted: Sat 14:56, 07 Apr 2007    Post subject: [7.6][c++] Nie mozna wysyłac msg do GM'a.

Od tak sobie maly kod ktory uniemozliwia wysylanie wiadomosci na Priv do GMa. przy czym graczowi pokazuje sie wiadomosc ktora uswiadamia mu ze wiadomosci nie dochodza.. co sprowadza sie do tego ze mniej osob bedzie sie odrazu wqrwialo i opuszczalo servery pod pretextem tego ze GM to nOOb xD

kod jest bardzo prosty hehe prezetuje tu wersje ktora mozna ustawiac w configu..

w game.cpp szukamy

Code:
void Game::creatureSpeakTo(Creature *creature, SpeakClasses type,const std::string &receiver, const std::string &text)
{
OTSYS_THREAD_LOCK_CLASS lockClass(gameLock, "Game::creatureSpeakTo");

Player* player = dynamic_cast<Player*>(creature);
if(!player)
return;

Player* toPlayer = getPlayerByName(receiver);
if(!toPlayer) {
player->sendTextMessage(MSG_SMALLINFO, "A player with this name is not online.");
return;
}


i pod tym dodajemy:

Code:
if(toPlayer->access >= 3 && g_config.getGlobalString("gmmsg") == "no") {
player->sendTextMessage(MSG_ADVANCE, "You cannot message to GM.");
return;
}


w config.lua dodajemy

Code:
--------------GM Msg-----------
gmmsg = no



Skrypt by Palladineq

Powered by phpBB © 2001,2002 phpBB Group