nick change help
#5

Quote:
Originally Posted by Ihsan-Cingisiz
Посмотреть сообщение
Oh okay hmm.. Try this:
pawn Код:
dcmd_nick(playerid, params[])
{
    new file[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), "%s.ini", name);
   
    if(strlen(params) < 4)
    {
        SendClientMessage(playerid,RED,"4 letters not more..");
        return 1;
    }
    else
    {
        SetPlayerName(playerid, params);
        SendClientMessage(playerid,0xFFFFFFFF,"** You've changed your nick **");
        new name2[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name2, sizeof(name2));
        dini_IntSet(file, "PlayerName", name2);
    }
    return 1;
}
I don't exactly know the dini_IntSet, it can be dini_Set or something because it's a
variable with character, maybe someone else can correct that.. Anyways, this was
all what i can do for you. I hope you will get enough help to solve your problem.
Reply


Messages In This Thread
nick change help - by jaksimaksi - 28.01.2011, 16:40
Re: nick change help - by Ihsan-Cingisiz - 28.01.2011, 17:38
Re: nick change help - by jaksimaksi - 28.01.2011, 19:52
Re: nick change help - by Ihsan-Cingisiz - 28.01.2011, 19:57
Re: nick change help - by Ihsan-Cingisiz - 28.01.2011, 20:02
Re: nick change help - by jaksimaksi - 28.01.2011, 20:22
Re: nick change help - by Ihsan-Cingisiz - 28.01.2011, 20:41
Re: nick change help - by iMonk3y - 28.01.2011, 21:11
Re: nick change help - by jaksimaksi - 29.01.2011, 06:23
Re: nick change help - by jaksimaksi - 29.01.2011, 15:39

Forum Jump:


Users browsing this thread: 1 Guest(s)