/changename Cmd
#1

How can i make that Player can change his Name with /changename or /changenick?
Reply
#2

Yes, with DINI in "scriptfiles" in a .txt
Reply
#3

<The content in this post has been removed.>
Reply
#4

error 017: undefined symbol "pName"
error 017: undefined symbol "frename"

@West X Then i have this 2 Errors.
Reply
#5

Hi

pawn Код:
stock frename(oldname[], newname[])
{
    if(!fexist(oldname)) return false;
    new string[128], File:old, File:neww;
    old = fopen(oldname, io_read);
    neww = fopen(newname, io_write);
    while(fread(old, string))
    {
        StripNewLine(string);
        format(string, sizeof(string), "%s\r\n", string);
        fwrite(neww, string);
    }
    fclose(old);
    fclose(neww);
    fremove(oldname);
    return true;
}
pawn Код:
stock pName(playerid)
{
    new paname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, paname, sizeof(paname));
    return paname;
}
Reply
#6

yes thx, but i save it not in files i save it with dini in "scriptfiles" in a .txt file.
Reply
#7

Updated my post above with the source code.
Reply
#8

error 017: undefined symbol "pName"
error 017: undefined symbol "frename"

Then i have too this 2 errors.
Reply
#9

You will need to include the two stock functions re-posted by '.v' above.
Reply
#10

Ops, okay thx then i have only this 1 Error:

error 017: undefined symbol "StripNewLine"
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)