Raised This Month: $ Target: $400
 0% 

timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SAMURAI16
BANNED
Join Date: Sep 2006
Old 03-13-2007 , 13:36   Re: timer
Reply With Quote #1

something like this:
PHP Code:
#include <amxmodx>

new pfloat

public plugin_init() {
    
register_plugin("","","");
    
    
pfloat register_cvar("your_cvar","5.0")
}

public 
func(id)
{
    
set_task(get_pcvar_float(pfloat),"newfunc",id)
}

public 
newfunc(id)
{
    new 
Float:timer get_pcvar_float(pfloat);
    
    
set_hudmessage(255000.250.2906.012.0)    
    
show_hudmessage(id"timer left %d",timer)
    --
timer

SAMURAI16 is offline
Send a message via MSN to SAMURAI16
whOp
Junior Member
Join Date: Sep 2006
Old 03-14-2007 , 17:42   Re: timer
Reply With Quote #2

Quote:
Originally Posted by SAMURAI16 View Post
something like this:
PHP Code:
#include <amxmodx>
 
new pfloat
 
public plugin_init() {
    
register_plugin("","","");
 
    
pfloat register_cvar("your_cvar","5.0")
}
 
public 
func(id)
{
    
set_task(get_pcvar_float(pfloat),"newfunc",id)
}
 
public 
newfunc(id)
{
    new 
Float:timer get_pcvar_float(pfloat);
 
    
set_hudmessage(255000.250.2906.012.0)    
    
show_hudmessage(id"timer left %d",timer)
    --
timer

There should be better way right?
__________________
whOp is offline
Old 03-16-2007, 17:17
Peoples Army
This message has been deleted by Peoples Army.
Peoples Army
SourceMod Donor
Join Date: Mar 2007
Old 03-16-2007 , 17:20   Re: timer
Reply With Quote #4

Code:
#include <amxmodx>
 
new Float:  pfloat 5.0;
 
public plugin_init() 
{
  register_plugin("","","");
  set_task(5.0,"newfunc",0,"",0,"b",5);
}
public newfunc()
{
set_hudmessage(255, 0, 0, 0.25, 0.29, 0, 6.0, 12.0);    
show_hudmessage(0, "timer left %d",timer)
  --timer;
}  
Peoples Army is offline
Reply



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 00:35.


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