Jump to content

Custom Command And Table


Guest swordman_306

Recommended Posts

hi there i was bored and decides to make a tele command that could b used by all players but the locations for the command could only be used by some picked players. like having a private area ingame for just some players and another private area for some others.

so what i did was i got the tele command and also make a copy of the tele table in the database and in the table i added some more coloumns for the account id's of the players who are allowed to goto that location. only thing is i got it to compile fully and the server starts but when i use the command even if the account id of the character im on is not in the list of allowed ones it still allows me to teleport to the place.

right now in the table i have set the columns for the account id's to bigint 20 which is the same as id in realmd.account and the code im using to check is the following bits

int64 account_1 = fields[5].GetUInt64(); //after getting result from database
int64 playersid = _player->GetOwnerGUID(); //gets account id of character

if (playersid != account_1)
{
               return false;
}

can someone please tell me why this isn't working and also i dont no if GetOwnerGUID() is the correct thing to use to get the account id of the character.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use