[Help] ZCMD commands...
#6

This is my whole code...
Код:
 COMMAND:register(playerid, params[])
    {
      new file[128], pname[MAX_PLAYER_NAME];
      GetPlayerName(playerid, pname, sizeof(pname));
      format(file, sizeof(file), "S_Files", pname);
      if(!strlen(params)) return SendClientMessage(playerid, COLOR_RED, "[SYSTEM]: /register [password]");
      if(dini_Exists(file)) return SendClientMessage(playerid, COLOR_RED, "[SYSTEM]: You are already registered!");
      dini_Create(file);
      dini_IntSet(file, "hashPW", udb_hash(params));
      dini_Set(file, "password", params);
      dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][AdminLevel] = 0);
      dini_IntSet(file, "score", PlayerInfo[playerid][score] = 0);
      dini_IntSet(file, "money", PlayerInfo[playerid][cash] = 500);
      new string[128];
      format(string, 128, "[SYSTEM]: You succesfully registered the nickname %s with password %s", pname, params);
      SendClientMessage(playerid, COLOR_YELLOW, string);
      logged[playerid] = 1;
      SendClientMessage(playerid, COLOR_YELLOW, "[SYSTEM]: You have been automatically logged in!");
      return 1;
    }
I have return and all.... :S
Reply


Messages In This Thread
[Help] ZCMD commands... - by Alex_Valde - 23.09.2010, 08:51
Re: [Help] ZCMD commands... - by LarzI - 23.09.2010, 08:52
Re: [Help] ZCMD commands... - by Alex_Valde - 23.09.2010, 08:57
Re: [Help] ZCMD commands... - by Retardedwolf - 23.09.2010, 08:59
Re: [Help] ZCMD commands... - by PixeledNinja - 23.09.2010, 09:02
Re: [Help] ZCMD commands... - by Alex_Valde - 23.09.2010, 09:03
Re: [Help] ZCMD commands... - by LarzI - 23.09.2010, 09:04
Re: [Help] ZCMD commands... - by Alex_Valde - 23.09.2010, 09:06

Forum Jump:


Users browsing this thread: 3 Guest(s)