Scripting help
#3

It's y_ini and here is the code :
Код:
			new hashpass[129], date[20], year, month, day, str[200];
			new    random_color = ( 16777216 * random( 256 ) ) + ( 65536 * random( 256 ) ) + ( 256 * random( 256 ) ) + 255;
			WP_Hash(hashpass, sizeof(hashpass), inputtext);
 			getdate(year, month, day);
			format(date, sizeof(date), "%d/%d/%d", day, month, year);
			new INI:File = INI_Open(UserPath(playerid));
			INI_SetTag(File, "Player's Data");
			INI_WriteString(File, "Password", hashpass);
			INI_WriteString(File, "Registered_On", date);
		 	INI_WriteInt(File,"Admin", 0);
            INI_WriteInt(File,"VIP", 0);
            INI_WriteInt(File,"Cash", 0);
            INI_WriteInt(File,"Score", 0);
            INI_WriteInt(File,"Kills", 0);
            INI_WriteInt(File,"Deaths", 0);
            INI_WriteInt(File, "Hours", 0);
			INI_WriteInt(File, "Minutes", 0);
            INI_Close(File);
            gTotalRegisters++;
            GivePlayerMoney(playerid, 100000);
            PlayerInfo[playerid][Hours] = 0;
            PlayerInfo[playerid][Minutes] = 0;
            PlayerInfo[playerid][POS_X] = -2355.9038;
            PlayerInfo[playerid][POS_Y] = -1635.4912;
            PlayerInfo[playerid][POS_Z] = 483.7031;
            PlayerInfo[playerid][Helmet] = 1;
            SendClientMessage(playerid, COLOR_PINK, ""PREMIUM"*** "LIGHTBLUE"Thank you for registering your account!");
            PlayerInfo[playerid][RegOn] = date;
            SpawnPlayer(playerid);
 		 	format(str, sizeof(str), ""RED"[EsF] {%06x}%s(%d) {2BD9F8}has registered, making the server have total {008FFB}%d {2BD9F8}players registered.", random_color >>> 8, GetName(playerid), playerid, gTotalRegisters);
 		 	SetPlayerColor(playerid, random_color);
            SendClientMessageToAll(0x2BD9F8FF, str);
           	new INI:FILE_SERVER_STATS = INI_Open(ServerStats);
           	INI_SetTag(FILE_SERVER_STATS, "Server_Statistics");
			INI_WriteInt(FILE_SERVER_STATS, "Total_Registered_Users", gTotalRegisters);
 			INI_Close(FILE_SERVER_STATS);
            PlayerInfo[playerid][Spawned] = 1;
            PlayerInfo[playerid][LoggedIn] = 1;
            TD_MSG(playerid, 3000, "~b~~h~You have successfully registered!~w~~b~~h~~n~~b~~h~$100000 bonus for registering!");
			new regInfo[300];
			format(regInfo, sizeof(regInfo), ""YELLOW"Hello!\n\n"GREEN"» Your nick: "YELLOW"%s\n"GREEN"\n"GREEN"» Your password: "YELLOW"%s\n\n"LIGHTGREEN"Never share your password with anyone!\nYou'll need it for logging next time.", GetName(playerid), inputtext);
 		 	ShowPlayerDialog(playerid, DIALOG_CONFIRM_REGISTER, DIALOG_STYLE_MSGBOX, ""RED"Register Info", regInfo, "OK", "");
            return 1;
Reply


Messages In This Thread
Scripting help - by kirostar - 29.06.2014, 02:52
Re: Scripting help - by KillerStrike23 - 29.06.2014, 02:55
Re: Scripting help - by kirostar - 29.06.2014, 02:56
Re: Scripting help - by Laurey - 29.06.2014, 03:29
Re: Scripting help - by kirostar - 29.06.2014, 03:53
Re: Scripting help - by Laurey - 29.06.2014, 04:06
Re: Scripting help - by kirostar - 29.06.2014, 04:08
Re: Scripting help - by kirostar - 29.06.2014, 04:35
Re: Scripting help - by Rittik - 29.06.2014, 05:18
Re: Scripting help - by kirostar - 29.06.2014, 05:43

Forum Jump:


Users browsing this thread: 1 Guest(s)