Hey
I created another small plugin, it isn't very useful but maybe someone can use it for something.
commands:
gamespeed > 5000 can crash your server
It's really funny to play around with it and to troll the people in the server
Gamespeed reset to 0 in OnMapChange is necessary to avoid crashes.
Enjoy!
I created another small plugin, it isn't very useful but maybe someone can use it for something.
commands:
Code:
!gamespeed - shows the current gamespeed
!gamespeed <number> - changing the gamespeed
It's really funny to play around with it and to troll the people in the server
CSHARP Code
- using System;
- using System.Collections.Generic;
- using Addon;
- using System.Text;
-
- namespace ClassLibrary1
- {
- public class Class1:CPlugin
- {
- IntPtr gamespeed;
-
- public override void OnServerLoad()
- {
- gamespeed = (IntPtr)Convert.ToInt32(0x0587EA14);
- ServerPrint("GameSpeed Plugin by 8Q4S8 loaded!");
- }
- unsafe public override ChatType OnSay(string Message, ServerClient Client)
- {
- if (Message.ToLower().StartsWith("!gamespeed"))
- {
- string[] split = Message.Split(' ');
-
- if (split.Length == 1)
- {
- ServerSay("Gamespeed: "+*(int*)gamespeed, true);
- return ChatType.ChatNone;
- }
-
- *(int*)gamespeed = Convert.ToInt32(split[1]);
- ServerSay("Gamespeed changed to " + *(int*)gamespeed, true);
- return ChatType.ChatNone;
- }
- return ChatType.ChatContinue;
- }
- public override unsafe void OnMapChange()
- {
- *(int*)gamespeed = 0;
- }
- }
- }
Gamespeed reset to 0 in OnMapChange is necessary to avoid crashes.
Enjoy!