Raised This Month: $ Target: $400
 0% 

[REQ] %s - Hud Message PLZZZ


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiceGuyx
Senior Member
Join Date: Nov 2011
Old 12-06-2011 , 16:00   [REQ] %s - Hud Message PLZZZ
Reply With Quote #1

Hello, i have this:

PHP Code:
new g_rank[33][33]

public 
rank(id)
{
       
g_rank[id] = "Member"
}

set_hudmessage(00255, -1.0, -1.021.09.00.010.110)
show_hudmessage(0"Rank: %s"g_rank[id]) 
Why it's not working
I want a hud message who show: Rank: Member (But with the %s)

Thk!
NiceGuyx is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 12-06-2011 , 16:07   Re: [REQ] %s - Hud Message PLZZZ
Reply With Quote #2

try

PHP Code:
new g_rank[33][33]

public 
rank(id)
{
       
g_rank[id] = "Member"

       
set_hudmessage(00255, -1.0, -1.021.09.00.010.110)
       
show_hudmessage(0"Rank: %s"g_rank[id])

__________________
kramesa is offline
NiceGuyx
Senior Member
Join Date: Nov 2011
Old 12-06-2011 , 16:17   Re: [REQ] %s - Hud Message PLZZZ
Reply With Quote #3

Try but not works
NiceGuyx is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 12-06-2011 , 16:18   Re: [REQ] %s - Hud Message PLZZZ
Reply With Quote #4

PHP Code:
g_rank[id] = "Member" 
->
PHP Code:
copy(g_rank[id], charsmax(g_rank[]), "Member"
__________________

Last edited by hleV; 12-06-2011 at 16:18.
hleV is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 12-06-2011 , 16:31   Re: [REQ] %s - Hud Message PLZZZ
Reply With Quote #5

@NiceGuyx

Also remember:
Only post in scripting help if you need help.
Only post in request if you're requesting something.

Do not create new topics in both.
Seems really weird, many people have been doing this lately

And since this actually is a request ( even tagged with [REQ] )
Post in the correct section next time.

Edit
Sorry what I meant to say was:
Quote:
Originally Posted by Erox902 View Post
And since this actually is a request ( even tagged with [REQ] )
Post only in the correct section next time.

Last edited by Erox902; 12-06-2011 at 16:38.
Erox902 is offline
NiceGuyx
Senior Member
Join Date: Nov 2011
Old 12-06-2011 , 17:48   Re: [REQ] %s - Hud Message PLZZZ
Reply With Quote #6

Not working :s
I have Rank :
I don't have: "Member"

Last edited by NiceGuyx; 12-06-2011 at 17:49.
NiceGuyx is offline
TheArmagedon
Senior Member
Join Date: Sep 2010
Location: Unknown Source
Old 12-06-2011 , 18:25   Re: [REQ] %s - Hud Message PLZZZ
Reply With Quote #7

This should work...
PHP Code:
new iRank[33];
enum {
    
MEMBER,
    
OTHER
}

function(
id)
{
    
iRank[id] = MEMBER;
        
    switch(
iRank[id])
    {
        case 
MEMBER:
        {
            
set_hudmessage(00255, -1.0, -1.021.09.00.010.110)
            
show_hudmessage(0"Rank: Member")
        }
        default:
        {
            
        }
        
// bla bla bla ..
    
}
    
// if you dont want multiple things only use:
    
    
if(iRank[id] == MEMBER
    {
        
set_hudmessage(00255, -1.0, -1.021.09.00.010.110)
        
show_hudmessage(0"Rank: Member")
    }

TheArmagedon is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-06-2011 , 21:31   Re: [REQ] %s - Hud Message PLZZZ
Reply With Quote #8

Quote:
Originally Posted by TheArmagedon View Post
This should work...
PHP Code:
new iRank[33];
enum {
    
MEMBER,
    
OTHER
}

function(
id)
{
    
iRank[id] = MEMBER;
        
    switch(
iRank[id])
    {
        case 
MEMBER:
        {
            
set_hudmessage(00255, -1.0, -1.021.09.00.010.110)
            
show_hudmessage(0"Rank: Member")
        }
        default:
        {
            
        }
        
// bla bla bla ..
    
}
    
// if you dont want multiple things only use:
    
    
if(iRank[id] == MEMBER
    {
        
set_hudmessage(00255, -1.0, -1.021.09.00.010.110)
        
show_hudmessage(0"Rank: Member")
    }

It would be more appropriate to use a dynamic HUD message like the OP is trying to do unless there is an absolute need to do more than just print the info. If only trying to print that info then you waste a lot of time making a case for each rank.
__________________
fysiks is offline
NiceGuyx
Senior Member
Join Date: Nov 2011
Old 12-07-2011 , 15:30   Re: [REQ] %s - Hud Message PLZZZ
Reply With Quote #9

show_hudmessage(0, "Rank: Member")

I told you that i want use: Rank: %s (Not Rank: Member)
NiceGuyx is offline
NiceGuyx
Senior Member
Join Date: Nov 2011
Old 12-07-2011 , 15:31   Re: [REQ] %s - Hud Message PLZZZ
Reply With Quote #10

My plugin:

http://pastebin.com/raw.php?i=ts8GwKue
NiceGuyx 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 12:02.


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