Raised This Month: $ Target: $400
 0% 

Message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bladell
Senior Member
Join Date: Jun 2012
Old 12-26-2013 , 10:25   Message
Reply With Quote #1

I have a message like this: "Your privileges as VIP are: " and I want to show after "speed" (if player have a certain flag acces), "lower gravity" (if player have other certain flag access) "more health" (if player have other certain flag access).
My message should look like this: "Your privileges as VIP are: more speed, lower gravity, more health"...
My question is how can I make this message? If player have just last two flag access the message should look like this: "Your privileges as VIP are: lower gravity, more health"
Also, if player have only one flag acces the message should look like this: "Your privileges as VIP are: more health" (for example)
Is there a way to make a mesasge like this? I thought to use formatex but I have no ideea how can I create the message after ":".
Bladell is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 12-26-2013 , 12:39   Re: Message
Reply With Quote #2

use client_print ?
__________________
Like my clean plugins and work?
Baws is offline
Bladell
Senior Member
Join Date: Jun 2012
Old 12-26-2013 , 13:04   Re: Message
Reply With Quote #3

You didn't understand what I want...
Bladell is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-26-2013 , 14:40   Re: Message
Reply With Quote #4

Show flags and messages (or messages parts) please.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Bladell
Senior Member
Join Date: Jun 2012
Old 12-26-2013 , 17:07   Re: Message
Reply With Quote #5

"^4[AMXX]^1(VIP) Your VIP privileges are: "
if player have flag n "gravity, hp regeneration"
if player have flag o "health"
if player have flag p "speed"
if player have flag q "+50% XP, revive"
if player have flag r, all messages above + "4000$ money, +100% XP" <instead of 50% XP> "acces to <a hero> and amx_startvote"
Bladell is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-27-2013 , 05:32   Re: Message
Reply With Quote #6

A way :

PHP Code:
const FLAG_VIP_GRAV_REGEN ADMIN_LEVEL_B;
const 
FLAG_VIP_HEALTH ADMIN_LEVEL_C;
const 
FLAG_VIP_GRAV_SPEED ADMIN_LEVEL_D;
const 
FLAG_VIP_GRAV_XP_REVIVE ADMIN_LEVEL_E;
const 
FLAG_VIP_ALL ADMIN_LEVEL_F;

format_player_messageid )
{
    new 
flags get_user_flags(id);

    new 
szMessage[190], n;
    
+= formatex(szMessage[n], charsmax(szMessage)-n"^4[AMXX]^1(VIP) Your VIP privileges are:");
    if( 
flags FLAG_VIP_ALL )
    {
        
+= formatex(szMessage[n], charsmax(szMessage)-n" gravity, hp regen, health, speed, 4000$ money, +100% XP, acces to <a hero> and amx_startvote");
    }
    else
    {
        if( 
flags FLAG_VIP_GRAV_REGEN )
        {
            
+= formatex(szMessage[n], charsmax(szMessage)-n" gravity, hp regen,");
        }
        if( 
flags FLAG_VIP_HEALTH )
        {
            
+= formatex(szMessage[n], charsmax(szMessage)-n" health,");
        }
        if( 
flags FLAG_VIP_GRAV_SPEED )
        {
            
+= formatex(szMessage[n], charsmax(szMessage)-n" speed,");
        }
        if( 
flags FLAG_VIP_GRAV_XP_REVIVE )
        {
            
+= formatex(szMessage[n], charsmax(szMessage)-n"+50% XP, revive");
        }
        if( 
szMessage[n-1] == ',' )
        {
            
szMessage[n-1] = EOS;
        }
    }
    
client_print_color(idprint_team_blueszMessage);

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-27-2013 at 13:28.
ConnorMcLeod is offline
Bladell
Senior Member
Join Date: Jun 2012
Old 12-27-2013 , 08:14   Re: Message
Reply With Quote #7

Thanks Connor
Bladell is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 12-27-2013 , 11:58   Re: Message
Reply With Quote #8

Off topic sorry: client_print_color needs a stock or it's already included? Knowing that ColorChat needs a .inc file.
__________________
Like my clean plugins and work?

Last edited by Baws; 12-27-2013 at 11:58.
Baws is offline
Bladell
Senior Member
Join Date: Jun 2012
Old 12-27-2013 , 12:14   Re: Message
Reply With Quote #9

I use ColorChat stock version...
Bladell is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-27-2013 , 12:44   Re: Message
Reply With Quote #10

Better to use included one from amxx1.8.3

Edit :

I had completely messed up formatting, it is fixed now.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-27-2013 at 13:29.
ConnorMcLeod 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 10:12.


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