Black Ops Jump Mod :D

Have a question about modding, modelling or skinning? Have a tutorial to post? Post here!

Moderator: Core Staff

Post Reply
House
CJ Wannabe
CJ Wannabe
Posts: 2
Joined: December 18th, 2010, 5:37 pm

Black Ops Jump Mod :D

Post by House » December 30th, 2010, 10:13 pm

So been working on a jump mod for a while now :D (haven't tested it yet)
just going to post some code and see what you guys think :D

Save Position etc..

Code: Select all

while(1)
{
       if(self MeleeButtonPressed()) //v
              self.savedposition = self.origin;//Saves current position
              self iPrintln("^2Position ^5Saved");
}


while(1)
{
       if(self UseButtonPressed())//F
              self moveto(self.savedposition);// loads last saved position
              self iPrintln("^2Position ^5Loaded");
}



while(1)
{
       if(self ActionSlotOneButtonPressed())//X
              self suicide();//suicide!
              self iPrintln("^2You Killed ^5Yourself ^5HAHA EMO!");
}
("haha emo!" for keltic since she dyed her hair black and tryed to cover it up ;D )
Players class etc

Code: Select all

Team1()
{
self takeAllWeapons();
self ClearPerks();
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Lets Jump :D");
/*cz75dw_mp*/
self giveWeapon( "cz75dw_mp", 0, false );
self switchToWeapon("cz75dw_mp"); 
self setPerk("specialty_movefaster specialty_fallheight");
self setPerk("specialty_longersprint specialty_unlimitedsprint");
self setPerk("specialty_holdbreath specialty_fastweaponswitch");
self setPerk("specialty_twoattach specialty_twogrenades");
self setPerk("perk_sleight_of_hand_pro - specialty_fastreload specialty_fastads");
self setPerk("specialty_bulletaccuracy specialty_sprintrecovery specialty_fastmeleerecovery");
self.maxhealth = 99999;
self.health = 99999;
self setClientDvar("cg_nopredict", 0);
self setClientDvar("cg_fov", 80);
self setClientDvar("cg_fovscale", 1.125);
self setClientDvar("r_specularcolorscale", 0);    
self setClientDvar("r_dlightLimit", 0);
self setClientDvar("sm_enable", 0);
self setClientDvar("r_desaturation", 0);
self setClientDvar("r_zfeather", 0);
self setClientDvar("r_smc_enable", 0);
self setClientDvar("r_distortion", 0);
self setClientDvar("r_fog", 0);
setDvar("bg_viewBobMax", 0);
setDvar("bg_weaponBobMax", 0);
setDvar("player_sprintCameraBob", 0);
setDvar("sv_cheats", 1);
setDvar(Jump_height, 200);
self setClientDvar("cg_drawFPSOnly", 1); 
}


Bleh haven't tested it so don't no if i have made any noob mistakes and got a error

Hope you like :D

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: Black Ops Jump Mod :D

Post by Moustache » December 31st, 2010, 10:26 am

:roll: Maybe, I am not sure but maybe, it possible would be smart to test it before publishing it. You say you are working on it for a while now, yea sure... If that really was the case you would take the time to test it.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Black Ops Jump Mod :D

Post by Drofder2004 » December 31st, 2010, 6:57 pm

All your while statements are potential infinite loops.
Your iPrintln statements are going to spam the screen every frame crashing the mod almost the instant a player spawns.

The lack of wait calls in your player class function will cause the player to spawn without a weapon in his hand and forcing player dvars is just gonna cause some annoyance for those do not want their configs fucked with.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: Black Ops Jump Mod :D

Post by Pedsdude » December 31st, 2010, 7:22 pm

House wrote:("haha emo!" for keltic since she dyed her hair black and tryed to cover it up ;D )
Who is keltic and why would we care?
Image
Image

House
CJ Wannabe
CJ Wannabe
Posts: 2
Joined: December 18th, 2010, 5:37 pm

Re: Black Ops Jump Mod :D

Post by House » January 22nd, 2011, 1:35 pm

Yes the reason i havent tested it is because i didnt want to get banned but i got a spare account now so im going to test it today
and your right about the spam with the pop up messages so just fixing them now and i removed perm dvars

but other than that all is good

also changed the way the player gets guns couldn't be bothered to do classes for both teams so i just added this to onplayerspawned

Code: Select all

onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");

self thread saveposition();
self thread loadposition();
self thread suicide();


self takeAllWeapons();
self giveWeapon( "cz75_mp", 5, false );
self.maxhealth = 999999;
self.health = 999999;

KIWIDOGGIE
CJ Newbie
CJ Newbie
Posts: 74
Joined: November 16th, 2009, 11:10 pm

Re: Black Ops Jump Mod :D

Post by KIWIDOGGIE » February 9th, 2011, 1:22 pm

I hope you know that script will NEVER get past the first while(1) statement...

It will continually loop in that one statement over and over and over again.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Black Ops Jump Mod :D

Post by Drofder2004 » February 9th, 2011, 11:06 pm

KIWIDOGGIE wrote:I hope you know that script will NEVER get past the first while(1) statement...
It will continually loop in that one statement over and over and over again.
Drofder2004 wrote:All your while statements are potential infinite loops.
Welcome back to last year.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests