Siddin
Rikk-tikk-tikki-tikki-tchk!
- Joined
- Feb 6, 2005
- RedCents
- 504¢
Its all about the evil cat!
And i guess for those that complain about the choppiness of ghettospeed. Personally i never really liked ghettospeed *shrug*
And i guess for those that complain about the choppiness of ghettospeed. Personally i never really liked ghettospeed *shrug*
Rich (BB code):
#include "../MQ2Plugin.h"
PreSetup("MQ2SuperDuperReallyGhettoSpeed");
#define OP_SpeedCrash 0x573
struct _PlayerSelfPos {
unsigned short SpawnID;
unsigned short TimeStamp;
unsigned Heading:12;
unsigned padding0004:20;
float DeltaY;
int Animation:10;
unsigned Padding0012:22;
float DeltaX;
float Y;
int DeltaHeading:10;
int Padding0024:6;
int unknown0026:2;
float DeltaZ;
float Z;
float X;
} PSP;
VOID Runspeed(PSPAWNINFO pChar, PCHAR szLine)
{
char command[MAX_STRING];
GetArg(command,szLine,1);
pChar->RunSpeed = (float)atof(szLine);
if (pChar->RunSpeed <= 0.9)
{
pChar->RunSpeed = 1.0;
}
CHAR szMsg[MAX_STRING] = {0};
sprintf(szMsg, "Speed Set: %3.1f", pChar->RunSpeed);
WriteChatColor (szMsg, CONCOLOR_YELLOW);
}
PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/speed",Runspeed);
}
PLUGIN_API VOID ShutdownPlugin(VOID)
{
RemoveCommand("/speed");
}
PLUGIN_API BOOL OnSendPacket(DWORD Type, PVOID Packet, DWORD Size)
{
if (Type == OP_SpeedCrash) return false;
// speed hack protection
if (Type == 0x178A)
{
struct _PlayerSelfPos *nLoc;
nLoc = (_PlayerSelfPos*)Packet;
int newAnimation = nLoc->Animation;
if (newAnimation >= 27) // 42 is SoW but is too high to keep you from being discon
{
nLoc->Animation = 27;
}
return true;
} else {
return true;
}
}
Last edited:

