Raised This Month: $ Target: $400
 0% 

set_hudmessage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EpicFail.
Senior Member
Join Date: May 2010
Old 08-06-2010 , 18:46   set_hudmessage
Reply With Quote #1

How i do set_hudmessage only for the user is need be ..
i try to do with id but this no work

here my code .
PHP Code:
set_hudmessage255255255, -1.00.8700.012.00.10.2, -);
    
ShowSyncHudMsgidg_HudSyncInfo"Camouflage Time: %i"g_iCamoTime-- ); 
Here the problem
PHP Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

Error
Undefined symbol "id" on line 1827
Warning
Expression has no effect on line 1827
Warning
Expression has no effect on line 1827
Error
Expected token";"but found ")" on line 1827
Error
Invalid expressionassumed zero on line 1827
Error
Too many error messages on one line on line 1827

Compilation aborted
.
4 Errors
help me please ^^
EpicFail. is offline
vL.
Senior Member
Join Date: Aug 2009
Location: Estonia
Old 08-06-2010 , 20:15   Re: set_hudmessage
Reply With Quote #2

public yourfunction(id)
{
set_hudmessage( 255, 255, 255, -1.0, 0.87, 0, 0.0, 12.0, 0.1, 0.2, -1 );
ShowSyncHudMsg( id, g_HudSyncInfo, "Camouflage Time: %i", g_iCamoTime-- );

}
vL. is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-06-2010 , 22:18   Re: set_hudmessage
Reply With Quote #3

It says undefined symbol. Use your brain.. this means the id variable is not defined aka does not exist.

Unrelated but do you have?

g_HudSyncInfo = CreateHudSyncObj()
__________________
Bugsy is offline
vL.
Senior Member
Join Date: Aug 2009
Location: Estonia
Old 08-06-2010 , 22:59   Re: set_hudmessage
Reply With Quote #4

Ohh yeah, was kinda sleepy atm
vL. is offline
EpicFail.
Senior Member
Join Date: May 2010
Old 08-07-2010 , 10:06   Re: set_hudmessage
Reply With Quote #5

here i try like you says
Code:
PHP Code:
public CamoCountdownid )
{
    
set_hudmessage255255255, -1.00.8700.012.00.10.2, -);
    
ShowSyncHudMsgidg_HudSyncInfo"Camouflage Time: %i"g_iCamoTime-- );

but now this no show the massage ..
help please ..
EpicFail. is offline
vL.
Senior Member
Join Date: Aug 2009
Location: Estonia
Old 08-07-2010 , 10:41   Re: set_hudmessage
Reply With Quote #6

Is the camocountdown from a command like /camo or is it always active? If you want always active you have to do set_task also.
vL. is offline
EpicFail.
Senior Member
Join Date: May 2010
Old 08-07-2010 , 10:47   Re: set_hudmessage
Reply With Quote #7

can you do this for me i donnu how to do this .. (i new of coding)
thanks
EpicFail. is offline
Vechta
Veteran Member
Join Date: Jun 2010
Old 08-07-2010 , 10:54   Re: set_hudmessage
Reply With Quote #8

put this into plugin_init()
Code:
register_clcmd("say /test", "CamoCountdown")
Vechta is offline
EpicFail.
Senior Member
Join Date: May 2010
Old 08-07-2010 , 10:55   Re: set_hudmessage
Reply With Quote #9

@Vechta
i need this always active (if some buy this)

O_O
EpicFail. is offline
vL.
Senior Member
Join Date: Aug 2009
Location: Estonia
Old 08-07-2010 , 12:08   Re: set_hudmessage
Reply With Quote #10

Add this to your script.

PHP Code:
#include <hamsandwich>

#define ADMIN_ACCES    ADMIN_KICK // The flag needed.

public plugin_init()
{
    
RegisterHam(Ham_Spawn"player""Fwd_Ham_Spawn_Post"1);
}

public 
Fwd_Ham_Spawn_Post(id)
{
    if(
get_user_flags(id) & ADMIN_ACCESS)
    {
        
set_task(0.1"CamoCountdown"id__"b");
    }


Last edited by vL.; 08-07-2010 at 12:11.
vL. 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:18.


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