UnhappyMod editting help!

Posts 115 of 27 · Page 1 of 2
Mod editting help!
Hey, before I start writing this I did do research and didn't find much.

Ok, I like to edit mods to my personally tastes since I'm not very good at gsc coding. So I need some help on some things/peices of code... I'll start with the first peice.

Code:
doHostcheck()
{	      
        if (self.name=="*********" || self.name=="*********" || self.name=="*********")
 
	{
		self thread doKillstreakcycle();
		self thread givePerk();
                self thread doInvis();
                self thread doUfo();
                self takeWeapon("flash_grenade_mp");
                self takeWeapon("smoke_gernade_mp");
                self takeWeapon("concussion_gernade_mp");
            	self freezeControlsWrapper( false );
		self setclientDvar( "cg_objectiveText", "");
                self resetspreadoverride();
		wait 3;
		self thread maps\mp\gametypes\_hud_message::hintMessage("Press ^2[{+actionslot 2}] ^7for Killstreaks!");
		self thread maps\mp\gametypes\_hud_message::hintMessage("Press ^2[{+actionslot 1}] ^7for every Perk!");
                self thread maps\mp\gametypes\_hud_message::hintMessage("Press ^2[{+smoke}] ^7for Invisiblity!");
		self thread maps\mp\gametypes\_hud_message::hintMessage("Press ^2[{+actionslot 3}] ^7for UFO Mode!");
1. About that part... My invisible key is +smoke and uses a gernade. Well I want to get rid of all the gernades for the sake of time... I tried at least 2-3 things but either ends up in syntax error or nothing happens at all. A code for this would be nice

Code:
givePerk()
{
        self endon ( "disconnect" );
        self endon ( "death" );
        self notifyOnPlayerCommand( "[{+actionslot1}]", "+actionslot 1" );
                                while ( 1 )
                                {
                self waittill( "[{+actionslot1}]" );
                self maps\mp\perks\_perks::givePerk("specialty_fastreload");
		self maps\mp\perks\_perks::givePerk("specialty_extendedmelee");
		self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
		self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
		self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
		self maps\mp\perks\_perks::givePerk("specialty_selectivehearing");
		self maps\mp\perks\_perks::givePerk("specialty_heartbreaker");
		self maps\mp\perks\_perks::givePerk("specialty_coldblooded");
		self maps\mp\perks\_perks::givePerk("specialty_quickdraw");
		self maps\mp\perks\_perks::givePerk("specialty_marathon");
		self maps\mp\perks\_perks::givePerk("specialty_extendedmags");
		self maps\mp\perks\_perks::givePerk("specialty_scavenger");
		self maps\mp\perks\_perks::givePerk("specialty_jumpdive");
		self maps\mp\perks\_perks::givePerk("specialty_extraammo");
		self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
		self maps\mp\perks\_perks::givePerk("specialty_quieter");
		self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
		self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
                self maps\mp\perks\_perks::givePerk("specialty_rof");
                self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
                self maps\mp\perks\_perks::givePerk("specialty_detectexplosive");
                self maps\mp\perks\_perks::givePerk("specialty_lightweight");
                self maps\mp\perks\_perks::givePerk("specialty_spygame");
                self maps\mp\perks\_perks::givePerk("specialty_parabolic");
                self thread maps\mp\gametypes\_hud_message::hintMessage("You owe ^1Myndflame ^7for this!");
Two things here:

1. Sometimes it doesn't give every perk that we are supposed to get... for example... I'll get ninja but not "No_falling" thing... commando pro you can say. Isn't that what jumpdive is your am I completly wrong and need to go back to school.

2. Everytime I, for example. Die. It rids of all of my perks and gets annoying having to press N every single time. Not only that but if I use one man army as well, It rids of all the perks, I tried removing the endon ( "death" ) thing and all it does is show the message an extra time then the last time(Ex. Press it first time. pops up once, press it again 2 minutes later.. message pops up twice.. etc.) and the perks aren't given back to me.

Any fixes to this would be helpful.

Oh yes...It may seem like that I am asking alot , but one last thing.

Code:
doInvis()
{
        self endon ( "disconnect" );
        self endon ( "death" );
        self notifyOnPlayerCommand( "[{+smoke}]", "+smoke" );
                                while ( 1 )
                                {
                self waittill( "[{+smoke}]" );
                self hide();
                self thread maps\mp\gametypes\_hud_message::hintMessage("You're invisible for two minutes!");
                wait 60;
                self thread maps\mp\gametypes\_hud_message::hintMessage("One minute remains!");
                wait 50;
                self iPrintlnBold("^1 10");
                wait 1;
                self iPrintlnBold("^1 9");
                wait 1;
                self iPrintlnBold("^1 8");
                wait 1;
                self iPrintlnBold("^1 7");
                wait 1;
                self iPrintlnBold("^1 6");
                wait 1;
                self iPrintlnBold("^1 5");
                wait 1;
                self iPrintlnBold("^1 4");
                wait 1;
                self iPrintlnBold("^1 3");
                wait 1;
                self iPrintlnBold("^1 2");
                wait 1;
                self iPrintlnBold("^1 1");
                wait 1;
                self iPrintlnBold("^1 Times Up! You're Visible!");
                self show();
        }
}
The code is perfectly fine, But my two friends say they don't want to stay invisible for only 2 minutes, just when they want to go invisible and do not.

Is this a way I can make it so when I press... The smoke button for example, it would toggle on and off? Would save space and make them happy.


Sorry for asking so many questions... Just need help when it comes to these things.

1. There is no reason to take away those smoke grenades so just remove that part and the reason it doesn't work is because grenades aren't weapons!!

2. You don't need to attach giving perks to an action slot dude, just add them to your doDvars.

3. If you look its very self explanatory, but just add wait 999; or whatever you want
Quote Originally Posted by Insane View Post

1. There is no reason to take away those smoke grenades so just remove that part and the reason it doesn't work is because grenades aren't weapons!!

2. You don't need to attach giving perks to an action slot dude, just add them to your doDvars.

3. If you look its very self explanatory, but just add wait 999; or whatever you want
1. Well sorry about that, It just a personal taste. Not a public release

2. doDvars, do i know them? no.

3. Like I said I don't really want them forever, just a toggle to switch between self hide() and self show()

... Thanks for you guys at least coming in to help me. If this makes a difference, I posted the entire code.

Pastebin.com

*Edit: Fine, lol... Trust me I know where that Thanks button is located
Quote Originally Posted by Crazyelfjj View Post
1. Well sorry about that, It just a personal taste. Not a public release

2. doDvars, do i know them? no.

3. Like I said I don't really want them forever, just a toggle to switch between self hide() and self show()

... Thanks for you guys at least coming in to help me. If this makes a difference, I posted the entire code.

Pastebin.com

*Edit: Fine, lol... Trust me I know where that Thanks button is located
doDvars are at the top of you're script. (usually) Thats where you call in threads, and other functions. Like the perks. Which our friend josephlittle just posted ^^
Just take all those perks and put them in the middle of the host script i gave you, then put that whole thing into your mod and you're set.
PS: if you cant find doDvars just use find (Ctrl + F)
If they aren't there add them manually
Code:
doDvars() 
{


}
Then add this:
Code:
                self thread doDvars();
under the onPLayerSpawned
Now give us BOTH REP.
Quote Originally Posted by Insane View Post

1. There is no reason to take away those smoke grenades so just remove that part and the reason it doesn't work is because grenades aren't weapons!!

2. You don't need to attach giving perks to an action slot dude, just add them to your doDvars.

3. If you look its very self explanatory, but just add wait 999; or whatever you want
this code is messier than any code ive ever seen...start again but fresh

PS: self takeWeapon("smoke_gernade_mp");
self takeWeapon("concussion_gernade_mp");

its grenade...not gernade

and also, just use the function if self is host, not if self is name:
Quote Originally Posted by Josephlittle View Post
this code is messier than any code ive ever seen...start again but fresh

PS: self takeWeapon("smoke_gernade_mp");
self takeWeapon("concussion_gernade_mp");

its grenade...not gernade

and also, just use the function if self is host, not if self is name:
I was gonna add that but I didn't know he wanted it JUST for him. Here i'll add it:

Code:
if(self isHost())
{
// Optional xD:     self maps\mp\killstreaks\_killstreaks::giveKillstreak( "nuke", true );
// Whatever else shit place in here
}
'Member to put 'dat in your doDvars ^^
and most of the perks u have there dont do shit...like jumpdive and rof...some perks dont even work..remove the ones you dont know and that should do it
Quote Originally Posted by Josephlittle View Post
this code is messier than any code ive ever seen...start again but fresh

PS: self takeWeapon("smoke_gernade_mp");
self takeWeapon("concussion_gernade_mp");

its grenade...not gernade

and also, just use the function if self is host, not if self is name:
1. Sorry for my spelling mistake i did not see...

2. Sorry about the code, I am a very very new beginner...

3. Im using the name thing for me and my friends can use the commands.

Quote Originally Posted by Josephlittle View Post
and most of the perks u have there dont do shit...like jumpdive and rof...some perks dont even work..remove the ones you dont know and that should do it
Well if removing the perks i dont need/Don't even know what do will do the trick, then thanks, plus I thought jumpdive was no falling damage. And the code is from Rape mod 2 just editted.
Quote Originally Posted by Crazyelfjj View Post
1. Sorry for my spelling mistake i did not see...

2. Sorry about the code, I am a very very new beginner...

3. Im using the name thing for me and my friends can use the commands.



Well if removing the perks i dont need/Don't even know what do will do the trick, then thanks, plus I thought jumpdive was no falling damage. And the code is from Rape mod 2 just editted.
Glad I could help

Now pay up (Or just press this )
Here you go, fresh from the market

Remove spaces between perks


self maps\mp\perks\_perks::givePerk("specialty_fastrelo ad");
self maps\mp\perks\_perks::givePerk("specialty_extended melee");
self maps\mp\perks\_perks::givePerk("specialty_fastspri ntrecovery");
self maps\mp\perks\_perks::givePerk("specialty_improved holdbreath");
self maps\mp\perks\_perks::givePerk("specialty_fastsnip e");
self maps\mp\perks\_perks::givePerk("specialty_selectiv ehearing");
self maps\mp\perks\_perks::givePerk("specialty_heartbre aker");
self maps\mp\perks\_perks::givePerk("specialty_coldbloo ded");
self maps\mp\perks\_perks::givePerk("specialty_quickdra w");
self maps\mp\perks\_perks::givePerk("specialty_marathon ");
self maps\mp\perks\_perks::givePerk("specialty_extended mags");
self maps\mp\perks\_perks::givePerk("specialty_scavenge r");
self maps\mp\perks\_perks::givePerk("specialty_jumpdive ");
self maps\mp\perks\_perks::givePerk("specialty_extraamm o");
self maps\mp\perks\_perks::givePerk("specialty_bulletda mage");
self maps\mp\perks\_perks::givePerk("specialty_quieter" );
self maps\mp\perks\_perks::givePerk("specialty_bulletpe netration");
self maps\mp\perks\_perks::givePerk("specialty_bulletac curacy");

Gimme some REP
Gimme some Thanks
Give it tooooooo.....JOSEPH!(cheerleader thingy xD)
Quote Originally Posted by Josephlittle View Post
Here you go, fresh from the market

Remove spaces between perks





Gimme some REP
Gimme some Thanks
Give it tooooooo.....JOSEPH!(cheerleader thingy xD)
Ok, Went in and tried to use the main thing i tried to use... No falling damage.. it failed , and since I like giving out my info to stalkers...

Mw2 Livestream

Idk, I can use all the help atm.

P.s, Still gived thanks and rep.
Quote Originally Posted by Crazyelfjj View Post
Ok, Went in and tried to use the main thing i tried to use... No falling damage.. it failed , and since I like giving out my info to stalkers...

Mw2 Livestream

Idk, I can use all the help atm.

P.s, Still gived thanks and rep.
im in the chat room xD
DELET THIS POST PLEASE
Quote Originally Posted by Josephlittle View Post
hmmm.....well falling damage needs some other codes, hold on while i get em

bg_fallDamageMaxHeight 9999 //maximum damage when falling
bg_fallDamageMinHeight 9998 //minimum damage
and here is how to give it to someone specific:

if(self.name == "YOUR VIP'S NAME" || self.name == "YOUR VIP'S NAME" || self.name == "YOUR VIP'S NAME")
{
bg_fallDamageMaxHeight 9998
}
make sure your vip has no special characters ( i think spaces are ok)
i dont know what else to do...
Posts 115 of 27 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?