Old Old School Server
Welcome 2 Old School
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  GalleriesGalleries   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[7.6][c++] Nie mozna wysyłac msg do GM'a.

 
Post new topic   Reply to topic    Old School Server Forum Index -> Skrypty
View previous topic :: View next topic  
Author Message
RHTM
Hoster
<font color=blue>Hoster</font>



Joined: 14 Feb 2007
Posts: 1341
Read: 0 topics

Warns: 0/5
Location: Wrocław

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


The post has been approved 0 times
Back to top
View user's profile
dney
Guest






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
Back to top
Guser Tatunkh Youres
Newbie



Joined: 27 Dec 2007
Posts: 9
Read: 0 topics

Warns: 0/5

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:

The post has been approved 0 times
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Old School Server Forum Index -> Skrypty All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2002 phpBB Group
Regulamin