 |
|
Senior Member
Join Date: Feb 2019
Location: Hungary
|

10-22-2020
, 14:45
Re: Add milliseconds
|
#10
|
Quote:
Originally Posted by r0ma
try to adapt to your code:
PHP Code:
#include <amxmodx>
new Float:flTime;
public plugin_init() {
flTime = 15.0; // seconds
set_task(0.1, "taskFunc", _, _, _, "a", floatround(flTime)*10);
}
public taskFunc() {
flTime -= 0.1;
set_hudmessage(random(250), random(250), random(250), -1.0, -1.0, 0, 0.05, 0.05, 0.05, 0.05);
show_hudmessage(0, "Seconds: %0.1f", flTime);
if(flTime < 0.1) {
// task end
}
}
|
Im so bad at this that it showed me errors on console but compiled without errors
|
|
|
|