Post: [1.16] GSC functions codes list | Random Scripts
03-09-2015, 06:58 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Ok so since I released how to call raw gsc functions, I thought, why not a gsc codes list?

Make sure you call this after each function. Scr_ClearOutParams();

    THIS IS UPDATED AFTER SHARKS POST

void Scr_ClearOutParams(){
VariableValue* Top;
uint Params = *(int*)(0x13C3140 + 0x1Cool Man (aka Tustin);
*(int*)(0x13C3140 + 0x1Cool Man (aka Tustin) = 0;
for(Top -= Params; Params; --Params){
((void(*)(int, VariableUnion))&ParseAddr(0x2DA724))(Top->type, Top->u); // RemoveRefToObject
--Top;
}
return;
}


GScr_Earthquake:

    void GScr_Earthquake(float scale, float duration, float* source, float radius){
Scr_AddFloat(radius);
Scr_AddVector(source);
Scr_AddFloat(duration);
Scr_AddFloat(scale);
Scr_SetParameters(4); //See how I set the parameter number after I finish calling the Scr_Adds?
((void(*)())&ParseAddr(0x268B60))(); //Call the actual function
//((void(*)(int))&ParseAddr(0x268B60))(ClientID << 16); //Only call this one if the one above doesn't work.
Scr_ClearOutParams();
}


Scr_PlayFX:

    void Scr_PlayFX(const char* EffectId, float* Position, float* Forward = 0, float* Up = 0){
Scr_AddVector(Up);
Scr_AddVector(Forward);
Scr_AddVector(Position);
Scr_AddInt(((int(*)(const char*))&ParseAddr(0x324D0))(EffectId));
Scr_SetParameters(4);
((void(*)())&ParseAddr(0x2732D4))();
Scr_ClearOutParams();
}


Scr_MagicBullet:

    void Scr_MagicBullet(int ClientID, const char* Bullet, float* Start, float* End){
Scr_AddEntity(GetEntity(ClientID));
Scr_AddVector(End);
Scr_AddVector(Start);
Scr_AddString(Bullet);
Scr_SetParameters(4);
((void(*)())&ParseAddr(0x264800))();
Scr_ClearOutParams();
}


Scr_PhysicsExplosionCylinder:

    void Scr_PhysicsExplosionCylinder(float* Origin, float OuterRadius, float InnerRadius, float Magnitude){
Scr_AddFloat(Magnitude);
Scr_AddFloat(InnerRadius);
Scr_AddFloat(OuterRadius);
Scr_AddVector(Origin);
Scr_SetParameters(4);
((void(*)())&ParseAddr(0x273770))();
//If it doesn't work, try ((void(*)(int))&ParseAddr(0x273770))(ClientID << 16);
Scr_ClearOutParams();
}


GScr_SetMiniMap:

    void GScr_SetMiniMap(const char* Material, UpperLeftX, UpperLeftY, LowerRightX, LowerRightY){
Scr_AddFloat(LowerRightY);
Scr_AddFloat(LowerRightX);
Scr_AddFloat(UpperLeftY);
Scr_AddFloat(UpperLeftX);
Scr_AddString(Material);
Scr_SetParameters(5);
Scr_ClearOutParams();
}

___________________________Random functions___________________________

VectorScale:

    float* VectorScale(float* Angle, int Scale){
float Result[] = { Angle[0]* Scale, Angle[1]* Scale, Angle[2]* Scale };
return Result;
}


AnglesToForward:

    #define AngleVectors(Angle, Forward, Right, Up) ((void(*)(const float*, float*, float*, float*))&ParseAddr(0x38020Cool Man (aka Tustin))(Angle, Forward, Right, Up)

float* AnglesToForward(const float* Angle){
float Forward[3];
AngleVectors(Angle, Forward, 0, 0);
return Forward;//If this doesn't work, return Angle;
}



GetEye: //Equivalent to GetTagOrigin("tag_eye")

    #define G_GetPlayerViewOrigin(PS, Origin) ((void(*)(int, float*))&ParseAddr(0x231884))(PS, Origin)

float* GetEye(unsigned int ClientID){
float Org[3];
G_GetPlayerViewOrigin(G_Client(ClientID), Org);
return Org;
}


GetCursorPos:

    

#define G_LocationalTrace(Trace, Start, End, PassEnt, ContentMask, PriorityMap) ((void(*)(trace_t*, const float*, const float*, int, int, char*))&ParseAddr(0x250FA4))(Trace, Start, End, PassEnt, ContentMask, PriorityMap)
#define Trace_GetEntityHitId(Trace) ((ushort(*)(trace_t*))&ParseAddr(0x2A9750))(Trace)

struct BulletTraceType{
short entnum;
float Pos[3];
};

struct trace_t{//Xx jAmes t xX
float fraction;
byte Buffer[0x28];
};

void BulletTrace(BulletTraceType* Type, float* Start, float* End, unsigned int ClientID){//Xx jAmes t xX
trace_t trace;
G_LocationalTrace(&trace, Start, End, ClientID, 0x80A831, 0);
for(unsigned char i = 0; i < 3; i++) Type->Pos[i] = (((End[i]-Start[i]) * trace.fraction) + Start[i]);
short Entity = Trace_GetEntityHitId(&trace) & 0xFFFF;
if(Entity < 0x7FE) Type->entnum= Entity;
}

float* GetCursorPos(unsigned int ClientID){
BulletTraceType Type;
BulletTrace(&Type, GetEye(), VectorScale(AnglesToForward((float*)(G_Client(ClientID) + 0x184), 100000), ClientID);
return Type.Pos;
}


___________________________Hooks that you can use___________________________

VM_Execute:

Address location - 0x2E6444

    

int VM_ExecuteStub(){
__asm("li %r3, 0x4");
}

int VM_Execute(){
//Do stuff here
return VM_ExecuteStub();
}
What you can use this for: A loop? Calling Scr_Adds?


Scr_Notify:

Address location - 0x28B73C

    

int Scr_NotifyStub(){
__asm("li %r3, 0x5");
}
#define SL_ConvertToString(StringValue) ((const char*(*)(unsigned short))&ParseAddr(0x2D894C))(StringValue)
#define iClient *(short*)Entity

void Scr_Notify(int Entity, short StringValue, unsigned int Paramcount){
/*
if(!strcmp(SL_ConvertToString(StringValue), "weapon_fired")) MagicBullet(iClient, GetEye(), GetCursorPos());
*/
return Scr_NotifyStub(Entity, StringValue, Paramcount);
}

What you can use this for: Calling Scr_Adds | Waitill. Only use this if you're having crashing problems with VM_Notify



I'll update this more when I find more functions.
Last edited by Ambition sG ; 03-27-2015 at 09:16 PM.

The following 14 users say thank you to Ambition sG for this useful post:

01cedricv2, BaSs_HaXoR, Father Luckeyy, FusionIsDaName, gοd, GFM, ImManga, kiwi_modz, LBK, lutsch1234, Stunz, Swaqq, TotalModzHD, XenonLegend
03-09-2015, 07:50 PM #2
Swaqq
Professional Thanker
welp that saved me lots of time from doing this on mw2 nice post!
03-09-2015, 09:24 PM #3
GFM
Can’t trickshot me!
nice release
03-09-2015, 10:38 PM #4
mariokilla23
Vault dweller
What is the reason of this release? I have seen these same functions on the gsc managed code list.
03-09-2015, 11:41 PM #5
They say the mind can withstand 1000000000000000 of thoughts. The thoughts of the methods to use to insult you exceed that limit and caused my mind to blow. Sorry, but if you don't know what this is, please look at my other thread here.

You must login or register to view this content.
03-09-2015, 11:51 PM #6
Originally posted by mariokilla23 View Post
What is the reason of this release? I have seen these same functions on the gsc managed code list.


Can I has you GSC injector m9? McCoyCool Troll
03-09-2015, 11:54 PM #7
iMoD1998
Pokemon Trainer
Originally posted by mariokilla23 View Post
What is the reason of this release? I have seen these same functions on the gsc managed code list.


this is calling GSC from memory Not Happy or Sad

The following user thanked iMoD1998 for this useful post:

Sabotage
03-10-2015, 12:17 AM #8
mariokilla23
Vault dweller
Originally posted by iMoD1998 View Post
this is calling GSC from memory Not Happy or Sad


Which is exactly why it was put into the gsc managed code list mate Not Happy or Sad
03-10-2015, 01:19 AM #9
Are you serious right now lol. You obviously don't know what this is if you think this should be in the GSC list. This isn't GSC, yes I'm calling GSC functions, but I'm not writing gsc. Know the difference -.-

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

FusionIsDaName, kiwi_modz
03-10-2015, 05:20 AM #10
iMoD1998
Pokemon Trainer
Originally posted by mariokilla23 View Post
Which is exactly why it was put into the gsc managed code list mate Not Happy or Sad


As ethernet said its memory not GSC scripting MATE

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo