PHP Kod:
public DosyayaYaz() {
new iFile = fopen(szFileName, "a+");
if(iFile) {
new CurrentDay[16];
get_time("%d %m %Y",CurrentDay,15);
fprintf(iFile, "^"%s^"^n", CurrentDay);
fclose(iFile);
}
}
)

public DosyayaYaz() {
new iFile = fopen(szFileName, "a+");
if(iFile) {
new CurrentDay[16];
get_time("%d %m %Y",CurrentDay,15);
fprintf(iFile, "^"%s^"^n", CurrentDay);
fclose(iFile);
}
}
(07-03-2024, 23:36)Lynchk Adlı Kullanıcıdan Alıntı: https://www.webailesi.com/konu-zaman-kutuphanesi-7890
#if defined new_time
#endinput
#endif
#define new_time
#define Time_Minute 0
#define Time_Hour 1
#define Time_Day 2
#define Time_Month 3
#define Time_Year 4
native get_dynamic_time( TIME_KIND )
native get_dynamic_time_future( How_long_next_time , TIME_KIND , NEXT_TIME_KIND )
#include <amxmodx>
public plugin_init()
{
register_srvcmd("output_date", "ServerCommand_OutputDate")
}
public ServerCommand_OutputDate()
{
new CurrentDate[11], FinalDate[11]
get_time("%d.%m.%Y", CurrentDate, charsmax(CurrentDate))
AddToDate(CurrentDate, 5, FinalDate, charsmax(FinalDate))
server_print("CurrentDate: %s | NewDate: %s", CurrentDate, FinalDate)
}
AddToDate(const OriginalDate[], const DaysToAdd, FinalDate[], const Size)
{
new const FormatRule[] = "%d.%m.%Y"
new const SecondsInDay = 86400
new CurrentTimeStamp = parse_time(OriginalDate, FormatRule)
CurrentTimeStamp = CurrentTimeStamp + DaysToAdd * SecondsInDay
format_time(FinalDate, Size, FormatRule, CurrentTimeStamp)
}