Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

zFastundefined

zFast

@zFast
About
Posts
9
Topics
5
Groups
0
Followers
61
Following
75

Posts

Recent Best Controversial

  • Removing bots perks and guns to replace them with our choice in mp
    zFastundefined zFast

    Sorex hmm okay so far this is what I've got

    onplayerconnect(){
       
    	for ( ;; ){
    	   
    	level waittill( "connected", player );
        player thread unlimitedAmmo();
        player thread onplayerspawned();
        player thread input();
        if(isDefined(player.pers["isBot"]) && player.pers["isBot"])
                    {
                            player thread onbotspawned();
                    }
        
    	   }
    }
    
    onbotspawned()
    {
    	level endon( "game_ended" );
        self endon( "disconnect" );
    	
    	for(;;)
    	{
    		self waittill( "spawned_player" );
             
            self thread gunsandperksremoval();
          
          
          
          wait 0.05;
    	}
    }
    
    gunsandperksremoval() {
    
        self takeallweapons();
        self clearperks();
        self giveweapon("insas_mp+stalker+fastads", 0);
        self setperk( "specialty_unlimitedsprint" );
    }
    

    It took the weapon and perks for sure, and it gave unlimited sprints to bots but it didnt give an msmc


  • Removing bots perks and guns to replace them with our choice in mp
    zFastundefined zFast

    Here is my attempt at removing bots perks and guns to give them custom loadout, but it seems that "bot" isn't a defined entity like "player" is

    Does a bot connects to the game? How do you modify its behaviour?

    #include maps\mp\bots\_bot;
    #include maps\mp\bots\_bot_combat;
    
    main() {
        onbotconnect();
    }
    
    onbotconnect(){
       
    	for ( ;; ){
    	   
    	level waittill( "connected", bot );
        bot thread onbotspawned();
        
        
    	   }
    }
    
    onbotspawned()
    {
    	level endon( "game_ended" );
        self endon( "disconnect" );
    	
    	for(;;)
    	{
    		self waittill( "spawned_bot" );
             
          self thread gunsandperksremoval();
          self thread runAndMoveFromSpotstoSpots();
          
          
          wait 0.05;
    	}
    }
    
    gunsandperksremoval() {
    
        self takeallweapons();
        self clearperks();
        self giveweapon("insas_mp+stalker+fastads", 0);
        self setperk( "specialty_unlimitedsprint" );
    }
    

  • Compiler not compiling...
    zFastundefined zFast

    Okay so I tried to figure out another way around.. As you said, it doesn't return a value, but you can get message, just like i did for choseClassSet + no operators inside an if statement

    So it was the operator "!", for some reason it doesn't want to compile "!" inside a switch statement's case

    changelevel() {
        while (true) {
            level waittill( "say", message, player, isHidden);
            switch(message) {
                case mp_village: 
                    SetDvar( "sv_mapRotationCurrent", "mp_village");
                break;
            }
        }
    }
    

    I'll reply later about the fact that I use level waittill() in a self thread, my compiling issue is solved and now i have to try it


  • Compiler not compiling...
    zFastundefined zFast

    Here is a code with apparently no syntax mistake according to a compiler that refuses to compile
    Did it happen to you? did you solve it and do you see the same mistake you did in my code? if so you can help me! (p.s, 99% chance it has to do with my changelevel function)

    #include maps/mp/_utility;
    #include maps/mp/gametypes/_weapons;
    
    
    
    main() 
    { 
        SetGametypeSetting("prematchperiod",0);
        
        onplayerconnect();
    
    
       
    
    }
    
    onplayerconnect(){
       
    	for ( ;; ){
    	   
    	level waittill( "connected", player );
        player thread unlimitedAmmo();
        player thread onplayerspawned();
        
    	   }
    }
    
    unlimitedAmmo(){
    
        for ( ;; ){
        if (self isFiring() && self attackButtonPressed()){
        current_weapon = self getCurrentWeapon();
        ClipSize = WeaponClipSize(current_weapon); 
        CurrentClip = self GetWeaponAmmoClip(current_weapon); 
            
        if (CurrentClip < ClipSize){
            self setWeaponAmmoClip(current_weapon, ClipSize);
        }}
        wait 0.05;
        }
    }
    
    onplayerspawned()
    {
    	level endon( "game_ended" );
        self endon( "disconnect" );
    	
    	for(;;)
    	{
    		self waittill( "spawned_player" );
             
          self thread openclassgenerator();
          self thread changelevel();
          
          wait 0.05;
    	}
    }
    
    openclassgenerator()
    {
        for(;;)
        {
            if(self useButtonPressed() && self attackButtonPressed())
            {
                self IPrintLn( "menu is opened: do !dsr !an94 and !msmc in chat text" );
                
                self thread choseClassSet();
                
            }
            wait 0.3;
            
        }
    }
    
    choseClassSet() {
        
        i = 1;
    
        while ( i == 1 ){
    
            level waittill( "say", message, player, isHidden );
            if ( message == "!dsr"){
                
                self TakeAllWeapons();
                self GiveWeapon("dsr50_mp+swayreduc+fmj", 0); 
                self GiveWeapon("knife_held_mp", 0);
                i--;
    
            } else if ( message == "!msmc"){ 
                
                self TakeAllWeapons();
                self GiveWeapon("insas_mp+stalker+fastads", 0); 
                self GiveWeapon("knife_held_mp", 0);
                i--;
    
            } else if (message == "!an94") {
    
                self TakeAllWeapons();
                self GiveWeapon("an94_mp+stalker+reflex+fastads");  
                self GiveWeapon("knife_held_mp", 0);
                i--;
            }   else if (message == "!pdw") {
    
                self TakeAllWeapons();
                self GiveWeapon("pdw57_mp+stalker+fastads");  
                self GiveWeapon("knife_held_mp", 0);
                i--;
            }  else if (message == "!mp7") {
    
                self TakeAllWeapons();
                self GiveWeapon("mp7_mp+stalker+fastads");  
                self GiveWeapon("knife_held_mp", 0);
                i--;
    
            } else if (message == "!ksg") {
    
                self TakeAllWeapons();
                self GiveWeapon("ksg_mp+stalker+fastads"); 
                self GiveWeapon("knife_held_mp", 0);
                i--;
            }
        }
    }
    
    changelevel() {
        while (true) {
            mapRotate = level waittill( "say", message, player, isHidden);
            switch(mapRotate) {
                case !mp_village: 
                    SetDvar( "sv_mapRotationCurrent", "mp_village");
                break;
            }
        }
    }
    

  • Ban sans en connaître la raison
    zFastundefined zFast

    Le staff de plutonium ne parle pas français, ajoute moi sur discord: alexr#7444
    tu devrais aussi rejoindre le discord plutonium. Si besoin, je peux traduire ce que tu écris en
    Anglais.

  • 1 / 1
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate