AlliedModders

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

EpicFail. 08-06-2010 18:46

set_hudmessage
 
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 ^^

vL. 08-06-2010 20:15

Re: set_hudmessage
 
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-- );

}

Bugsy 08-06-2010 22:18

Re: set_hudmessage
 
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()

vL. 08-06-2010 22:59

Re: set_hudmessage
 
Ohh yeah, was kinda sleepy atm :)

EpicFail. 08-07-2010 10:06

Re: set_hudmessage
 
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 .. :)

vL. 08-07-2010 10:41

Re: set_hudmessage
 
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.

EpicFail. 08-07-2010 10:47

Re: set_hudmessage
 
can you do this for me i donnu how to do this .. (i new of coding)
thanks

Vechta 08-07-2010 10:54

Re: set_hudmessage
 
put this into plugin_init()
Code:

register_clcmd("say /test", "CamoCountdown")

EpicFail. 08-07-2010 10:55

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

O_O

vL. 08-07-2010 12:08

Re: set_hudmessage
 
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");
    }




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

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