AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Any] Command Time-Traveler [v1.2.0] (sm_future) (https://forums.alliedmods.net/showthread.php?t=134288)

DarthNinja 08-03-2010 00:32

[Any] Command Time-Traveler [v1.2.0] (sm_future)
 
1 Attachment(s)
[Any] Command Time-Traveler
Version 1.2.0
Servers Running This Plugin





Description:
Ever wanted to run a command in the future? In 10 minutes? In a hour?
Now you can! Just enter the timer and the command using sm_future and this plugin will tunnel into the future and execute your command!
Coming soon: sm_past to send commands in the past!*

You can also use this plugin with configs if you want something to happen at a set time after a config is loaded, eg: a mapchange.

Commands:
sm_future <minutes> "command args"
Example: sm_future 20 "_restart" (restarts the server in 20 min)
New: if you need to use quotes around a command, you may now do so using single quotes.
Example: sm_future 10 "command 'commands args'"

Cvars:
sm_futureexe_version -- shows plugin version

Install Instructions:
  1. Place FutureExe.smx into your addons/sourcemod/plugins/ folder.

Notes:
The default admin level is Root (Z) because this plugin uses ServerCommand(), so this plugin equates to direct console access. Only give access to trusted admins!

Example commands:
"kickid #3" (server command)
"sm_kick DarthNinja 'Testing done!' " (SM command with quotes)
"sm_slap @all" (sm command)
"tf_birthday 1" (server cvar)

Please note: @me targeting cannot be used, you must type in your name by hand if you wish to target yourself.
Make sure you watch your quotes when entering commands!

This plugin logs like so:
Code:

L 08/02/2010 - 23:38:40: [futureExe.smx] DarthNinja<23><STEAM_0:1:1234567><> used Future-Execute to execute command overtime 5 in 2 minutes.
L 08/02/2010 - 23:40:26: [namechecker.smx] Checked Name: Ritual (Size: 6)
L 08/02/2010 - 23:40:40: [futureExe.smx] "DarthNinja"(STEAM_0:1:1234567) used Future-Execute to execute command overtime 5: Called 2 minutes ago.

ToDo:
  • -

Version History:
  • V1.0.0
    • Initial Release
  • V1.2.0
    • No longer errors if run via rcon
    • Support for quotes added


Thrawn2 08-03-2010 01:33

Re: [Any] Command Time-Traveler
 
Quote:

Originally Posted by DarthNinja (Post 1260021)
Oh yeah, this will likely lose "future" commands during map changes, although I have not tested that.

Only if you've set the TIMER_FLAG_NO_MAPCHANGE on your timer afaik.

sinblaster 08-03-2010 01:49

Re: [Any] Command Time-Traveler
 
nice idea

DarthNinja 08-03-2010 08:51

Re: [Any] Command Time-Traveler
 
Quote:

Originally Posted by [AAA] Thrawn (Post 1260044)
Only if you've set the TIMER_FLAG_NO_MAPCHANGE on your timer afaik.

That flag is not set, but I'm not sure if it works, I will test it later when my host un-bricks my one server.

DarkGod 08-03-2010 08:59

Re: [Any] Command Time-Traveler
 
Sounds good.
I hope you can get the commands in the past to work. Shit would be so cash.

PropKiller 08-03-2010 12:21

Re: [Any] Command Time-Traveler
 
Just wondering, what how would the past part be usefull?

DarthNinja 08-04-2010 01:14

Re: [Any] Command Time-Traveler
 
Quote:

Originally Posted by DarkGod (Post 1260312)
Sounds good.
I hope you can get the commands in the past to work. Shit would be so cash.

Yep, I'm having some trouble with the space-time continuum right now; like if you ban yourself 5 minutes before you ban yourself... Then you can't have banned yourself and it creates a paradox. Very messy.

Quote:

Originally Posted by PropKiller (Post 1260504)
Just wondering, what how would the past part be usefull?

Well.
You could send yourself a message to prevent yourself from asking an embarrassing question (before you ask it), and therefor avoid looking foolish.




[IMG]http://img3.**************/img3/2743/1256873coolfacetiny.jpg[/IMG]

Cuz 09-22-2010 19:57

Re: [Any] Command Time-Traveler
 
Anyway you can change the "minutes" to seconds, and "The default admin level is Root (Z)" so it could be used as a cfg command. Like to use it in cfg files like this:

Code:

sm_cvar spec_freeze_time 60
sm_freeze @all 60
sm_future 60  "sm_cvar spec_freeze_time 4"

Code:

sm_blind @all 255
sm_future 20 "sm_blind @all 0"

This kinda does what I want:
[ANY] (REQUEST) Delay Command or Cvar: sm_delay (Time in Seconds)


Searcher64 09-22-2010 20:05

Re: [Any] Command Time-Traveler (sm_future)
 
Can someone be kind enough to upload a video? :P

DarthNinja 09-23-2010 02:34

Re: [Any] Command Time-Traveler
 
Quote:

Originally Posted by Cuz (Post 1306201)
Anyway you can change the "minutes" to seconds, and "The default admin level is Root (Z)" so it could be used as a cfg command. Like to use it in cfg files like this:

Input your time in minutes as a decimal.
sm_future 1 //Does something in 1 minute
sm_future 0.33 //Does something in 20 seconds
Etc.

I'm not sure what your second question was, if there was one... But I'll try and answer it anyway:
Admin flags are ignored when the server executes something. So yes, you can use this plugin as you have above. Since it runs commands as ServerCommand() you may not actually need to use sm_cvar, only if the cvar is cheat flagged.


Quote:

Originally Posted by Searcher64 (Post 1306207)
Can someone be kind enough to upload a video? :P

Why? It's not like there's really anything to see... :|


All times are GMT -4. The time now is 02:06.

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