Raised This Month: $ Target: $400
 0% 

Add milliseconds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
r0ma
Senior Member
Join Date: Apr 2012
Location: Great Tomb of Nazarick
Old 10-22-2020 , 11:22   Re: Add milliseconds
Reply With Quote #9

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
    
}

__________________
Discord:FluffyDeveloper#4753
Github: https://github.com/francoromaniello
AMX-ES: https://amxmodx-es.com/r0ma'
r0ma is offline
Send a message via MSN to r0ma
 



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