HElp please
#1

Hey guys. I want that my fname switches to the player's name when he types /fname
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;
}
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
Reply
#2

Well, you need the "faction1" folder. And in this "faction1" folder you need the Player's user file.

Create the Folder, and put the file: Hoi.txt (Your name).

and the line make to:
pawn Код:
format(str1, sizeof(str1), "factions/faction1/%s.txt", udb_encode(pname));
Try it out.
Reply
#3

Couuld you please help me on teamviewer? I really can't come out
Reply
#4

I got no time anymore.

Have xFire? Add me there (mmjeffrymm). I'm back online tomorrow evening.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)