Raised This Month: $ Target: $400
 0% 

msg: print chat plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ThomasNguyen
Senior Member
Join Date: May 2006
Old 07-13-2006 , 23:52   msg: print chat plugin
Reply With Quote #1

Can someone make a plugin that puts a msg in chat at the beginning of the round or every few rounds with a cvar. Like, if the cvar is amx_msgchat 1 then it will do it at the beginning of every round, if 2 then it will do it every 2 rounds. and a language .txt or normal .txt to put the msg's in. Make it so that you can choose how many different messages will appear. ex: (amx_msgnumber 3) so in the text you would do something like

ONE = Type /buyft in chat to purchase a FlameThrower!
TWO = Type /buybk in chat to purchase a pair of Brass Knuckles!
THREE = Type /buybazooka in chat to purchase a Bazooka!

The reason i want this is because half the time people make plugins that are based on buying some type of equipment and theirs nothing that tells them what to do to buy it and i have to put it in amx_imessage (people dont pay much attention to those msg's). Also, so people dont always ask how to do this and that.

I think this can be done easily, appreciate it if someone could make it.
__________________
ThomasNguyen is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 07-15-2006 , 05:30   Re: msg: print chat plugin
Reply With Quote #2

Here you go. I didnt wanna advertise because it get soo annoying later on. This should show the message every new round /w the write effect inside of fade in/out.

Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "buy commands"
#define VERSION "1.0"
#define AUTHOR "Cheap_Suit"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_event("HLTV", "Event_NewRound", "a", "1=0", "2=0")
}

public Event_NewRound() {
    set_task(1.2, "show_message")
}

public show_message()
{
    new Players[32], iNum
    get_players(Players, iNum)
    for(new i = 0; i < iNum; ++i)
    {
        new id = Players[i]
        
        new roundMessage[256]
        add(roundMessage, 255, "Buy Commands:^n")
        add(roundMessage, 255, "Type /buyft in chat to purchase a FlameThrower!^n")
        add(roundMessage, 255, "Type /buybk in chat to purchase a pair of Brass Knuckles!^n")
        add(roundMessage, 255, "Type /buybazooka in chat to purchase a Bazooka!^n")

        set_hudmessage(0, 0, 255, 0.04, 0.19, 2, 3.0, 12.0)
        show_hudmessage(id, roundMessage)
    }
}
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit 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 04:10.


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