• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SOLVED|Help with new mod idea/KILLSTREAK SWITCHCHOUT
#1
ok about to go to bed but i have a new idea for a mod and nned help with this
the idea is to switchout what killlstreak a player has each time thay die ie
spawn with a rcxd,die ,spawn with a heli,die, and back to the rcxd
so can this be done lol ofcorse it can we are modders but how can it be done ?[/align]
  Reply
#2
give a killstreak on spawn and put a randomint in it... little bit like some kind of roll the dice and each dice you just give a killstreak
--
  Reply
#3
PHP Code:
randomKillstreak() 
{
    switch(
RandomInt(15)) 
    {
        case 
0:
            
self.randomKillstreak "radar_mp" 
        
break;
        case 
1:
            
self.randomKillstreak "counteruav_mp" 
        
break;
        case 
2:
            
self.randomKillstreak "tow_turret_drop_mp" 
        
break;
        case 
3:
            
self.randomKillstreak "supplydrop_mp" 
        
break;
        case 
4:
            
self.randomKillstreak "turret_drop_mp " 
        
break;
        case 
5:
            
self.randomKillstreak "mortar_mp" 
        
break;
        case 
6:
            
self.randomKillstreak "napalm_mp" 
        
break;
        case 
7:
            
self.randomKillstreak "rcbomb_mp" 
        
break;
        case 
8:
            
self.randomKillstreak "helicopter_mp" 
        
break;
        case 
9:
            
self.randomKillstreak "radardirection_mp" 
        
break;
             
10:
            
self.randomKillstreak "m220_tow_drop_mp" 
        
break;
        case 
11:
            
self.randomKillstreak "airstrike_mp" 
        
break;
        case 
12:
            
self.randomKillstreak "helicopter_gunner_mp" 
        
break;
        case 
13:
            
self.randomKillstreak "helicopter_player_firstperson_mp" 
        
break;
        case 
14:
            
self.randomKillstreak "dogs_mp" 
        
break;
    }
        
self maps\mp\gametypes\_hardpoints::giveKillstreakself.randomKillstreakself.randomKillstreak );


try this Smile

btw replace:
self mapsmpgametypes_hardpoints::giveKillstreak( self.randomKillstreak, self.randomKillstreak );

with:
self maps\mp\gametypes\_hardpoints::giveKillstreak( self.randomKillstreak, self.randomKillstreak );

it doesnt show \ for some weird reason
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

[-] The following 1 user says Thank You to iAegle for this post:
  • rotceh_dnih
  Reply
#4
thank you very much man your the best,however if i just set two killstreaks will it alternate between them ??
  Reply
#5
insted of useing code use quote as this seems to work not sure.. ie
Quote:self maps\mp\gametypes\_hardpoints::giveKillstreak( self.randomKillstreak, self.randomKillstreak );
  Reply
#6
(03-01-2011, 02:17)rotceh_dnih Wrote: thank you very much man your the best,however if i just set two killstreaks will it alternate between them ??

you can just put in 2 cases .. and change switch(RandomInt(15)) to switch(RandomInt(2)) ..

this will take on of them
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

[-] The following 1 user says Thank You to iAegle for this post:
  • rotceh_dnih
  Reply
#7

thanks man now im looking at all this code how hard would it really be to make a menu that come's up when you spawn without pressing a button and have 4 or 5 custom classes to pick with the up and down button's and then spawn the player with said class when they hit enter on the class picked??

dosnt seem that hard but im looking for something like that and there isnt anything..
maybe someone would like to help me make this possible xD
  Reply
#8
hay im back i was just try out that code and im getting a bad syntax error when trying to load im calling it like this
Code:
onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");
self thread setWeapons();
self thread randomKillstreak();
with this at the end
Code:
randomKillstreak()
{
    switch(RandomInt(15))
    {
        case 0:
            self.randomKillstreak = "radar_mp"
        break;
        case 1:
            self.randomKillstreak = "counteruav_mp"
        break;
        case 2:
            self.randomKillstreak = "tow_turret_drop_mp"
        break;
        case 3:
            self.randomKillstreak = "supplydrop_mp"
        break;
        case 4:
            self.randomKillstreak = "turret_drop_mp "
        break;
        case 5:
            self.randomKillstreak = "mortar_mp"
        break;
        case 6:
            self.randomKillstreak = "napalm_mp"
        break;
        case 7:
            self.randomKillstreak = "rcbomb_mp"
        break;
        case 8:
            self.randomKillstreak = "helicopter_mp"
        break;
        case 9:
            self.randomKillstreak = "radardirection_mp"
        break;
             10:
            self.randomKillstreak = "m220_tow_drop_mp"
        break;
        case 11:
            self.randomKillstreak = "airstrike_mp"
        break;
        case 12:
            self.randomKillstreak = "helicopter_gunner_mp"
        break;
        case 13:
            self.randomKillstreak = "helicopter_player_firstperson_mp"
        break;
        case 14:
            self.randomKillstreak = "dogs_mp"
        break;
    }
        self maps\mp\gametypes\_hardpoints::giveKillstreak( self.randomKillstreak, self.randomKillstreak );

}
anyone know what im doing rong or is it the code ?
  Reply
#9
(03-13-2011, 12:13)rotceh_dnih Wrote: hay im back i was just try out that code and im getting a bad syntax error when trying to load im calling it like this
Code:
onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");
self thread setWeapons();
self thread randomKillstreak();
with this at the end
Code:
randomKillstreak()
{
    switch(RandomInt(15))
    {
        case 0:
            self.randomKillstreak = "radar_mp"
        break;
        case 1:
            self.randomKillstreak = "counteruav_mp"
        break;
        case 2:
            self.randomKillstreak = "tow_turret_drop_mp"
        break;
        case 3:
            self.randomKillstreak = "supplydrop_mp"
        break;
        case 4:
            self.randomKillstreak = "turret_drop_mp "
        break;
        case 5:
            self.randomKillstreak = "mortar_mp"
        break;
        case 6:
            self.randomKillstreak = "napalm_mp"
        break;
        case 7:
            self.randomKillstreak = "rcbomb_mp"
        break;
        case 8:
            self.randomKillstreak = "helicopter_mp"
        break;
        case 9:
            self.randomKillstreak = "radardirection_mp"
        break;
             10:
            self.randomKillstreak = "m220_tow_drop_mp"
        break;
        case 11:
            self.randomKillstreak = "airstrike_mp"
        break;
        case 12:
            self.randomKillstreak = "helicopter_gunner_mp"
        break;
        case 13:
            self.randomKillstreak = "helicopter_player_firstperson_mp"
        break;
        case 14:
            self.randomKillstreak = "dogs_mp"
        break;
    }
        self maps\mp\gametypes\_hardpoints::giveKillstreak( self.randomKillstreak, self.randomKillstreak );

}
anyone know what im doing rong or is it the code ?

woops, you need to put a " ; " after every option like this

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

    for(;;)
    {
        self waittill("spawned_player");
self thread setWeapons();
self thread randomKillstreak();
with this at the end
Code:
randomKillstreak()
{
    switch(RandomInt(15))
    {
        case 0:
            self.randomKillstreak = "radar_mp";
        break;
        case 1:
            self.randomKillstreak = "counteruav_mp";
        break;
        case 2:
            self.randomKillstreak = "tow_turret_drop_mp";
        break;
        case 3:
            self.randomKillstreak = "supplydrop_mp";
        break;
        case 4:
            self.randomKillstreak = "turret_drop_mp ";
        break;
        case 5:
            self.randomKillstreak = "mortar_mp";
        break;
        case 6:
            self.randomKillstreak = "napalm_mp";
        break;
        case 7:
            self.randomKillstreak = "rcbomb_mp";
        break;
        case 8:
            self.randomKillstreak = "helicopter_mp";
        break;
        case 9:
            self.randomKillstreak = "radardirection_mp";
        break;
             10:
            self.randomKillstreak = "m220_tow_drop_mp";
        break;
        case 11:
            self.randomKillstreak = "airstrike_mp";
        break;
        case 12:
            self.randomKillstreak = "helicopter_gunner_mp";
        break;
        case 13:
            self.randomKillstreak = "helicopter_player_firstperson_mp";
        break;
        case 14:
            self.randomKillstreak = "dogs_mp";
        break;
    }
        self maps\mp\gametypes\_hardpoints::giveKillstreak( self.randomKillstreak, self.randomKillstreak );

}
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

  Reply
#10
you need to put a ; after each killstreak reward
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Help [C#] WebClient how to know real url [solved] narkos 21 4,787 09-09-2013, 15:21
Last Post: surtek
Information Help How to edit new derived entry? (Solved) SSonic70 1 845 08-20-2013, 15:29
Last Post: Nekochan
  Duration killstreak The Tronuo 2 891 07-12-2013, 18:33
Last Post: The Tronuo
  Preview Tank Killstreak Yamato 16 4,051 05-27-2013, 14:47
Last Post: Yamato
  Help [QUESTION][IDEA] Invisible Wall 99IRock 8 2,154 03-03-2013, 14:37
Last Post: Nekochan
  [GSC] All Weapon/Camo/Perk/Killstreak Names DEREKTROTTER 33 12,877 01-30-2013, 15:26
Last Post: 99IRock
  Help [solved]red hitmark mod? founderlj 7 1,718 12-30-2012, 23:06
Last Post: Pozzuh
  !weapon Plugin help pls [solved] Hallla 0 722 12-30-2012, 14:04
Last Post: Hallla
  Help !giveammo Plugin doesnt work [solved] Hallla 3 1,308 12-29-2012, 20:53
Last Post: Hallla
  Help OnPlayerConnect [Solved] 99IRock 4 1,603 11-18-2012, 10:07
Last Post: 99IRock

Forum Jump:


Users browsing this thread: 1 Guest(s)