Raised This Month: $ Target: $400
 0% 

Advertisements Mod -- Need Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
-=[SD]=-Turkey
Member
Join Date: Jul 2006
Location: Ohio, United States of A
Old 06-04-2007 , 20:19   Advertisements Mod -- Need Help
Reply With Quote #1

Hello. This is my first plugin I've actually wrote and it compiled... It works and so does the cvar I made. What it does is I've hardcoded some advertisements into it that will display every 60 seconds (or 1 minute), I want to share this plugin with others for their tsrp servers -- I forgot to mention that I made this for TSRP. The problem is, whenever it does display the advertisements, it shows all 5 of them instead of one at a time every 60 seconds.

Here is the code:

Code:
/*
==================================================================================================================
===                                  Advertisements Mod for TSRP Servers                                       ===
====                                         Version 0.1 Alpha                                                ====
==========================================================Author: -=[SD]=-Turkey a.k.a turkey2112=================
*/
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "PLUGIN"
#define VERSION "VERSION"
#define AUTHOR "AUTHOR"
 
public plugin_init() 
{
 register_plugin("Advertisements Mod", "0.1a", "turkey2112")
 register_cvar("amx_advertsenable","1")
 set_task(60.0,"advertise",0,"",0,"b")
}
public advertise()
{
 if(!get_cvar_num("amx_advertsenable")) return PLUGIN_HANDLED
 client_print(0,print_chat,"The MCPD is hiring! Apply on our forums today!") //Edit the text inside of quotes for your own adverts
 client_print(0,print_chat,"Want to save lives? Join the MCMD today! Visit our forums to apply.")
 client_print(0,print_chat,"Chase bank is looking for a new director! Do you have what it takes? Find out on our forums!")
 client_print(0,print_chat,"Need a place to stay for the night? Visit Hotel Mecklenburg! Rooms starting at only $50!")
 client_print(0,print_chat,"Good times, good drinks, good company... Come visit us at the Irish Pub!")
 return PLUGIN_HANDLED
}
__________________
If you thought my post was helpful, please add karma
-=[SD]=-Turkey is offline
Send a message via AIM to -=[SD]=-Turkey
 



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:35.


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