Page 1 of 1
pranesamas laikas iki tam tikro momento
Posted: 2013 Mar 27 11:33
by Spag
kaip pavyzdžiui iškviesti hud žinutę kai iki round pabaigos lieka 15s.?
Praneša tau kad liko 15 sekundžių iki round pabaios ir po 15 sekundžų pasibaigia round.
kas galit padėt? nes nesugalvoju kaip tai padaryti...
man reikia tik tos vietos kuri patikrina ar liko 15 s iki round pabaigos...
Re: pranesamas laikas iki tam tikro momento
Posted: 2013 Mar 27 12:47
by aaarnas
Code: Select all
/* Plugin generated by AMXX-Studio */ #include <amxmodx>#include <amxmisc> #define PLUGIN "Round timeleft"#define VERSION "1.0"#define AUTHOR "aaarnas" new bool:round_started public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent("logevent_round_start",2, "1=Round_Start") register_event("RoundTime", "message_roundtime", "b")} public logevent_round_start() { round_started = true}public message_roundtime(id) { if (!round_started) // Jei nori, kad rodytu tik prasidejus raundui. return; round_started = false new round_time = read_data(1)-15 if (round_time > 0) { if (task_exists(999)) change_task(999, float(round_time)-0.5) else set_task(float(round_time)-0.5, "time_left", 999) }} public time_left() { client_print(0, print_chat, "Liko 15 sekundziu")}
Re: pranesamas laikas iki tam tikro momento
Posted: 2013 Mar 27 15:50
by Spag
aaarnas wrote:Code: Select all
/* Plugin generated by AMXX-Studio */ #include <amxmodx>#include <amxmisc> #define PLUGIN "Round timeleft"#define VERSION "1.0"#define AUTHOR "aaarnas" new bool:round_started public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent("logevent_round_start",2, "1=Round_Start") register_event("RoundTime", "message_roundtime", "b")} public logevent_round_start() { round_started = true}public message_roundtime(id) { if (!round_started) // Jei nori, kad rodytu tik prasidejus raundui. return; round_started = false new round_time = read_data(1)-15 if (round_time > 0) { if (task_exists(999)) change_task(999, float(round_time)-0.5) else set_task(float(round_time)-0.5, "time_left", 999) }} public time_left() { client_print(0, print_chat, "Liko 15 sekundziu")}
dėkui va šito ir reikėjo
