Post: Am I right?
12-30-2010, 09:09 PM #1
Shieldsy
I <3 Feeder.
(adsbygoogle = window.adsbygoogle || []).push({});
    MonitorLeft(){
self endon("disconnect");
self endon("death");
self notifyOnPlayerCommand("dpad_left","+actionslot 3");
for(;Winky Winky{
self waittill("dpad_left");
self thread maps\mp\moss\MossysFunctions :: toggleMakeGod();
}}


Ok so I am learning to code and make patches, so i need to learn what the code means. So, please be patient with me, amd I right with what I am saying here...

MonitorLeft - the thread name?
Self endon disconnect, self endon death - when this action ends
self notifyOnPlayerCommand - Not entirely sure tbh
self waittill - Wait till the player does that action stated
self thread maps\mp\moss\MossyFunctions - Where the MakeGod thread is?

Thanks for the help Happy

P.s. I am not actually trying to use this code, I just copied it from Chrom3's thread because it got me thinking Smile
(adsbygoogle = window.adsbygoogle || []).push({});
12-30-2010, 09:27 PM #2
Chrome Playa
Chrome Gaming Reloaded
Originally posted by DarloDude9 View Post
    MonitorLeft(){
self endon("disconnect");
self endon("death");
self notifyOnPlayerCommand("dpad_left","+actionslot 3");
for(;Winky Winky{
self waittill("dpad_left");
self thread maps\mp\moss\MossysFunctions :: toggleMakeGod();
}}


Ok so I am learning to code and make patches, so i need to learn what the code means. So, please be patient with me, amd I right with what I am saying here...

MonitorLeft - the thread name?
Self endon disconnect, self endon death - when this action ends
self notifyOnPlayerCommand - Not entirely sure tbh
self waittill - Wait till the player does that action stated
self thread maps\mp\moss\MossyFunctions - Where the MakeGod thread is?

Thanks for the help Happy

P.s. I am not actually trying to use this code, I just copied it from Chrom3's thread because it got me thinking Smile


That will work but you need a thread called toggleMakeGod that you need to put in Mossysfunctions.gsc

    
toggleMakeGod
if(self.god == 0)
{
self.god = 1;
self.maxhealth=999;self.health=999;
self iPrintln("^2God Mode ON");
}
else
{
self.god = 0;
self.maxhealth=100;self.health=100;
self iPrintln("^1God Mode OFF");
}


And then put this in the onPlayerSpawned under host

    self.god = 0;
12-30-2010, 09:29 PM #3
Shieldsy
I <3 Feeder.
Originally posted by chr0m3playa View Post
That will work but you need a thread called toggleMakeGod that you need to put in Mossysfunctions.gsc

    
toggleMakeGod
if(self.god == 0)
{
self.god = 1;
self.maxhealth=999;self.health=999;
self iPrintln("^2God Mode ON");
}
else
{
self.god = 0;
self.maxhealth=100;self.health=100;
self iPrintln("^1God Mode OFF");
}


And then put this in the onPlayerSpawned under host

    self.god = 0;


No I am not trying to put the code in a patch, I am just asking if I am correct in saying what these things mean...
12-30-2010, 09:39 PM #4
Chrome Playa
Chrome Gaming Reloaded
Originally posted by DarloDude9 View Post
No I am not trying to put the code in a patch, I am just asking if I am correct in saying what these things mean...


Yes the .gsc starts off by saying ok when the player spawns run the thread MonitorLeft. Then when the thread starts, its saying that if the player disconnects from the lobby, then end the thread. It also says that if the player dies, end the thread. Then, it is going to take note of the command dpad_left just in case it is linked to another thread (which it is). Then it says for when that command is used, run the thread located in Mossysfunctions called toggleMakeGod.

The following user thanked Chrome Playa for this useful post:

Shieldsy
12-30-2010, 09:42 PM #5
Shieldsy
I <3 Feeder.
Originally posted by chr0m3playa View Post
Yes the .gsc starts off by saying ok when the player spawns run the thread MonitorLeft. Then when the thread starts, its saying that if the player disconnects from the lobby, then end the thread. It also says that if the player dies, end the thread. Then, it is going to take note of the command dpad_left just in case it is linked to another thread (which it is). Then it says for when that command is used, run the thread located in Mossysfunctions called toggleMakeGod.


Ok, I think I get you so far Smile

(I would thank but I have ran out of rep this 24 hours, I will come back later and do it =D )

So what does the notifyonplayercommand mean? Smile
12-30-2010, 09:50 PM #6
Chrome Playa
Chrome Gaming Reloaded
Originally posted by DarloDude9 View Post
Ok, I think I get you so far Smile

(I would thank but I have ran out of rep this 24 hours, I will come back later and do it =D )

So what does the notifyonplayercommand mean? Smile


Its basically just saying "Ok pay attention to the Left D-Pad command."
12-31-2010, 12:05 AM #7
Shieldsy
I <3 Feeder.
Originally posted by chr0m3playa View Post
Its basically just saying "Ok pay attention to the Left D-Pad command."


Ok, another example Smile

    OnPlayerSpawned () {

self endon ("disconnect");
self endon ("death");
wait "5"
self.DoGod ();
wait "2"
self.InfAmmo();
}


Ok when the player spawns it will wait 5 seconds, give them god mode (obv somewhere else i would do the DoGod() thread) then it would wait 2 seconds then do the InfAmmo() thread. (Obv that would be someone else aswell)

Feel free to be harsh in your criticism, but constructive Smile
12-31-2010, 12:49 AM #8
Chrome Playa
Chrome Gaming Reloaded
Originally posted by DarloDude9 View Post
Ok, another example Smile

    OnPlayerSpawned () {

self endon ("disconnect");
self endon ("death");
wait "5"
self.DoGod ();
wait "2"
self.InfAmmo();
}


Ok when the player spawns it will wait 5 seconds, give them god mode (obv somewhere else i would do the DoGod() thread) then it would wait 2 seconds then do the InfAmmo() thread. (Obv that would be someone else aswell)

Feel free to be harsh in your criticism, but constructive Smile


I wouldn't do
    self.DoGod();

If I where to do a thread I would do
    self thread DoGod();
12-31-2010, 12:51 AM #9
Shieldsy
I <3 Feeder.
Originally posted by chr0m3playa View Post
I wouldn't do
    self.DoGod();

If I where to do a thread I would do
    self thread DoGod();


And the reason for this is?
Thanks for all this help btw Smile
12-31-2010, 12:59 AM #10
Chrome Playa
Chrome Gaming Reloaded
Originally posted by DarloDude9 View Post
And the reason for this is?
Thanks for all this help btw Smile


That way it knows your initializing a thread.
You would use self.DoGod if you were talking about a state of being

For example, a typical God Mode thread starts off like this:
    doGod()
self.GodMode = 1;


Then, in the onPlayerSpawned, you would have this:

    self.GodMode = 0;

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo