AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hud message in the date (https://forums.alliedmods.net/showthread.php?t=135992)

Dimanok 08-21-2010 15:03

Hud message in the date
 
Hello! Prompt please how to do that by setting the date, this day gotten all the players when they join the server any HUD message.
If it can be an example. Thank you

nikhilgupta345 08-21-2010 18:43

Re: Hud message in the date
 
first, you would declare an array date[9]
then, use get_time

then, set_hudmessage
then, show_hudmessage with %s, date in teh message.

SpeeDeeR 08-22-2010 08:34

Re: Hud message in the date
 
Quote:

Originally Posted by nikhilgupta345 (Post 1278181)
first, you would declare an array date[9]
then, use get_time

then, set_hudmessage
then, show_hudmessage with %s, date in teh message.

Very very discriptive! Good work :down:

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Date in HUD"
#define VERSION "1.0"
#define AUTHOR "SpeeD"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add your code here...
}

public 
client_putinserver(id)
{
    
set_task(8.0,"HudDate",id)
}

public 
HudDate(id)
{
    new 
cdate[9]
    
get_time("%d/%m/%Y",cdate,8)
    
set_hudmessage(002550.300.1406.012.0)
    
show_hudmessage(id"Current date is %s",cdate)



RedRobster 08-22-2010 10:23

Re: Hud message in the date
 
It actually was descriptive. He said to do exactly what you did for the most part. Only difference is he was actually trying to help Dimanok by having him do it by himself.

Dimanok 08-22-2010 11:06

Re: Hud message in the date
 
All thanks, i'm just learning codding.

nikhilgupta345 08-22-2010 22:09

Re: Hud message in the date
 
Quote:

Originally Posted by RedRobster (Post 1278739)
It actually was descriptive. He said to do exactly what you did for the most part. Only difference is he was actually trying to help Dimanok by having him do it by himself.


:D


All times are GMT -4. The time now is 21:52.

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