Raised This Month: $51 Target: $400
 12% 

[Req] hud at 1.30 roundtime


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 12-19-2007 , 16:48   [Req] hud at 1.30 roundtime
Reply With Quote #1

Hi everybody...

It's possible make a plug when the roundtime is on 1.30 show a hudmessage in the center of the screen ?

srry 4 my english...
bye ;)
__________________
IneedHelp is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 12-20-2007 , 03:58   Re: [Req] hud at 1.30 roundtime
Reply With Quote #2

Try this:

Code:
#include <amxmodx>
#include <amxmisc>
 
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Alka"
 
#define TASK_COUNTER_ID 1337
 
new bool:gRoundStarted;
new gRoundTime;
 
public plugin_init() {
 
 register_plugin(PLUGIN, VERSION, AUTHOR);
 
 register_logevent("LogeventRoundStart", 2, "1=Round_Start");
 register_message(get_user_msgid("RoundTime"), "MessageRoundTime");
 
}
 
public LogeventRoundStart()
 gRoundStarted = true;
 
public MessageRoundTime()
{
 if(gRoundStarted)
  gRoundStarted = false;
 else
  return;
 
 gRoundTime = get_msg_arg_int(1);
 
 if(task_exists(TASK_COUNTER_ID))
  remove_task(TASK_COUNTER_ID);
 
 if(gRoundTime < 90) //If the round time is less than 1min and 30sec
  return;     //cancel the timer.
 
 set_task(1.0, "TimeCounter", TASK_COUNTER_ID, "", 0, "b", 0);
}
 
public TimeCounter()
{
 gRoundTime--;
 
 static Seconds, Minutes;
 
 Minutes = gRoundTime / 60;
 Seconds = gRoundTime % 60;
 
 if((Minutes == 1) && (Seconds == 31)) //Postponement fix.
 {
  set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 5.0, 1.0, 1.0, -1);
  show_hudmessage(0, "Some message!...");
 }
}
I've tested it and works fine. ;)
*Updated*
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 12-20-2007 at 06:10.
Alka is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 12-20-2007 , 09:15   Re: [Req] hud at 1.30 roundtime
Reply With Quote #3

thanks very much alka ! works fine +karma ..

byee
__________________
IneedHelp 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 04:28.


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