Thread: mod help pls !

Results 1 to 4 of 4
  1. #1
    ghost123456's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    83
    Reputation
    10
    Thanks
    5
    My Mood
    Hungover

    Cool mod help pls !

    hei guys can someone combine me this codes here , it should be that wen i press F i geat one of this random classes
    its without cash , so u can delete this ! thx ^^

    code 1 :
    Code:
    doRandom()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    	
    	// We remove killstreaks
    	self setPlayerData( "killstreaks", 0, "none" );
    	self setPlayerData( "killstreaks", 1, "none" );
    	self setPlayerData( "killstreaks", 2, "none" );
    	self Show();
    	wait 0.05;
    		switch(RandomInt(7))
    		{
    		case 0:
    			self takeAllWeapons();
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    			wait 1;
    			self giveWeapon("spas12_fmj_mp", 4, false );
    			self giveWeapon("famas_gl_mp", 3, false );
    		     self switchToWeapon("famas_gl_mp");
    			self maps\mp\perks\_perks::givePerk( "frag_grenade_mp" );
                            self.moveSpeedScaler = 1.00;
    				setDvar("player_burstFireCooldown", "0");
    			wait 0.05;
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
    			break;
    
    		case 1:
    			self takeAllWeapons();
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    			wait 1;
                    self giveWeapon("coltanaconda_mp", 0, false );
    			self giveWeapon("ump45_silencer_mp", 4, false);
    			self maps\mp\perks\_perks::givePerk( "semtex_mp" );
                     	self.moveSpeedScaler = 1.00;
    			wait 0.05;
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_marathon");
    			self maps\mp\perks\_perks::givePerk("specialty_lightweigh");
    			self maps\mp\perks\_perks::givePerk("specialty_heartbreaker");	
    			self maps\mp\perks\_perks::givePerk("specialty_finalstand");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
    			break;
    
    		case 2:
    			self takeAllWeapons();
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    			wait 1;
                   	self giveWeapon("at4_mp", 0, false );
        			self giveWeapon("sa80_grip_mp", 9, false );
                    	self switchToWeapon("sa80_grip_mp");
    
    			self maps\mp\perks\_perks::givePerk( "semtex_mp" );
    
                            self.moveSpeedScaler = 1.00;
    			wait 0.05;
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_bling");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self maps\mp\perks\_perks::givePerk("specialty_detectexplosive");
    			self maps\mp\perks\_perks::givePerk("specialty_finalstand");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
    			break;
    
    		case 3:
    			self takeAllWeapons();			
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    
    			wait 1;
    	       	self giveWeapon("usp_fmj_mp", 0, false );
    			self giveWeapon("barrett_fmj_mp", 6, false );
    			self switchToWeapon("barrett_fmj_mp");
                             self.moveSpeedScaler = 1.00;
    			wait 0.05;
    			self _clearPerks();; 
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_tacticalinsertion");
    			self maps\mp\perks\_perks::givePerk("specialty_bling");
    			self maps\mp\perks\_perks::givePerk("specialty_coldblooded");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
    			break; 
    
    		case 4:
    			self takeAllWeapons();
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    
    			wait 1;
    			self giveWeapon("beretta_akimbo_mp");
    			self giveWeapon("m4_acog_mp", 3, false);
    			self switchToWeapon("m4_acog_mp");
    
                          	self.moveSpeedScaler = 1.00;
    			wait 0.05;
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_bling");
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    			self maps\mp\perks\_perks::givePerk("specialty_marathon");
    			self maps\mp\perks\_perks::givePerk("specialty_lightweight");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
                       break;
    
    		case 5:
    			self takeAllWeapons();
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    			wait 1;			
                    self giveWeapon("fn2000_eotech_mp", 8, false);	
    			self giveWeapon("striker_xmags_mp", 6, false);
                 	self switchToWeapon("fn2000_eotech_mp");
    			wait 0.05;
    	
                         	self.moveSpeedScaler = 1.00;
    			wait 0.05;
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    			self maps\mp\perks\_perks::givePerk("specialty_marathon");
    			self maps\mp\perks\_perks::givePerk("specialty_lightweight");
                    self maps\mp\perks\_perks::givePerk("specialty_coldblooded");
                    self maps\mp\perks\_perks::givePerk("specialty_scavanger");
                    self maps\mp\perks\_perks::givePerk("specialty_quiter");
                    self maps\mp\perks\_perks::givePerk("specialty_longersprint");
                    self maps\mp\perks\_perks::givePerk("specialty_detectexplosive");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
                         break;
    
    case 6:
    			self takeAllWeapons();
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    			wait 1;
    			self giveWeapon("aa12_fmj_mp", 7, false );
    			self giveWeapon("tavor_fmj_mp", 5, false );
    		     self switchToWeapon("tavor_fmj_mp");
    			self maps\mp\perks\_perks::givePerk( "frag_grenade_mp" );
                            self.moveSpeedScaler = 1.00;
    				setDvar("player_burstFireCooldown", "0");
    			wait 0.05;
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
                    }
    }
    code2 :Semtex(pos, angle)
    {
    semtex_model = GetWeaponModel("semtex_mp", 0);
    level.block = spawn("script_model", pos);
    level.block setModel("com_plasticcase_friendly");
    level.block.angles = angle;
    level.block Solid();
    level.semtex = spawn("script_model", pos + (0, 0, 20));
    level.semtex setModel(semtex_model);
    level.semtex.angles = angle; //Change if you want
    //level.block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    invisblock = spawn("script_model", pos+(0,0,60));
    invisblock Solid();
    invisblock.angles = angle;
    invisblock CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    level.block thread SemtexThink(pos, angle);

    level.trigger = spawn( "trigger_radius", pos, 0, 50, 50);
    level.trigger.angles = angle;
    level.trigger thread SemtexThink(pos, angle);
    wait 0.01;
    }

    SemtexThink(pos, angle)
    {
    self endon("disconnect");

    while(1)
    {
    self waittill( "trigger", player );
    if(Distance(pos, Player.origin) <= 75){
    Player setLowerMessage("activate", "Hold ^3[{+activate}]^7 for a Semtex [^3100^7]" );}
    if(Distance(pos, Player.origin) >50){
    Player ClearLowerMessage("activate", 1);}
    if(Distance(pos, Player.origin) <= 75 && player.bounty >= 100 && player.pers["team"] == "allies" && player useButtonPressed())
    {
    player ClearLowerMessage("activate", 1);
    player.bounty -= 100;
    player notify("CASH");
    player notify("newWeapon");
    player _giveWeapon("semtex_mp", 0, 0);
    player giveMaxAmmo("semtex_mp");
    level.wep = spawn("level.weapon[33]", pos+(0,5,0));
    level.wep.angles = angle;
    level.wep MoveTo(level.wep.origin+(0,0,50), 3);
    level notify("boxend");
    wait 0.1;
    }
    else if(Distance(pos, Player.origin) <= 75 && player.bounty <= 100 && player useButtonPressed())
    {
    player iPrintln("Not enough cash!");
    wait 1;
    }
    wait .8;
    }
    }

  2. #2
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,538
    My Mood
    Angelic
    Here?:
    @ghost123456
    Code:
    doRandom()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    	
    	// We remove killstreaks
        self maps\mp\gametypes\_class::setKillstreaks( "none", "none", "none" );
    	self Show();
    	
    	//Press F for random class
    	self notifyOnPlayerCommand("activatera", "+activate");
        self waittill("activatera");
    	
    	wait 0.05;
    		switch(RandomInt(7))
    		{
    		case 0:
    			self takeAllWeapons();
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    			wait 1;
    			self giveWeapon("spas12_fmj_mp", 4, false );
    			self giveWeapon("famas_gl_mp", 3, false );
    		     self switchToWeapon("famas_gl_mp");
    			self maps\mp\perks\_perks::givePerk( "frag_grenade_mp" );
                            self.moveSpeedScaler = 1.00;
    				setDvar("player_burstFireCooldown", "0");
    			wait 0.05;
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
    			break;
    
    		case 1:
    			self takeAllWeapons();
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    			wait 1;
                    self giveWeapon("coltanaconda_mp", 0, false );
    			self giveWeapon("ump45_silencer_mp", 4, false);
    			self maps\mp\perks\_perks::givePerk( "semtex_mp" );
                     	self.moveSpeedScaler = 1.00;
    			wait 0.05;
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_marathon");
    			self maps\mp\perks\_perks::givePerk("specialty_lightweigh");
    			self maps\mp\perks\_perks::givePerk("specialty_heartbreaker");	
    			self maps\mp\perks\_perks::givePerk("specialty_finalstand");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
    			break;
    
    		case 2:
    			self takeAllWeapons();
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    			wait 1;
                   	self giveWeapon("at4_mp", 0, false );
        			self giveWeapon("sa80_grip_mp", 9, false );
                    	self switchToWeapon("sa80_grip_mp");
    
    			self maps\mp\perks\_perks::givePerk( "semtex_mp" );
    
                            self.moveSpeedScaler = 1.00;
    			wait 0.05;
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_bling");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self maps\mp\perks\_perks::givePerk("specialty_detectexplosive");
    			self maps\mp\perks\_perks::givePerk("specialty_finalstand");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
    			break;
    
    		case 3:
    			self takeAllWeapons();			
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    
    			wait 1;
    	       	self giveWeapon("usp_fmj_mp", 0, false );
    			self giveWeapon("barrett_fmj_mp", 6, false );
    			self switchToWeapon("barrett_fmj_mp");
                             self.moveSpeedScaler = 1.00;
    			wait 0.05;
    			self _clearPerks();; 
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_tacticalinsertion");
    			self maps\mp\perks\_perks::givePerk("specialty_bling");
    			self maps\mp\perks\_perks::givePerk("specialty_coldblooded");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
    			break; 
    
    		case 4:
    			self takeAllWeapons();
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    
    			wait 1;
    			self giveWeapon("beretta_akimbo_mp");
    			self giveWeapon("m4_acog_mp", 3, false);
    			self switchToWeapon("m4_acog_mp");
    
                          	self.moveSpeedScaler = 1.00;
    			wait 0.05;
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_bling");
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    			self maps\mp\perks\_perks::givePerk("specialty_marathon");
    			self maps\mp\perks\_perks::givePerk("specialty_lightweight");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
                       break;
    
    		case 5:
    			self takeAllWeapons();
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    			wait 1;			
                    self giveWeapon("fn2000_eotech_mp", 8, false);	
    			self giveWeapon("striker_xmags_mp", 6, false);
                 	self switchToWeapon("fn2000_eotech_mp");
    			wait 0.05;
    	
                         	self.moveSpeedScaler = 1.00;
    			wait 0.05;
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    			self maps\mp\perks\_perks::givePerk("specialty_marathon");
    			self maps\mp\perks\_perks::givePerk("specialty_lightweight");
                    self maps\mp\perks\_perks::givePerk("specialty_coldblooded");
                    self maps\mp\perks\_perks::givePerk("specialty_scavanger");
                    self maps\mp\perks\_perks::givePerk("specialty_quiter");
                    self maps\mp\perks\_perks::givePerk("specialty_longersprint");
                    self maps\mp\perks\_perks::givePerk("specialty_detectexplosive");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
                         break;
    
    case 6:
    			self takeAllWeapons();
    			wait 1;
    			self iPrintlnBold ("^1Press ^5Change weapon ^1 for weapon");
    			wait 1;
    			self giveWeapon("aa12_fmj_mp", 7, false );
    			self giveWeapon("tavor_fmj_mp", 5, false );
    		     self switchToWeapon("tavor_fmj_mp");
    			self maps\mp\perks\_perks::givePerk( "frag_grenade_mp" );
                            self.moveSpeedScaler = 1.00;
    				setDvar("player_burstFireCooldown", "0");
    			wait 0.05;
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self maps\mp\perks\_perks::givePerk("specialty_pistoldeath");
                    }
    }
    
    
    //Money/cash removed.
    //Note! Remember to set the pos  and  angle  in the mapedit file.
    //If you don't know how this works. Then you need to ask again.
    
    Semtex(pos, angle)
    {
    semtex_model = GetWeaponModel("semtex_mp", 0);
    level.block = spawn("script_model", pos);
    level.block setModel("com_plasticcase_friendly");
    level.block.angles = angle;
    level.block Solid();
    level.semtex = spawn("script_model", pos + (0, 0, 20));
    level.semtex setModel(semtex_model);
    level.semtex.angles = angle; //Change if you want
    //level.block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    invisblock = spawn("script_model", pos+(0,0,60));
    invisblock Solid();
    invisblock.angles = angle;
    invisblock CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    level.block thread SemtexThink(pos, angle);
    
    level.trigger = spawn( "trigger_radius", pos, 0, 50, 50);
    level.trigger.angles = angle;
    level.trigger thread SemtexThink(pos, angle);
    wait 0.01;
    }
    
    SemtexThink(pos, angle)
    {
    self endon("disconnect");
    
    while(1)
    {
    self waittill( "trigger", player );
    if(Distance(pos, Player.origin) <= 75){
    Player setLowerMessage("activate", "Hold ^3[{+activate}]^7 for a Semtex" );}
    if(Distance(pos, Player.origin) >50){
    Player ClearLowerMessage("activate", 1);}
    if(Distance(pos, Player.origin) <= 75 && player.pers["team"] == "allies" && player useButtonPressed())
    {
    player ClearLowerMessage("activate", 1);
    player notify("newWeapon");
    player _giveWeapon("semtex_mp", 0, 0);
    player giveMaxAmmo("semtex_mp");
    level.wep = spawn("level.weapon[33]", pos+(0,5,0));
    level.wep.angles = angle;
    level.wep MoveTo(level.wep.origin+(0,0,50), 3);
    level notify("boxend");
    wait 0.1;
    }
    }
    wait .8;
    }

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  3. #3
    ghost123456's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    83
    Reputation
    10
    Thanks
    5
    My Mood
    Hungover
    thx ^^
    ur epic !

  4. #4
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    self useButtonPressed() and then you dont need the notifyonplayercommand,

Similar Threads

  1. Modding help pls
    By ghost123456 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 8
    Last Post: 08-01-2011, 11:18 AM
  2. [Solved] mod helP pls ^^ :D!
    By ghost123456 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 2
    Last Post: 07-19-2011, 10:58 AM
  3. Mod help pls
    By ghost123456 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 2
    Last Post: 07-13-2011, 03:19 PM
  4. HELP PLS ADMIN OR MOD
    By pandelica in forum CrossFire Help
    Replies: 15
    Last Post: 06-17-2010, 11:16 PM
  5. [Help] Modding CF Screen help pls
    By TheGarstig in forum CrossFire Mods & Rez Modding
    Replies: 6
    Last Post: 03-13-2010, 03:19 PM