06.11.2006, 10:22
use udb_encode(playername) from dracoblues DUDB[INC], also to increase compatibility with other modes like freeroam add a stats- to the start of every player name, i suggest adding it into the udb_encode function, im currently working on something like this for my stats script, heres my edited udb_encode function
pawn Код:
public udb_encode(nickname[]) {
new tmp[MAX_STRING];
new str[MAX_STRING];
set(tmp,nickname);
tmp=strreplace("_"," 00",tmp);
tmp=strreplace(";"," 01",tmp);
tmp=strreplace("!"," 02",tmp);
tmp=strreplace("/"," 03",tmp);
tmp=strreplace("\\"," 04",tmp);
tmp=strreplace("["," 05",tmp);
tmp=strreplace("]"," 06",tmp);
tmp=strreplace("?"," 07",tmp);
tmp=strreplace("."," 08",tmp);
tmp=strreplace("*"," 09",tmp);
tmp=strreplace("<"," 10",tmp);
tmp=strreplace(">"," 11",tmp);
tmp=strreplace("{"," 12",tmp);
tmp=strreplace("}"," 13",tmp);
format(str,sizeof(str),"stats-%s",tmp);
return str;
}