sbk_
New member
Well, I was developing script for a Brazilian community, I came across a way not to find an appropriate command to get the name of the player in a fast and effective.
This method would be the id of the character, I made a simple formula that may be usable to be implemented in the project.
would be:
Thus do not need a sql query or something to get a simple name of a character.
Well, this is my suggestion.
Sorry google translator.
This method would be the id of the character, I made a simple formula that may be usable to be implemented in the project.
would be:
Code:
BUILDIN(getcharname) { TBL_PC *sd = NULL; int char_id = script_getnum(st, 2); sd = map->charid2sd(char_id); if( sd == NULL ) script_pushint(st, 0); else script_pushstrcopy(st, sd->status.name); return true;}
Well, this is my suggestion.
Sorry google translator.
Last edited by a moderator: