Post: [1.24/c++]Script Thread
08-11-2014, 09:03 PM #1
(adsbygoogle = window.adsbygoogle || []).push({});
It seems no one else is gonna do it so I will take the pleasure Smile Hopefully this gets some things in motion, I will try my best to update this if you want anything added post it below.

TOC = 0x0072DCE8 //thanks to seb

SV_GameSendServerCommand
    
opd_s SV = { 0x228FA8, TOC };void(*SV_GSSC)(int client, int type, char* cmd) = (void(*)(int, int, char*))&SV;


Some useful SV_GSSC functions
    
void iPrintlnBold(int client, char* text)
{
char buf[100];
strcpy(buf, "c \"");
strcat(buf, text);
SV_GSSC(client, 0, buf);
}

void iPrintln(int client, char* text)
{
char buf[100];
strcpy(buf, "f \"");
strcat(buf, text);
SV_GSSC(client, 0, buf);
}

void SetVision(int client, char* Vision)
{
char buf[100];
strcpy(buf, "j \"");
strcat(buf, Vision);
SV_GSSC(client, 0, buf);
}

void SetFOV(int client, char* fov)
{
char buf[100];
strcpy(buf, "q cg_fov \"");
strcat(buf, fov);
SV_GSSC(client, 0, buf);
}

void KickWithMessage(int client, char* Message)
{
char buf[100];
strcpy(buf, "r \"");
strcat(buf, Message);
SV_GSSC(client, 0, buf);
}


cl_InGame
    
bool InGame()
{
if (*(char*)0x018d4c64 != 1)
return false;
return true;
}


sprintf
    

opd_s Com_sprintf_t = { 0x00298874, TOC };
int(*Com_sprintf)(char *dest, int size, const char *fmt, ...) = (int(*)(char *, int, char const *, ...))&Com_sprintf_t;




G_Client
    

int G_Client(int clientIndex, int Mod = 0x00)
{
return 0x110A280 + (0x3980 * clientIndex) + Mod;
}



Keyboard
    
char* KeyBoard(char* Title)
{
opd_s key = { 0x026F5BC, TOC };
void(*Run)(int, char*, char*, int, int, int) = (void(*)(int, char*, char*, int, int, int))&key;
Run(0, Title, "", 40, 0x72DCE8, 0x7239A0);
while (PS3::ReadInt32(0x73145C) != 0)
{
continue;
}
return PS3::ReadString(0x2380E22);
}//I know you can use the one in the cell but it crashes the game for me :Fa:


Spawn solid models
    
opd_s G_SetModel_t = { 0x01BEF5C, TOC };
void(*G_SetModel)(int clientIndex, const char* Model) = (void(*)(int, const char*))&G_SetModel_t;

opd_s G_Spawn_t = { 0x01C058C, TOC };
int(* G_Spawn)() = (int(*)())&G_Spawn_t;

opd_s SV_SetBrushModel_t = { 0x0022925C, TOC };
void(*SV_SetBrushModel)(int Entity) = (void(*)(int))&SV_SetBrushModel_t;

opd_s SP_Script_Model_t = { 0x01B6F68, TOC };
void(*SP_Script_Model)(int Entity) = (void(*)(int))&SP_Script_Model_t;

opd_s SV_UnlinkEntity_t = { 0x002377B8, TOC };
void(*SV_UnlinkEntity)(int Entity) = (void(*)(int))&SV_UnlinkEntity_t;

opd_s SV_linkEntity_t = { 0x00237848, TOC };
void(*SV_linkEntity)(int Entity) = (void(*)(int))&SV_linkEntity_t;

int SpawnEntity( float* Origin, float* Angles, const char* Model = "com_plasticcase_friendly", int Index = 2)
{
int Entity = (int)G_Spawn();
PS3::WriteFloat(Entity + 0x138, Origin, 3);
PS3::WriteFloat(Entity + 0x144, Angles, 3);
G_SetModel(Entity, Model);
SP_Script_Model(Entity);
SV_UnlinkEntity(Entity);
*(char*)(Entity + 0x101) = 4;
*(int*)(Entity + 0x8C) = Index;
SV_SetBrushModel(Entity);
SV_linkEntity(Entity);
return Entity;
}


FreezeClient
    
void FreezeClient(int clientIndex)
{
if(!Client[clientIndex].Frozen)
{
*(char*)((clientIndex * 0x3980) + Offsets::FreezeClient) = 0x3F;
iPrintlnBold(clientIndex, "Freeze bitch!");
Client[Client[clientIndex].ClientSelected].Frozen = true;
}
else
{
*(char*)((clientIndex * 0x3980) + Offsets::FreezeClient) = 0x00;
iPrintlnBold(clientIndex, "Move along ******!");
Client[Client[clientIndex].ClientSelected].Frozen = false;
}
}


kick with message
    
void KickWithMessage(int client, const char* Message)
{
opd_s kick = { 0x00223BD0, TOC };
int(*kickwmessage)(int client, const char* message) = (int(*)(int, const char*))&kick;
kickwmessage(client, Message);
}


Set Model
    
void SetModel(int client, const char* Model)
{
opd_s setmodel = {0x1BEF5C, TOC};
void(*G_SetModel)(int client, const char* model) = (void(*)(int, const char*))&setmodel;
G_SetModel((0xFCA280 + (client * 0x280)), Model);
}


No clip
    
void NoClip(int client)
{
if(!Client[client].NoClip)
{
*(char*)(0x0110D87F + (0x3980 * client)) = 0x02;
iPrintln(client, "NoClip: [ ^2Enabled ^7]");
Client[client].NoClip = true;
}
else
{
*(char*)(0x0110D87F + (0x3980 * client)) = 0x00;
iPrintln(client, "NoClip: [ ^1Disabled ^7]");
Client[client].NoClip = false;
}
}


GodMode
    
void GodMode(int client)
{
if(!Client[client].GodMode)
{
*(char*)(0x0FCA41E + (0x280 * client)) = 0xFF;
iPrintln(client, "Godmode: [ ^2Enabled ^7]");
Client[client].GodMode = true;
}
else
{
*(char*)(0x0FCA41E + (0x280 * client)) = 0x00;
iPrintln(client, "Godmode: [ ^1Disabled ^7]");
Client[client].GodMode = false;
}
}


PlayFX
    
opd_s index = { 0x1BEB6C, TOC };
int(*GetFXIndex)(const char* effect) = (int(*)(const char*))&index;

opd_s temp = { 0x1C0B7C, TOC };
int (*g_temp)(float* Origin, int effectIndex) = (int(*)(float*, int))&temp;

int PlayFX(float* Origin, char* Effect)
{
int EffectIndex = GetFXIndex(Effect);
int ent = g_temp(Origin, 0x56);
if (ent == 0)
return 0;
*(int*)(ent + 0xA0) = EffectIndex;
return ent;
}


BG_FindWeaponIndexForName
    
int BG_FindWeaponIndexForName(const char* Weapon)
{
opd_s GWI = { 0x3CFD0, TOC };
void(*ReturnIndex)(int buffer, const char* Weapon) = (void(*)(int, const char*))&GWI;
ReturnIndex(0x1100000, Weapon);
return *(int*)0x1100000;
}


Dvar_GetString
    
opd_s gs = { 0x002911A8, TOC };
const char*(*Dvar_GetString)(const char* Dvar) = (const char*(*)(const char*))&gs;


Get Mapname, HostName and GameMode
    
const char* MapName()
{
return Dvar_GetString("ui_mapname");
}

const char* GameMode()
{
return Dvar_GetString("ui_gametype");
}

const char* HostName()
{
return Dvar_GetString("sv_hostname");
}


G_GivePlayerWeapon + extras Smile
    
void GiveWeapon(int clientIndex, const char* Weapon, int Akimbo = 0)
{
int Index = BG_FindWeaponIndexForName(Weapon);
G_GivePlayerWeapon((int*)G_Client(clientIndex), Index, Akimbo);
Add_Ammo((int*)G_Entity(clientIndex), Index, 0, 9999, 1);
char buf[100];
Com_sprintf(buf, 100, "a %i \"", Index, "\"");
SV_GSSC(clientIndex, buf);
}


Useful Links
You must login or register to view this content.
You must login or register to view this content.
Last edited by OLDSCHOOLMODZHD ; 10-12-2014 at 05:46 PM. Reason: updated

The following 25 users say thank you to OLDSCHOOLMODZHD for this useful post:

-JM-, Absolute Zero, Boliberrys, EvilFerg, Freezy :D, Geo, ItsLollo1000, JackMods-, Jim Halpert, Joren, Krxxl, LaRip8, MrBeastMods, oStankyModz, SaberNGU, seanhellen, ShutTheCrunchUp, StonedYoda, Swaqq, TheGreenPlanet, Laser, xProvXKiller, zRayz-
08-11-2014, 09:57 PM #2
-JM-
Space Ninja
Originally posted by OLDSCHOOLMODZHD View Post
It seems no one else is gonna do it so I will take the pleasure Smile Hopefully this gets some things in motion, I will try my best to update this if you want anything added post it below.

TOC = 0x0072DCE8 //thanks to seb

SV_GameSendServerCommand
    
opd_s SV = { 0x228FA8, TOC };void(*SV_GSSC)(int client, int type, char* cmd) = (void(*)(int, int, char*))&SV;


Some useful SV_GSSC functions
    
void iPrintlnBold(int client, char* text)
{
char buf[100];
strcpy(buf, "c \"");
strcat(buf, text);
SV_GSSC(client, 0, buf);
}

void iPrintln(int client, char* text)
{
char buf[100];
strcpy(buf, "f \"");
strcat(buf, text);
SV_GSSC(client, 0, buf);
}

void SetVision(int client, char* Vision)
{
char buf[100];
strcpy(buf, "j \"");
strcat(buf, Vision);
SV_GSSC(client, 0, buf);
}

void SetFOV(int client, char* fov)
{
char buf[100];
strcpy(buf, "q cg_fov \"");
strcat(buf, fov);
SV_GSSC(client, 0, buf);
}

void KickWithMessage(int client, char* Message)
{
char buf[100];
strcpy(buf, "r \"");
strcat(buf, Message);
SV_GSSC(client, 0, buf);
}


cl_InGame
    
bool InGame()
{
if (*(char*)0x018d4c64 != 1)
return false;
return true;
}


Useful Links
You must login or register to view this content.
You must login or register to view this content.

I might not be able to update too often as I am moving and I don't know exactly when our internet will be put in but enjoy whats here Smile


Great I hope you keep updating ((if/when) you can) this thread would help beginners

The following 2 users say thank you to -JM- for this useful post:

OLDSCHOOLMODZHD, XILE_
08-12-2014, 02:53 PM #3
Can you Please release the Non Host Button Monitoring c++ for mw3 mine dont work :

    namespace ButtonMonitoring
{
int LocalButtons = 0xD1CD8;
enum Buttons
{
X = 1,
O = 2,
Square = 3,
Triangle = 4,
L1 = 5,
R1 = 6,
Start = 14,
Select = 15,
L3 = 16,
R3 = 17,
L2 = 18,
R2 = 19,
UP = 20,
DOWN = 21,
LEFT = 22,
RIGHT = 23,
StickUP = 28,
StickDOWN = 29,
StickLEFT = 30,
StickRIGHT = 31,
};
bool ButtonPressed(Buttons Button)
{
return (*(int*)(LocalButtons + Button) != 0);
}
}
08-17-2014, 03:23 PM #4
Yo OLDSCHOOLMODZHD you got skype bro, And getPlayerState would be really useful thanks bro Winky Winky
08-18-2014, 04:23 AM #5
Originally posted by Connerg123 View Post
Yo OLDSCHOOLMODZHD you got skype bro, And getPlayerState would be really useful thanks bro Winky Winky


Smile done
08-18-2014, 08:43 PM #6
Originally posted by OLDSCHOOLMODZHD View Post
Smile done


Sick bro you got skype i May need some more i aint pro at C++ yet Happy so i may need some more scripts so i dont want to bump your thread asking for scripts Happy thanks bro Winky Winky
09-01-2014, 07:06 PM #7
Updated: added spawn solid models thanks to GMTPS3 for the c# version.

The following 2 users say thank you to OLDSCHOOLMODZHD for this useful post:

JackMods-, Swaqq
09-02-2014, 09:07 PM #8
-JM-
Space Ninja
Originally posted by OLDSCHOOLMODZHD View Post
It seems no one else is gonna do it so I will take the pleasure Smile Hopefully this gets some things in motion, I will try my best to update this if you want anything added post it below.

TOC = 0x0072DCE8 //thanks to seb

SV_GameSendServerCommand
    
opd_s SV = { 0x228FA8, TOC };void(*SV_GSSC)(int client, int type, char* cmd) = (void(*)(int, int, char*))&SV;


Some useful SV_GSSC functions
    
void iPrintlnBold(int client, char* text)
{
char buf[100];
strcpy(buf, "c \"");
strcat(buf, text);
SV_GSSC(client, 0, buf);
}

void iPrintln(int client, char* text)
{
char buf[100];
strcpy(buf, "f \"");
strcat(buf, text);
SV_GSSC(client, 0, buf);
}

void SetVision(int client, char* Vision)
{
char buf[100];
strcpy(buf, "j \"");
strcat(buf, Vision);
SV_GSSC(client, 0, buf);
}

void SetFOV(int client, char* fov)
{
char buf[100];
strcpy(buf, "q cg_fov \"");
strcat(buf, fov);
SV_GSSC(client, 0, buf);
}

void KickWithMessage(int client, char* Message)
{
char buf[100];
strcpy(buf, "r \"");
strcat(buf, Message);
SV_GSSC(client, 0, buf);
}


cl_InGame
    
bool InGame()
{
if (*(char*)0x018d4c64 != 1)
return false;
return true;
}


sprintf
    

opd_s Com_sprintf_t = { 0x00298874, TOC };
int(*Com_sprintf)(char *dest, int size, const char *fmt, ...) = (int(*)(char *, int, char const *, ...))&Com_sprintf_t;




G_Client
    

int G_Client(int clientIndex, int Mod = 0x00)
{
return 0x110A280 + (0x3980 * clientIndex) + Mod;
}



Com_Sprintf
    
opd_s Com_sprintf_t = { 0x298874, TOC };
int(*Com_sprintf)(char *dest, int size, const char *fmt, ...) = (int(*)(char* , int, char const *, ...))&Com_sprintf_t;


Spawn solid models
    
opd_s G_SetModel_t = { 0x01BEF5C, TOC };
void(*G_SetModel)(int clientIndex, const char* Model) = (void(*)(int, const char*))&G_SetModel_t;

opd_s G_Spawn_t = { 0x01C058C, TOC };
int(* G_Spawn)() = (int(*)())&G_Spawn_t;

opd_s SV_SetBrushModel_t = { 0x0022925C, TOC };
void(*SV_SetBrushModel)(int Entity) = (void(*)(int))&SV_SetBrushModel_t;

opd_s SP_Script_Model_t = { 0x01B6F68, TOC };
void(*SP_Script_Model)(int Entity) = (void(*)(int))&SP_Script_Model_t;

opd_s SV_UnlinkEntity_t = { 0x002377B8, TOC };
void(*SV_UnlinkEntity)(int Entity) = (void(*)(int))&SV_UnlinkEntity_t;

opd_s SV_linkEntity_t = { 0x00237848, TOC };
void(*SV_linkEntity)(int Entity) = (void(*)(int))&SV_linkEntity_t;

int SpawnEntity( float* Origin, float* Angles, const char* Model = "com_plasticcase_friendly", int Index = 2)
{
int Entity = (int)G_Spawn();
PS3::WriteFloat(Entity + 0x138, Origin, 3);
PS3::WriteFloat(Entity + 0x144, Angles, 3);
G_SetModel(Entity, Model);
SP_Script_Model(Entity);
SV_UnlinkEntity(Entity);
*(char*)(Entity + 0x101) = 4;
*(int*)(Entity + 0x8C) = Index;
SV_SetBrushModel(Entity);
SV_linkEntity(Entity);
return Entity;
}


Useful Links
You must login or register to view this content.
You must login or register to view this content.

I might not be able to update too often as I am moving and I don't know exactly when our internet will be put in but enjoy whats here Smile

Solid model Thank You !!!!!
09-03-2014, 12:50 AM #9
Originally posted by JM
Solid model Thank You !!!!!


:p welcome
09-03-2014, 05:02 AM #10
Originally posted by OLDSCHOOLMODZHD View Post
It seems no one else is gonna do it so I will take the pleasure Smile Hopefully this gets some things in motion, I will try my best to update this if you want anything added post it below.

TOC = 0x0072DCE8 //thanks to seb

SV_GameSendServerCommand
    
opd_s SV = { 0x228FA8, TOC };void(*SV_GSSC)(int client, int type, char* cmd) = (void(*)(int, int, char*))&SV;


Some useful SV_GSSC functions
    
void iPrintlnBold(int client, char* text)
{
char buf[100];
strcpy(buf, "c \"");
strcat(buf, text);
SV_GSSC(client, 0, buf);
}

void iPrintln(int client, char* text)
{
char buf[100];
strcpy(buf, "f \"");
strcat(buf, text);
SV_GSSC(client, 0, buf);
}

void SetVision(int client, char* Vision)
{
char buf[100];
strcpy(buf, "j \"");
strcat(buf, Vision);
SV_GSSC(client, 0, buf);
}

void SetFOV(int client, char* fov)
{
char buf[100];
strcpy(buf, "q cg_fov \"");
strcat(buf, fov);
SV_GSSC(client, 0, buf);
}

void KickWithMessage(int client, char* Message)
{
char buf[100];
strcpy(buf, "r \"");
strcat(buf, Message);
SV_GSSC(client, 0, buf);
}


cl_InGame
    
bool InGame()
{
if (*(char*)0x018d4c64 != 1)
return false;
return true;
}


sprintf
    

opd_s Com_sprintf_t = { 0x00298874, TOC };
int(*Com_sprintf)(char *dest, int size, const char *fmt, ...) = (int(*)(char *, int, char const *, ...))&Com_sprintf_t;




G_Client
    

int G_Client(int clientIndex, int Mod = 0x00)
{
return 0x110A280 + (0x3980 * clientIndex) + Mod;
}



Com_Sprintf
    
opd_s Com_sprintf_t = { 0x298874, TOC };
int(*Com_sprintf)(char *dest, int size, const char *fmt, ...) = (int(*)(char* , int, char const *, ...))&Com_sprintf_t;


Spawn solid models
    
opd_s G_SetModel_t = { 0x01BEF5C, TOC };
void(*G_SetModel)(int clientIndex, const char* Model) = (void(*)(int, const char*))&G_SetModel_t;

opd_s G_Spawn_t = { 0x01C058C, TOC };
int(* G_Spawn)() = (int(*)())&G_Spawn_t;

opd_s SV_SetBrushModel_t = { 0x0022925C, TOC };
void(*SV_SetBrushModel)(int Entity) = (void(*)(int))&SV_SetBrushModel_t;

opd_s SP_Script_Model_t = { 0x01B6F68, TOC };
void(*SP_Script_Model)(int Entity) = (void(*)(int))&SP_Script_Model_t;

opd_s SV_UnlinkEntity_t = { 0x002377B8, TOC };
void(*SV_UnlinkEntity)(int Entity) = (void(*)(int))&SV_UnlinkEntity_t;

opd_s SV_linkEntity_t = { 0x00237848, TOC };
void(*SV_linkEntity)(int Entity) = (void(*)(int))&SV_linkEntity_t;

int SpawnEntity( float* Origin, float* Angles, const char* Model = "com_plasticcase_friendly", int Index = 2)
{
int Entity = (int)G_Spawn();
PS3::WriteFloat(Entity + 0x138, Origin, 3);
PS3::WriteFloat(Entity + 0x144, Angles, 3);
G_SetModel(Entity, Model);
SP_Script_Model(Entity);
SV_UnlinkEntity(Entity);
*(char*)(Entity + 0x101) = 4;
*(int*)(Entity + 0x8C) = Index;
SV_SetBrushModel(Entity);
SV_linkEntity(Entity);
return Entity;
}


Useful Links
You must login or register to view this content.
You must login or register to view this content.

I might not be able to update too often as I am moving and I don't know exactly when our internet will be put in but enjoy whats here Smile


Sick! Just seen this now, Thanks Bro <3 big help

The following user thanked oStankyModz for this useful post:

OLDSCHOOLMODZHD

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo