SA-MP Forums Archive
[HELP] Time in server - 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)
+--- Thread: [HELP] Time in server (/showthread.php?tid=339698)



[HELP] Time in server - V4at - 04.05.2012

I want to do to save time for each player in dini file, but do not know how.

Код:
new
	Praleista[ MAX_PLAYERS ]
;

public OnPlayerConnect(playerid)
{
SetTimerEx( "PraleistaServeryje", 60000, true, "i", playerid );
return 1;
}

forward PraleistaServerje( playerid );
public PraleistaServerje( playerid )
{
	Praleista[ playerid ] ++;
}

if (strcmp("/Prisijunges", cmdtext, true, 10) == 0) 
{
	new
		laikas = Praleista[ playerid ],
		valandos
	;
	while ( laikas >= 60 )
	{
		valandos++;
		laikas -= 60;
	}
	new
		str[ 32 ]
	;
	format( str, sizeof ( str ), "Serveryje praleidai %i valandas, %i minutes", valandos, laikas );
	ShowPlayerDialog( playerid, 0, DIALOG_STYLE_MSGBOX, "Laikas:", str, "Gerai", "" );
	return 1;
}



Re : [HELP] Time in server - V4at - 05.05.2012

How me to save each time of player in dini, help me please, I will give +rep