Login command
#1

I want to create login command (/register created, thanks for helping), i take a look at some login commands, and i made a part of command, because I understood this part, but other didn't. Here is what i made:

pawn Код:
dcmd_login(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
    new string[256], ip[24];
    new pname[MAX_PLAYER_NAME];
        if(Logged[playerid])
        {
            SendClientMessage(playerid, COLOR_RED, "Tu jau prisijunges noob, ziurek ka darai");
            return 1;
        }
        if(!strlen(params))
        {
            SendClientMessage(playerid, COLOR_RED, "Neyvedei passwordo, tu gal durnas?");
            return 1;
        }
        new pass2 = strval(params);
        pass2 = pass1;
        GetPlayerName(playerid, pname, sizeof (pname));
      format(string, sizeof(string), "/Vartotojai/%s.acc", pname);
      new File:file = fopen(str, io_write);
      if(file)
      {
      new pass2 = strval(params);
        if(pass2 == pass1)
        {
                while(fread(file, string, sizeof(string))
                {
What i should do next?

I am trying to not use other includes, or functions (except dcmd, because its easier and more understandable for me). And sorry for my English, I know, its bad Big smile
Reply
#2

Check this out
http://forum.sa-mp.com/index.php?topic=69810.0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)