27.08.2010, 15:33
Hey guys. I want that my fname switches to the player's name when he types /fname
I have this:
enum faction
{
fname[50]
};
But when I use the command and I look in the faction1 file. The name isn't changed 
I never worked with things like this. I really want to know this.

Thanks in advance
I have this:
enum faction
{
fname[50]
};
pawn Код:
dcmd_fname(playerid,params[])
{
#pragma unused params
new pname[24];
new str1[256];
GetPlayerName(playerid, pname, 24);
format(str1, sizeof(str1), "factions/faction1/%s", udb_encode(pname));
dini_Set(str1, "fname",pname);
return 1;
}

I never worked with things like this. I really want to know this.

Thanks in advance