AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   timer (https://forums.alliedmods.net/showthread.php?t=50688)

whOp 02-01-2007 09:33

timer
 
how to script timer?

(0:05) - (0:00) to left down corner
in hud_message and whit sounds "5,4,3,2,1"

whOp 03-12-2007 17:49

Re: timer
 
*bump* I really need this this isnt so hard ?

watch 03-12-2007 20:19

Re: timer
 
http://forums.alliedmods.net/showthread.php?t=43049

http://www.amxmodx.org/funcwiki.php?...task&go=search

You should probably try search or look at existing plugins that do something similar to what you are looking for. Its a good way to learn

SAMURAI16 03-13-2007 13:36

Re: timer
 
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



whOp 03-14-2007 17:42

Re: timer
 
Quote:

Originally Posted by SAMURAI16 (Post 452042)
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?

Peoples Army 03-16-2007 17:20

Re: timer
 
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;



All times are GMT -4. The time now is 00:35.

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