AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Request: once at the 15 min t_say (https://forums.alliedmods.net/showthread.php?t=28543)

brantje 05-17-2006 07:14

Request: once at the 15 min t_say
 
Hi,
Is there a script that shows a message once in the 15 min?

SweatyBanana 05-17-2006 07:23

Code:
#include <amxmodx>   #include <amxmisc> #define PLUGIN "say"   #define VERSION "1.0"   #define AUTHOR "SweatyBanana" public plugin_init()   {       register_plugin(PLUGIN, VERSION, AUTHOR)     set_task(900.0,"advertise"); } public advertise() {     client_print(0,print_chat,"YOUR MESSAGE HERE")     set_task(get_cvar_float("anounce_Time"),"advertise")     return PLUGIN_HANDLED }

brantje 05-18-2006 05:43

And can it have 5 messages that picked randrom?
That would be great!

p3tsin 05-18-2006 08:18

Code:
#include <amxmodx> const messagenum = 5 new const messages[messagenum][] = {     "message1",     "message2",     "message3",     "message4",     "message5" } public plugin_init() {     register_plugin("Announce", "1.0", "p3tsin")     register_cvar("announce_time", "900.0")     set_task(900.0, "advertise") } public advertise() {     new rnd = random_num(0,messagenum-1)     client_print(0,print_chat, "%s",messages[rnd])     set_task(get_cvar_float("announce_time"), "advertise")     return PLUGIN_HANDLED }


All times are GMT -4. The time now is 16:33.

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