Raised This Month: $51 Target: $400
 12% 

Help ! Fixing a Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rp.KryptoNite
Senior Member
Join Date: Feb 2012
Location: Israel
Old 11-25-2012 , 13:45   Help ! Fixing a Plugin
Reply With Quote #1

Theres My SourceCode I built
As you can see it works & Compiles but I did somthing wrong with the timer and it wont stop
Keep Running and restarting the server

Thanks 4 Helpers !

Code:
#include <sourcemod>
new Handle:g_Timer_30 = INVALID_HANDLE;

public Plugin:myinfo =
{
    name = "Map_rr",
    author = "KryptoNite",
    description = "Restarting after map change",
    url = "css.vgames.co.il"
}

public OnMapStart()
{
    g_Timer_30 = CreateTimer(8.0, command_rrmap);
    ServerCommand("mp_restartgame 1");
    
}


public Action:command_rrmap(Handle:timer)
{
    PrintToChatAll("\x04[SM]\x01 Match Will Start in \x04 30\x01 Seconds !");
    g_Timer_30 = CreateTimer(30.0, command_rrmap);
    ServerCommand("mp_restartgame 30");
    g_Timer_30 = CreateTimer(30.0, command_rrmap1);
    KillTimer(g_Timer_30);
    
}
public Action:command_rrmap1(Handle:timer)
{
    PrintToChatAll("\x04[SM]\x0783F294 Match Has Been Started !");
    PrintToChatAll("\x04[SM]\x0783F294 Good Luck & Have Fun !");
    KillTimer(g_Timer_30);
    
}
__________________
_____________________________________________ _____
My Plugins |My Plugins |My Plugins |My Plugins |My Plugins |
  • Feel Free to PM me .
  • Uploading Only Simple Plugins.
Rp.KryptoNite is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 11-25-2012 , 13:57   Re: Help ! Fixing a Plugin
Reply With Quote #2

You have one variable for multiple timers, that should be enough to find your issue.
__________________
thetwistedpanda is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-25-2012 , 14:13   Re: Help ! Fixing a Plugin
Reply With Quote #3

Quote:
Originally Posted by Rp.KryptoNite View Post
Theres My SourceCode I built
As you can see it works & Compiles but I did somthing wrong with the timer and it wont stop
Keep Running and restarting the server

Thanks 4 Helpers !

Code:
#include <sourcemod>
new Handle:g_Timer_30 = INVALID_HANDLE;

public Plugin:myinfo =
{
    name = "Map_rr",
    author = "KryptoNite",
    description = "Restarting after map change",
    url = "css.vgames.co.il"
}

public OnMapStart()
{
    g_Timer_30 = CreateTimer(8.0, command_rrmap);
    ServerCommand("mp_restartgame 1");
    
}


public Action:command_rrmap(Handle:timer)
{
    PrintToChatAll("\x04[SM]\x01 Match Will Start in \x04 30\x01 Seconds !");
    g_Timer_30 = CreateTimer(30.0, command_rrmap);
    ServerCommand("mp_restartgame 30");
    g_Timer_30 = CreateTimer(30.0, command_rrmap1);
    KillTimer(g_Timer_30);
    
}
public Action:command_rrmap1(Handle:timer)
{
    PrintToChatAll("\x04[SM]\x0783F294 Match Has Been Started !");
    PrintToChatAll("\x04[SM]\x0783F294 Good Luck & Have Fun !");
    KillTimer(g_Timer_30);
    
}
That wouldn't do anything you want it to do.
It will keep restarting the game every minute.
Mitchell is offline
Rp.KryptoNite
Senior Member
Join Date: Feb 2012
Location: Israel
Old 11-26-2012 , 14:51   Re: Help ! Fixing a Plugin
Reply With Quote #4

I know Can any one please just fix the code and make it restart after 8 sec announce for restart in 30 seconds
and apply mp_restartgame 30 ,when game restarts printtochat
Quote:
PrintToChatAll("\x04[SM]\x0783F294 Match Has Been Started !"); PrintToChatAll("\x04[SM]\x0783F294 Good Luck & Have Fun !");
Thanks if anyone can fix it i appriciate that just wanna learn wheres my mistake : first time timers ><
__________________
_____________________________________________ _____
My Plugins |My Plugins |My Plugins |My Plugins |My Plugins |
  • Feel Free to PM me .
  • Uploading Only Simple Plugins.
Rp.KryptoNite is offline
Rp.KryptoNite
Senior Member
Join Date: Feb 2012
Location: Israel
Old 11-29-2012 , 13:44   Re: Help ! Fixing a Plugin
Reply With Quote #5

any1 ?
__________________
_____________________________________________ _____
My Plugins |My Plugins |My Plugins |My Plugins |My Plugins |
  • Feel Free to PM me .
  • Uploading Only Simple Plugins.
Rp.KryptoNite is offline
Rp.KryptoNite
Senior Member
Join Date: Feb 2012
Location: Israel
Old 12-04-2012 , 13:01   Re: Help ! Fixing a Plugin
Reply With Quote #6

I just want to killtimer after mapchanges & game restarts .. :\
still aint able to fix :\
__________________
_____________________________________________ _____
My Plugins |My Plugins |My Plugins |My Plugins |My Plugins |
  • Feel Free to PM me .
  • Uploading Only Simple Plugins.
Rp.KryptoNite 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 03:41.


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