Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if (command.length() == 4 && command.compare(0,4,"warp") == 0)
- {
- std::string loc = arguments[0];
- if (this->player->character->mapid == static_cast<int>(this->server->world->config["JailMap"]))
- {
- break;
- }
- if(static_cast<int>(this->server->world->warps_config[loc + ".map"]) > 0)
- {
- int Map = static_cast<int>(this->server->world->warps_config[loc + ".map"]);
- int X = static_cast<int>(this->server->world->warps_config[loc + ".x"]);
- int Y = static_cast<int>(this->server->world->warps_config[loc + ".y"]);
- if(X > 0 && Y > 0)
- {
- if(static_cast<std::string>(this->server->world->warps_config["WarpsAnimation"]) == "none")
- {
- this->player->character->Warp(Map, X, Y, WARP_ANIMATION_NONE);
- }
- else
- {
- this->player->character->Warp(Map, X, Y, WARP_ANIMATION_ADMIN);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment