SA-MP Forums Archive
/changename - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /changename (/showthread.php?tid=144981)



/changename - geerdinho8 - 30.04.2010

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!!


Re: /changename - geerdinho8 - 30.04.2010

BUMP


Re: /changename - Onyx09 - 30.04.2010

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


Re: /changename - playbox12 - 30.04.2010

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;

    }



Re: /changename - Onyx09 - 30.04.2010

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


Re: /changename - geerdinho8 - 30.04.2010

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


Re: /changename - playbox12 - 30.04.2010

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.


Re: /changename - geerdinho8 - 30.04.2010

Help please!!


Re: /changename - Jefff - 30.04.2010

Search frename !