/changename
#1

Hi, i made a /changename command but if you use it, it renames the userfiles thats good but it deletes the password of the userfile so you cant login. And you can even change your name to used names.. Please help

Script:
http://pastebin.com/2et7BMPa

HELP PLEASE!!
HELP PLEASE!!
HELP PLEASE!!
Reply
#2

BUMP
Reply
#3

put the command code here im to lazy to look throght all the script
Reply
#4

Quote:
Originally Posted by Onyx
put the command code here im to lazy to look throght all the script
Too bad I suck at dini Onix here is the code
Код:
   if ( !strcmp ( cmd, "/changename", true ) )

    {

        tmp = strtok(cmdtext, idx);

        new string3[256];

       if(logged[playerid] == 0)

        {

            SendClientMessage(playerid, COLOR_RED, "SERVER: You Are Not Logged In");

            return 1;

        }

        if(!strlen(tmp))

        {

            SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /changename [newname]");

            return 1;

        }

        if (!dini_Exists(playername))

        {

        SendClientMessage(playerid, COLOR_RED, "This name is already in use");

        }

        else

        {

        format(string3, sizeof(string3),"%s has changed he's name to %s.", playername,tmp);

        SendClientMessageToAll(COLOR_YELLOW, string3);

        dini_Remove(udb_encode(playername));

        SetPlayerName(playerid, tmp);

        GetPlayerName(playerid, playername, sizeof(playername));

        dini_Create(udb_encode(playername));

        }

        return 1;

    }
Reply
#5

you are deleting the old file and making a new one with a name so this wont be a rename is more like account generator without password lol
Reply
#6

Quote:
Originally Posted by C PlusPlus
you are deleting the old file and making a new one with a name so this wont be a rename is more like account generator without password lol
how to fix?

Quote:

I have now tryed to make a variable of the password but i get this errors:
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(73) : error 035: argument type mismatch (argument 3)
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(171) : error 033: array must be indexed (variable "password")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Script:
http://pastebin.com/u8v80m96
Reply
#7

Quote:
Originally Posted by C PlusPlus
you are deleting the old file and making a new one with a name so this wont be a rename is more like account generator without password lol
Thats what I thought.
Reply
#8

Help please!!
Reply
#9

Search frename !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)