Raised This Month: $ Target: $400
 0% 

Galileo - VIP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gump497
BANNED
Join Date: May 2011
Location: Slovakia
Old 07-02-2012 , 13:45   Galileo - VIP
Reply With Quote #1

Hello,
I need to do such a text to write to all but there will be VIP ...

Screen: http://bluegame.sk/vip.png

English:

[VIP] "Nick" voted for the map name_map. The vote is due in 2 VIP advantages
"Nick2" has choosen "name_map".

I knew someone would do that Galileo or just write code and I'll get it there?

Thanks for any response
gump497 is offline
Send a message via ICQ to gump497 Send a message via Skype™ to gump497
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 07-02-2012 , 15:42   Re: Galileo - VIP
Reply With Quote #2

PHP Code:
new g_saytext
// plugin_init
register_clcmd("say""handleSay")
g_saytext get_user_msgid("SayText")

public 
handleSay(id)
{
    if(
isVIP(id) )
    {
        new 
input[192]; read_args(inputcharsmax(input) )
        
remove_quotes(input)
        new 
output[224], name[32]
        
formatex(outputcharsmax(output), "^x04[VIP] ^x03%s^x01: %s"nameinput)

            
// for loop to go through each player in the server
        
message_begin(MSG_ONEg_saytext, {0,0,0}, player)
        
write_byte(player)
        
write_string(output)
        
message_end()
    }
    return 
PLUGIN_HANDLED_MAIN

That's a bit incomplete, as a few bugs will arise at run time. But its enough to get you started.
NOTE: you'll have to put the message code message_begin to message_end within a for loop so you can loop through all the players and print the message to them individually. IMPORTANT! messages CAN NOT be sent server-wide (id 0), or the server will crash.

Sorry for incomplete, but i'm lazy. And it wouldn't be fun if i gave you ALL the answers, would it?
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 07-02-2012 at 15:44.
Liverwiz is offline
gump497
BANNED
Join Date: May 2011
Location: Slovakia
Old 07-02-2012 , 16:07   Re: Galileo - VIP
Reply With Quote #3

Yes , but you poorly understood me. Need to do the Galileo code to this text: ***[VIP] "Nick" voted for the map name_map. The vote is due in 2 VIP advantages*** wrote all. And nick VIP player will be written in the text + there will be the name of the map and double vote.

Last edited by gump497; 07-02-2012 at 16:08.
gump497 is offline
Send a message via ICQ to gump497 Send a message via Skype™ to gump497
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 15:22.


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