Untitled
unknown
c_cpp
3 years ago
980 B
3
Indexable
bool canSee = player->canSeeCreature(toPlayer); if(toPlayer->hasCondition(CONDITION_GAMEMASTER, GAMEMASTER_IGNORE) && !player->hasFlag(PlayerFlag_CannotBeMuted)) { char buffer[70]; if(!canSee) sprintf(buffer, "A player with this name is not online."); else sprintf(buffer, "Sorry, %s is currently ignoring private messages.", toPlayer->getName().c_str()); player->sendTextMessage(MSG_STATUS_SMALL, buffer); return false; } if (player->getLevel() < 135) { player->sendTextMessage(MSG_STATUS_SMALL, "You dont have enough level"); return false; } char buffer[80]; toPlayer->sendCreatureSay(player, type, text, NULL, statementId); toPlayer->onCreatureSay(player, type, text); if (!canSee) { player->sendTextMessage(MSG_STATUS_SMALL, "A player with this name is not online."); }else { sprintf(buffer, "Message sent to %s.", toPlayer->getName().c_str()); player->sendTextMessage(MSG_STATUS_SMALL, buffer); }
Editor is loading...