Raised This Month: $ Target: $400
 0% 

Remind everyone when (X) seconds passed.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HalfLife
Senior Member
Join Date: Aug 2013
Location: I'll tell you later ;)
Old 08-20-2013 , 01:56   Remind everyone when (X) seconds passed.
Reply With Quote #1

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

#define PLUGIN "Reminder"
#define VERSION "1.0"
#define AUTHOR "HalfLife"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    if( 
get_gametime () > 600.0 ) )
    {
        
client_print0print_chat"10 minutes have passed, now Admins can Vote For Mod." );
        return 
PLUGIN_HANDLED

This is my plugin, I made so when 600 seconds have passed,
PHP Code:
client_print0print_chat"10 minutes have passed, now Admins can Vote For Mod." ); 
but it doesn't compile and gives errors (see the picture)
Attached Thumbnails
Click image for larger version

Name:	errors.png
Views:	276
Size:	36.1 KB
ID:	124534  
__________________
If you need any help regarding your HL Server, PM me and I can help you
My Tutorials:
How to install and use your SQL Database using AMX Mod X Plugins
HalfLife is offline
lobopack23
Senior Member
Join Date: Jun 2009
Location: California , United Stat
Old 08-20-2013 , 02:52   Re: Remind everyone when (X) seconds passed.
Reply With Quote #2

here you go buddy..try this simple version
Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Reminder"
#define VERSION "1.0"
#define AUTHOR "HalfLife"

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    new Float:gametime = get_gametime()

    if( gametime >= 600.0 )
        client_print( 0, print_chat, "10 minutes have passed, now Admins can Vote For Mod." );
    return PLUGIN_HANDLED
}
And if you want to spice things up.

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

#define PLUGIN "Reminder"
#define VERSION "1.0"
#define AUTHOR "HalfLife"

#define MINUTES 10
new g_timePassed
new Float:gametime

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)

    gametime = get_gametime()
    g_timePassed = MINUTES * 60

    if( gametime >= g_timePassed )
        client_print( 0, print_chat, "%s minutes have passed, now Admins can Vote For Mod.", g_timePassed );

    return PLUGIN_HANDLED
}
didn't have time to test, but i hope it's what you're looking for
__________________
- Steam: Lobopack23 - Link
Contact me if you need any help with Pokemod.
- 2nd Generation Pokemod - Link
(new skills, items, and pokemons)
- Buy Xp - Link

Last edited by lobopack23; 08-20-2013 at 02:59.
lobopack23 is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 08-20-2013 , 02:54   Re: Remind everyone when (X) seconds passed.
Reply With Quote #3

HalfLife you just forgot a bracket after "return PLUGIN_HANDLED".

Last edited by dark_style; 08-20-2013 at 02:56.
dark_style is offline
lobopack23
Senior Member
Join Date: Jun 2009
Location: California , United Stat
Old 08-20-2013 , 03:26   Re: Remind everyone when (X) seconds passed.
Reply With Quote #4

brackets.. HIS GREATEST NEMESIS xD

also..if he added the bracket..he would get plugin_init does not return a value..

you can always add a return PLUGIN_CONTINUE at the end..but yeah :p
__________________
- Steam: Lobopack23 - Link
Contact me if you need any help with Pokemod.
- 2nd Generation Pokemod - Link
(new skills, items, and pokemons)
- Buy Xp - Link

Last edited by lobopack23; 08-20-2013 at 03:29.
lobopack23 is offline
HalfLife
Senior Member
Join Date: Aug 2013
Location: I'll tell you later ;)
Old 08-20-2013 , 03:37   Re: Remind everyone when (X) seconds passed.
Reply With Quote #5

Thanks lobopack but I never understood what is bool.
__________________
If you need any help regarding your HL Server, PM me and I can help you
My Tutorials:
How to install and use your SQL Database using AMX Mod X Plugins
HalfLife is offline
lobopack23
Senior Member
Join Date: Jun 2009
Location: California , United Stat
Old 08-20-2013 , 03:58   Re: Remind everyone when (X) seconds passed.
Reply With Quote #6

bool is short for boolean.
i believe it returns a value of 1 for true and 0 for false.
__________________
- Steam: Lobopack23 - Link
Contact me if you need any help with Pokemod.
- 2nd Generation Pokemod - Link
(new skills, items, and pokemons)
- Buy Xp - Link
lobopack23 is offline
HalfLife
Senior Member
Join Date: Aug 2013
Location: I'll tell you later ;)
Old 08-20-2013 , 04:02   Re: Remind everyone when (X) seconds passed.
Reply With Quote #7

Quote:
Originally Posted by lobopack23 View Post
bool is short for boolean.
i believe it returns a value of 1 for true and 0 for false.
Thanks for your help.
I am learning scripting better and better
Btw from where did you learn scripting?
Edit: Not working the 1st one
__________________
If you need any help regarding your HL Server, PM me and I can help you
My Tutorials:
How to install and use your SQL Database using AMX Mod X Plugins

Last edited by HalfLife; 08-20-2013 at 04:22.
HalfLife is offline
HalfLife
Senior Member
Join Date: Aug 2013
Location: I'll tell you later ;)
Old 08-20-2013 , 04:26   Re: Remind everyone when (X) seconds passed.
Reply With Quote #8

Both not working
__________________
If you need any help regarding your HL Server, PM me and I can help you
My Tutorials:
How to install and use your SQL Database using AMX Mod X Plugins
HalfLife is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 08-20-2013 , 04:33   Re: Remind everyone when (X) seconds passed.
Reply With Quote #9

A simple code:
PHP Code:
#include <amxmodx>

#define Seconds 600.0

public plugin_init()
{
    
register_plugin("Reminder All""0.0.1""wbyokomo")
    
    
remove_task(6132)
    
set_task(Seconds"TaskRemindAll"6132)
}

public 
TaskRemindAll()
{
    
client_print(0print_chat"10 minutes have passed, now Admins can Vote For Mod.")

__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
HalfLife
Senior Member
Join Date: Aug 2013
Location: I'll tell you later ;)
Old 08-20-2013 , 04:40   Re: Remind everyone when (X) seconds passed.
Reply With Quote #10

Quote:
Originally Posted by yokomo View Post
A simple code:
PHP Code:
#include <amxmodx>

#define Seconds 600.0

public plugin_init()
{
    
register_plugin("Reminder All""0.0.1""wbyokomo")
    
    
remove_task(6132)
    
set_task(Seconds"TaskRemindAll"6132)
}

public 
TaskRemindAll()
{
    
client_print(0print_chat"10 minutes have passed, now Admins can Vote For Mod.")

Thanks this one is working.
But thanks to everyone for your helps
Edit: Why remove_task(6132)? What 6132 defines? Latest HLDS ?? LOL
__________________
If you need any help regarding your HL Server, PM me and I can help you
My Tutorials:
How to install and use your SQL Database using AMX Mod X Plugins

Last edited by HalfLife; 08-20-2013 at 04:40.
HalfLife is offline
Reply


Thread Tools
Display Modes

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


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