Most visitors online was 12487 , on 27 Apr 2024
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!//Edit Player Aspeed
bool ChatHandler::HandleModifyASpeedCommand(char* args)
{
if (!*args)
return false;
float modSpeed = (float)atof(args);
if (modSpeed > 10 || modSpeed < 0.1) ///<Change the 10 in this line to what you want>
{
SendSysMessage(LANG_BAD_VALUE);
SetSentErrorMessage(true);
return false;
}
Player *chr = getSelectedPlayer();
if (chr == NULL)
{
SendSysMessage(LANG_NO_CHAR_SELECTED);
SetSentErrorMessage(true);
return false;
}
// check online security
if (HasLowerSecurity(chr))
return false;
std::string chrNameLink = GetNameLink(chr);
if(chr->IsTaxiFlying())
{
PSendSysMessage(LANG_CHAR_IN_FLIGHT,chrNameLink.c_str());
SetSentErrorMessage(true);
return false;
}
PSendSysMessage(LANG_YOU_CHANGE_ASPEED, modSpeed, chrNameLink.c_str());
if (needReportToTarget(chr))
ChatHandler(chr).PSendSysMessage(LANG_YOURS_ASPEED_CHANGED, GetNameLink().c_str(), modSpeed);
chr->UpdateSpeed(MOVE_WALK, true, modSpeed);
chr->UpdateSpeed(MOVE_RUN, true, modSpeed);
chr->UpdateSpeed(MOVE_SWIM, true, modSpeed);
//chr->UpdateSpeed(MOVE_TURN, true, modSpeed);
chr->UpdateSpeed(MOVE_FLIGHT, true, modSpeed);
return true;
}
Thank you alot! Now, if u can say me where is the src/game/Level1.cpp im going to love you! xD, i know that time ago but now i don't renemba =/