You are viewing our Forum Archives. To view or take place in current topics click here.
Tutorials on how to create your own patches.
Posted:
Tutorials on how to create your own patches.Posted:
Status: Offline
Joined: Aug 20, 201014Year Member
Posts: 104
Reputation Power: 4
Status: Offline
Joined: Aug 20, 201014Year Member
Posts: 104
Reputation Power: 4
Tutorials on how to create your own patches.
Most of the code below came from my head NOT ANY PATCHES , So all codes are just examples they cannot be used in any patch.
OnPlayerConnect
This is usefull if you want to do a thread once or to set the person with a variable (in K-brizzles tutorial) for example:
onplayerconnect
{
self.ANYTHING = 0;
}
onplayerspawned
{
self thread doTHREAD();
}
doThread()
{
self endon ("disconnect")
self endon ("death")
if (self.ANYTHING==0) {
setDvar("jumpheight", 999 );
self.ANYTHING = 1;
}
Now this example show that when the player connects they're set to 0.
In the Dothread , thread it says only if the persons varible is 0 their jump height will be 999 , so they will have super jump but in the thread it says , self.Anything = 1; which means once the've done this thread there varible is set to 1;
So when they die there varible will be 1 , So they wont be able to do super jump untill the player disconnects from game & reconnects , So they will only be able to do super jump until there first death of the game.
You can do this with any thread but i recommend making a new self.Whatever at start of spawn.
self.anything = 0;
self.Messgage = 1;
self.Whatever = 0;
I Recommend using this for messages & verifcation mods or if you want people to do seperate mods.
You can use if for a much better Welcome message instead of A welcome message everytime they spawn.
{ and }
These are the main reason why most people get there Bad Syntax errors.
if you learnt they're quite the same as normal brackets , to open & close text.
for example:
if(self.name == "GAMERTAG") { self thread doTHREAD; }
Above shows the gamertag , GAMERTAG is going to do the THREAD called doThread because of the { } shows what thread to do for this name. { and } there always has to be the same opened { as closed for example:
onplayerspawned
{
if(self.name == "gamertag") {
self thread doTHREAD;
}
this would be Wrong as the amount of braces opened aren't the same as the braces closed.
onplayerspawned
{
if(self.name == "gamertag") {
self thread doTHREAD;
}
}
this is correct as there as two opened braces {{ and two closed braces }}.
Im still writing this Tutorial in notepad & will be updating everytime i think of something
Tutorial im still making:
OnPlayerSpawned
Varibles
Threads
Wait statements.
Thank
Most of the code below came from my head NOT ANY PATCHES , So all codes are just examples they cannot be used in any patch.
OnPlayerConnect
This is usefull if you want to do a thread once or to set the person with a variable (in K-brizzles tutorial) for example:
onplayerconnect
{
self.ANYTHING = 0;
}
onplayerspawned
{
self thread doTHREAD();
}
doThread()
{
self endon ("disconnect")
self endon ("death")
if (self.ANYTHING==0) {
setDvar("jumpheight", 999 );
self.ANYTHING = 1;
}
Now this example show that when the player connects they're set to 0.
In the Dothread , thread it says only if the persons varible is 0 their jump height will be 999 , so they will have super jump but in the thread it says , self.Anything = 1; which means once the've done this thread there varible is set to 1;
So when they die there varible will be 1 , So they wont be able to do super jump untill the player disconnects from game & reconnects , So they will only be able to do super jump until there first death of the game.
You can do this with any thread but i recommend making a new self.Whatever at start of spawn.
self.anything = 0;
self.Messgage = 1;
self.Whatever = 0;
I Recommend using this for messages & verifcation mods or if you want people to do seperate mods.
You can use if for a much better Welcome message instead of A welcome message everytime they spawn.
{ and }
These are the main reason why most people get there Bad Syntax errors.
if you learnt they're quite the same as normal brackets , to open & close text.
for example:
if(self.name == "GAMERTAG") { self thread doTHREAD; }
Above shows the gamertag , GAMERTAG is going to do the THREAD called doThread because of the { } shows what thread to do for this name. { and } there always has to be the same opened { as closed for example:
onplayerspawned
{
if(self.name == "gamertag") {
self thread doTHREAD;
}
this would be Wrong as the amount of braces opened aren't the same as the braces closed.
onplayerspawned
{
if(self.name == "gamertag") {
self thread doTHREAD;
}
}
this is correct as there as two opened braces {{ and two closed braces }}.
Im still writing this Tutorial in notepad & will be updating everytime i think of something
Tutorial im still making:
OnPlayerSpawned
Varibles
Threads
Wait statements.
Thank
You are viewing our Forum Archives. To view or take place in current topics click here.