Loading Problem
#1

I know it's outdated but still, i'm the beginner so i wan't to do step by step.

Somehow, the correct registration date does not load/show up. Sometimes it's shows n/a or any random date.

It should show the date when we registered. If any code needed i'll show.

It's a lux admin which i use for cops and robbers. +REP if helped

Код:
dcmd_stats(playerid,params[])
{
	new string[150], 
       pDeaths, player1, 
        h, m, s, RegDate[256], file[256];

	if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
	{
	    format(file,sizeof(file),"/LuxAdmin/Users/%s.sav",udb_encode(PlayerName2(player1)));
	    
		if(!strlen(params)) player1 = playerid;
		else player1 = strval(params);

		if(strlen(dini_Get(file,"RegisteredDate")) < 3)
		RegDate = "n/a";
		else RegDate = dini_Get(file,"RegisteredDate");
 	
    	TotalGameTime(player1, h, m, s);
		if(AccInfo[player1][Deaths] == 0) pDeaths = 1;
		else pDeaths = AccInfo[player1][Deaths];
		format(string, sizeof(string), "|- %s's Statistics -|",PlayerName2(player1));
		SendClientMessage(playerid, green, string);
		format(string, sizeof(string), "Kills: [%d] | Deaths: [%d] | Ratio: [%0.2f] | Money: [$%d] | Registration Date: %s | Time: [%d] hrs [%d] mins [%d] secs |", AccInfo[player1][Kills], AccInfo[player1][Deaths], Float:AccInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1), RegDate, h, m, s);
		return SendClientMessage(playerid, green, string);
		
	} else
	return SendClientMessage(playerid, red, "ERROR: Player Not Connected!");
}
Reply
#2

Bump
Reply
#3

luxadmin worked for me when i used to use it, if you extracted just that it obviously will not work as you need the file saving functions & the register/login commands, and don't bump your thread in no longer than 24 hours read the forum rules.
Reply
#4

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
luxadmin worked for me when i used to use it, if you extracted just that it obviously will not work as you need the file saving functions & the register/login commands, and don't bump your thread in no longer than 24 hours read the forum rules.
There is everyting, file saving cun and reg/log command. But how to do that. :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)