Here is my warp commands, !warp, !warpto, !mwarpto
-----
!warp = Warps players to the selected mapid
for example:
It will warp coNsept to henesys
-----
!warpto = Warps yourself to the selected player
for example:
It will warp me to coNsept... I need to check how to change the pos..
-----
!mwarpto = Warps the selected player to you
for example:
It will warp coNsept to me.
-----
To add it you will need to add the codes to the chathandle function... before the
here is the codes:
Made by me, coNsept
-----
!warp = Warps players to the selected mapid
Code:
!warp <Name> <MapID>
Code:
!warp coNsept 100000000
It will warp coNsept to henesys
-----
!warpto = Warps yourself to the selected player
Code:
!warpto <Name>
for example:
Code:
!warpto coNsept
It will warp me to coNsept... I need to check how to change the pos..
-----
!mwarpto = Warps the selected player to you
Code:
!mwarpto <Name>
for example:
Code:
!mwarpto coNsept
It will warp coNsept to me.
-----
To add it you will need to add the codes to the chathandle function... before the
Code:
return;
here is the codes:
Code:
// Made by coNsept
else if(strcmp(command, "warp") == 0){
char *name = strtok_s(NULL, " ",&next_token);
if (strlen(name) > 0)
for (hash_map <int, Player*>::iterator iter = Players::players.begin(); iter != Players::players.end(); iter++)
if (strcmp(iter->second->getName(), name) == 0)
if(strlen(next_token) > 0)
{
int mapid = strval(strtok_s(NULL, " ",&next_token));
if(Maps::info.find(mapid) != Maps::info.end())
Maps::changeMap(iter->second ,mapid, 0);
}
}
else if(strcmp(command, "warpto") == 0){
char *name = strtok_s(NULL, " ",&next_token);
if (strlen(name) > 0)
for (hash_map <int, Player*>::iterator iter = Players::players.begin(); iter != Players::players.end(); iter++)
if (strcmp(iter->second->getName(), name) == 0)
Maps::changeMap(player , iter->second->getMap(), iter->second->getMappos());
}
else if(strcmp(command, "mwarpto") == 0){
char *name = strtok_s(NULL, " ",&next_token);
if (strlen(name) > 0)
for (hash_map <int, Player*>::iterator iter = Players::players.begin(); iter != Players::players.end(); iter++)
if (strcmp(iter->second->getName(), name) == 0)
Maps::changeMap(iter->second , player->getMap(), player->getMappos());
}
Made by me, coNsept