AlliedModders

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

Veggetta 07-07-2012 20:43

Time BAR
 
Hello everybody!

Today my question is, how do do a timebar like when defusing, in this code:

PHP Code:

public blabla(id)
    
set_task(15.0"TimeBar"id);

// From the set_task to TimeBar, what do i do to show a timebar on the screen, like defusing?
public TimeBar(id)
    
set_user_health(id100); 


Y060N 07-07-2012 21:07

Re: Time BAR
 
PHP Code:

new g_iBarTime

public plugin_init()
{
    
g_iBarTime get_user_msgid("BarTime"
}

public 
blabla(id)
{
    
set_task(15.0"TimeBar"id);
    
Make_BarTime(id15)
}

Make_BarTime(idiSeconds

    
message_begin(MSG_ONE_UNRELIABLEg_iBarTime, .player=id)
    
write_short(iSeconds)
    
message_end()
}

public 
TimeBar(id)
    
set_user_health(id100); 


Veggetta 07-07-2012 21:09

Re: Time BAR
 
Quote:

Originally Posted by Y060N (Post 1745719)
PHP Code:

new g_iBarTime

public plugin_init()
{
    
g_iBarTime get_user_msgid("BarTime"
}

public 
blabla(id)
{
    
set_task(15.0"TimeBar"id);
    
Make_BarTime(id15)
}

Make_BarTime(idiSeconds

    
message_begin(MSG_ONE_UNRELIABLEg_iBarTime, .player=id)
    
write_short(iSeconds)
    
message_end()
}

public 
TimeBar(id)
    
set_user_health(id100); 


Thank you, i give it a try :D


All times are GMT -4. The time now is 15:12.

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