![]() |
|
[Release] Gamespeed plugin - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: [Release] Gamespeed plugin (/Thread-Release-Gamespeed-plugin.html) |
Gamespeed plugin - 8q4s8 - 05-27-2013 Hey 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 gamespeedIt's really funny to play around with it and to troll the people in the server ![]() 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! RE: Gamespeed plugin - DJSKilly - 05-27-2013 wooow! Look the time its going crazy :p BTW nice plugin ^^ RE: Gamespeed plugin - DidUknowiPwn - 05-28-2013 This looks like timescale, is it? RE: Gamespeed plugin - [HARD] Tony. - 05-28-2013 tkn you RE: Gamespeed plugin - archit - 05-28-2013 How do you find the adresses ? RE: Gamespeed plugin - Nekochan - 05-28-2013 Do you use timescale ? By the way, it can crash server. ( not just 5000, like random moments ) (in mw2/cod4 it was crashing) RE: Gamespeed plugin - 8q4s8 - 05-28-2013 It isn't timescale, it isn't a float value as you can see but it's near timescale in memory. Timescale address: 0587E9C8 |