#include <amxmodx>
new PL[] = "Date and Time"
new VE[] = "0.2"
new AU[] = "SnOp[1]K"
public plugin_init()
register_plugin(PL, VE, AU)
public client_putinserver(id) {
- set_task(1.0, "DateAndTime", id, _, _, "b")
+ set_task(1.0, "DateAndTime", id, .flags="b")
}
public client_disconnected(id) {
remove_task(id)
}
public DateAndTime(id) {
new time[64], date[64]
- get_time("%H:%M:%S", time, 63)
- get_time("%d.%m.%Y", date, 63)
+ get_time("%H:%M:%S", time, charsmax(time))
+ get_time("%d.%m.%Y", date, charsmax(date))
set_hudmessage(10, 255, 255, -1.0, 0.10, 0, 6.0, 1.0)
show_hudmessage(id, "Время: %s^nДата: %s", time, date)
- return PLUGIN_CONTINUE
}