Hello guys
A new tutorial of things that you arent going to use,
The first command: PhysicsLaunchClient, this will launch an object with a vector force from a origin, you have to call it on a entity, if you call it on a player, you will see weird player fails,
Example:
Now the second command: PointOnSegmentNearestToPoint, this is a maths command. I am not good at explaining this and worse in english, , the first 2 parametres you put in the function make a segment and then from the 3 parametre it calculates the closest point on the segment to the point you put.
Example with picture,
Now the command AssertMsg, it will make the game crash like sintax errors with a error you make
Example:
Now the command WaitFrame, is a professional way of waiting 0.05 seconds(1 frame), , you use it like this:
The next are 2 functions to get a tag origin + an extra one that is similar:
Now 2 interesting math commands: Min and Max, they will return the minimum value beetween 2 values or the max.
Work like this:
Examples:
More precaching Commands, :
Now, dvar getting commands:
Also a last command, Cointoss, is used like a coin throw or a randomint(2)
Thats all guys, and
A new tutorial of things that you arent going to use,
The first command: PhysicsLaunchClient, this will launch an object with a vector force from a origin, you have to call it on a entity, if you call it on a player, you will see weird player fails,
Code:
object PhysicsLaunchClient(origin,vector);
Example:
Code:
OMA PhysicsLaunchClient(self.origin,(90,45,130));
Now the second command: PointOnSegmentNearestToPoint, this is a maths command. I am not good at explaining this and worse in english, , the first 2 parametres you put in the function make a segment and then from the 3 parametre it calculates the closest point on the segment to the point you put.
Code:
point = PointOnSegmentNearestToPoint(a,b,point);
Example with picture,
Code:
A________O__________B This is an example on: point = PointOnSegmentNearestToPoint(A,B,P); //It will return the point O
|
|
|
P
Now the command AssertMsg, it will make the game crash like sintax errors with a error you make
Code:
AssertMsg("message");
Example:
Code:
AssertMsg("This mod fails");
Now the command WaitFrame, is a professional way of waiting 0.05 seconds(1 frame), , you use it like this:
Code:
self GiveWeapon("onemanarmy_mp",0,true);
WaitFrame();
self SwitchToWeapon("onemanarmy_mp",0,true);
The next are 2 functions to get a tag origin + an extra one that is similar:
Code:
self GetTagOrigin("tag name"); //gets the tag origin
self GetTagAngles("tag name"); //gets the tag angles
self GetEye(); //gets the tag_eye origin
Now 2 interesting math commands: Min and Max, they will return the minimum value beetween 2 values or the max.
Work like this:
Code:
maxnumber = Max(number1,number2);
minnumber = Min(number1,number2);
Examples:
Code:
maxnumber = Max(5,1); //maxnumber will be equal to 5
minnumber = Min(1337,50); //minnumber will be equal to 50
More precaching Commands, :
Code:
PrecacheStatusIcon("icon name");
PrecacheString("string name");
PrecacheLeaderboards("leaderboards"); // this one is 100% useless
PrecacheLocationSelector("location selector icon name");
Now, dvar getting commands:
Code:
getDvar(dvar name);
getDvarVector(dvar name);
getDvarInt(dvar name);
getDvarFloat(dvar name);
Also a last command, Cointoss, is used like a coin throw or a randomint(2)
Code:
if(cointoss())
//something
Thats all guys, and