AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [REQ] Hud messages! (https://forums.alliedmods.net/showthread.php?t=215643)

ScrappeR 05-10-2013 13:26

[REQ] Hud messages!
 
how i can make this....



examplee

PHP Code:

public go_info(id)
{
        new 
stats], body], hostname64 ], name32 ]

        new 
rank_pos get_user_statsidstatsbody )
        new 
rank_max get_statsnum( )

        
get_cvar_string"hostname"hostname63 )
        
get_user_nameidname31 )
        
        
set_hudmessage01500, ...........)
        
show_hudmessageid"..... )
    }
    else
    {
        set_hudmessage( 221, 222, 33, ......)
         show_hudmessage( id, "
..... )


i add this

PHP Code:

    }
    else
    { 

and not compiled... ???

guipatinador 05-10-2013 13:36

Re: [REQ] Hud messages!
 
What?

You don't have a if statement.

ScrappeR 05-10-2013 13:43

Re: [REQ] Hud messages!
 
How to do thiss ??

guipatinador 05-10-2013 13:48

Re: [REQ] Hud messages!
 
You need to explain better what you want.

PHP Code:

if( statement )
{
// something
}

else
{
 
// something else



ScrappeR 05-10-2013 14:05

Re: [REQ] Hud messages!
 
Quote:

Originally Posted by guipatinador (Post 1949438)
You need to explain better what you want.

PHP Code:

if( statement )
{
// something
}

else
{
 
// something else



Can you make this fixed...


PHP Code:

public go_info(id)
{
        new 
stats], body], hostname64 ], name32 ]

        new 
rank_pos get_user_statsidstatsbody )
        new 
rank_max get_statsnum( )

        
get_cvar_string"hostname"hostname63 )
        
get_user_nameidname31 )
        
        
set_hudmessage01500, ...........)
        
show_hudmessageid"..... )
    }
    else
    {
        set_hudmessage( 221, 222, 33, ......)
         show_hudmessage( id, "
..... )


i add this

PHP Code:

    }
    else
    { 

???

YamiKaitou 05-10-2013 14:20

Re: [REQ] Hud messages!
 
You need to add an IF statement before you can add an ELSE statement

ScrappeR 05-10-2013 17:59

Re: [REQ] Hud messages!
 
PHP Code:

public go_info(id)
{
        new 
stats], body], hostname64 ], name32 ]

        new 
rank_pos get_user_statsidstatsbody )
        new 
rank_max get_statsnum( )

        
get_cvar_string"hostname"hostname63 )
        
get_user_nameidname31 )
        
    if( 
statement )
    {
        
set_hudmessage22122233, ....)
        
show_hudmessageid".....d")
    }
    else
    {
        
set_hudmessage22122233, ....)
        
show_hudmessageid".....d")
    }


Undefined "statement" how I can compile this ...

YamiKaitou 05-10-2013 19:41

Re: [REQ] Hud messages!
 
You need to replace statement with the actual statement that you want to compare in order to determine which hud message to display

ScrappeR 05-10-2013 20:13

Re: [REQ] Hud messages!
 
Quote:

Originally Posted by YamiKaitou (Post 1949622)
You need to replace statement with the actual statement that you want to compare in order to determine which hud message to display

Can you do any test here with this script? thanks..

YamiKaitou 05-10-2013 20:15

Re: [REQ] Hud messages!
 
We can't help you as you are not helping us in understanding why you want the else statement. On what condition do you want it to show which hud message


All times are GMT -4. The time now is 10:58.

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