Raised This Month: $ Target: $400
 0% 

Add milliseconds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 10-22-2020 , 14:45   Re: Add milliseconds
Reply With Quote #10

Quote:
Originally Posted by r0ma View Post
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.000.050.050.050.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
HowToRuski is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode