This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Lame questin albout hudmessages


Post New Thread Reply   
 
Thread Tools Display Modes
Watt
Senior Member
Join Date: Jan 2008
Location: Poland :D
Old 02-19-2008 , 12:59   Re: Lame questin albout hudmessages
Reply With Quote #11

HAve you got a colors and how to make that taht it will show

[Defuse Bomb] (in red)
You have defuse bomb here(in green)
Watt is offline
Howdy!
Senior Member
Join Date: Feb 2007
Old 02-19-2008 , 21:17   Re: Lame questin albout hudmessages
Reply With Quote #12

Quote:
Originally Posted by Watt View Post
HAve you got a colors and how to make that taht it will show

[Defuse Bomb] (in red)
You have defuse bomb here(in green)
Have you ever heard of red, green and blue (r,g,b)?
__________________
[IMG]http://img221.**************/img221/5608/howdyfinnishhq2.jpg[/IMG]
Howdy! is offline
Watt
Senior Member
Join Date: Jan 2008
Location: Poland :D
Old 02-20-2008 , 08:00   Re: Lame questin albout hudmessages
Reply With Quote #13

Quote:
#include <amxmodx>

public plugin_init()
{
register_plugin("Cele mapy", "0.1", "sb")
}

public client_putinserver(id)
{
new map[32];
get_mapname(map, charsmax(map));
if(!equali(map, "de_", 3))
return PLUGIN_HANDLED;

set_hudmessage(0, 255, 0, 0.1, 0.5, 0, 0.25, 1.0, 0.1, 0.1, 3);
show_hudmessage(id, "Defuse BOMB /n");
set_hudmessage(255, 0, 0, 0.1, 0.5, 0, 0.25, 1.0, 0.1, 0.1, 3);
show_hudmessage(id, "Defuse bomb if you want ");

set_task(15.0,"client_putinserver")
}
I don'twork it should show message
Defuse bomb (green)
Defuse bomb if you want (red)

It show only Defuse bomb if you want
Watt is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-20-2008 , 09:32   Re: Lame questin albout hudmessages
Reply With Quote #14

Replace last number (3) in set_hudmessage with -1
Also don't set same coords (0.1, 0.5) in both set_hudmessage or both messages will appear on the same place.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Watt
Senior Member
Join Date: Jan 2008
Location: Poland :D
Old 02-20-2008 , 12:47   Re: Lame questin albout hudmessages
Reply With Quote #15

+karma And how to add lang to hudmessage?
And why this isn't working?
PHP Code:
#include <amxmodx>
#include <cstrike>

public plugin_init()
{
register_plugin("Cele mapy""0.1""sb")
}

public 
client_putinserver(id)
{
new 
map[31];
get_mapname(mapcharsmax(map));
if(
equali(map"de_"3))
{
if(
cs_get_user_team(id) == CS_TEAM_CT)
{
set_hudmessage(002550.10.606.01.00.10.13);
show_hudmessage(id"Protect BS.");
}
if(
cs_get_user_team(id) == CS_TEAM_T)
{
set_hudmessage(002550.10.606.01.00.10.13);
show_hudmessage(id"Plant the bomb.");
}
}

set_task(5.0,"client_putinserver")



Last edited by Watt; 02-20-2008 at 13:08.
Watt is offline
atomen
Veteran Member
Join Date: Oct 2006
Location: Stockholm, Sweden
Old 02-20-2008 , 13:51   Re: Lame questin albout hudmessages
Reply With Quote #16

This should work like a charm , try it out

Though im not so familiar with dictionaries
but it should work perfect
PHP Code:
#include <amxmodx>
#include <cstrike>

public plugin_init()
{
    
register_plugin("Cele mapy""0.1""sb")
    
register_dictionary("mapm.txt")
}

public 
client_putinserver(id)
{
new 
map[31];
get_mapname(mapcharsmax(map));
if(
equali(map"de_"3))
    {
    
set_task(5.0,"display_message, id")
    }
}

public 
display_message(id)
{
    if(
cs_get_user_team(id) == CS_TEAM_CT)
    {
    
set_hudmessage(002550.10.606.01.00.10.13);
    
show_hudmessage(id"PROTECT_LANG");
    }
    else if(
cs_get_user_team(id) == CS_TEAM_T)
    {
    
set_hudmessage(002550.10.606.01.00.10.13);
    
show_hudmessage(id"DESTROY_LANG");
    }

omg - removing sma , i forgot the online compiler cant compile it =/
Added swedish language to the lang file =D

NOTICE : Dont forget to download the language file !
Attached Files
File Type: txt mapm.txt (146 Bytes, 96 views)
__________________

Last edited by atomen; 02-20-2008 at 14:13.
atomen is offline
Send a message via MSN to atomen
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-20-2008 , 14:37   Re: Lame questin albout hudmessages
Reply With Quote #17

Quote:
This should work like a charm
No.


Code:
    #include <amxmodx>     #include <cstrike>     public plugin_init()     {         register_plugin( "Cele mapy", "0.1", "sb" );         register_dictionary( "mapm.txt" );     }     public plugin_cfg()     {         new sMap[4];         get_mapname( sMap, sizeof( sMap ) - 1 );                 if( !equali(sMap, "de_", 3 ) )             pause( "a" );     }     public client_putinserver( id )     {         set_task( 5.0, "display_message", id );     }     public display_message( id )     {         if( !is_user_alive( id ) )             return;                     switch( cs_get_user_team( id ) )         {             case CS_TEAM_CT :             {                 set_hudmessage( 0, 0, 255, 0.1, 0.6, 0, 6.0, 12.0, 0.1, 0.1, -1 );                 show_hudmessage( id, "%L", id, "PROTECT_LANG" );             }             case CS_TEAM_T  :             {                 set_hudmessage( 255, 0, 0, 0.1, 0.6, 0, 6.0, 12.0, 0.1, 0.1, -1 );                 show_hudmessage( id, "%L", id, "DESTROY_LANG" );             }         }     }
__________________
Arkshine is offline
atomen
Veteran Member
Join Date: Oct 2006
Location: Stockholm, Sweden
Old 02-20-2008 , 14:50   Re: Lame questin albout hudmessages
Reply With Quote #18

This command was new for me
Any explanations plz xD ?
Quote:
switch
Quote:
get_mapname( sMap, sizeof( sMap ) - 1 );

if( !equali(sMap, "de_", 3 ) )
Can you explain this 2 plz =D ?
But i know what
Quote:
if( !equali(sMap, "de_"
Means but not what the number "3" means

And 1 more thing, If you use pause what happends if you
change to a non-de map and then to a de-map does everything
get re-initialized ?
__________________

Last edited by atomen; 02-20-2008 at 15:01.
atomen is offline
Send a message via MSN to atomen
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-20-2008 , 15:36   Re: Lame questin albout hudmessages
Reply With Quote #19

http://wiki.amxmodx.org/Pawn_Tutorial#Switch_Statements
http://www.amxmodx.org/funcwiki.php?...uali&go=search
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-20-2008 , 15:37   Re: Lame questin albout hudmessages
Reply With Quote #20

Quote:
switch
http://wiki.alliedmods.net/Pawn_Tuto...tch_Statements

Quote:
Means but not what the number "3" means
http://www.amxmodx.org/funcwiki.php?go=func&id=53

Quote:
And 1 more thing
Initialized at map change.
__________________
Arkshine 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 22:41.


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