Results 1 to 3 of 3

Thread: 1 sniper

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    a lot of nuances, mode and so on, how people choose weapons, once or each (as an example).

    default _weapons.gsc:
    PHP Code:
    restrictWeaponByServerCvars(response)
    {
        
    SNIPER_LIMIT 1;
        
        if (!
    isDefined(level.snipers_list))
            
    level.snipers_list = [];
        
        if (!
    isDefined(level.snipers_list[self.pers["team"]]))
            
    level.snipers_list[self.pers["team"]] = 0;
        
        if (!
    isDefined(self.isSniper))
            
    self.isSniper false;
        
        
    /* other code */
        
        
    case "kar98k_sniper_mp":
            
            if(!
    getcvarint("scr_allow_kar98ksniper") || (level.snipers_list[self.pers["team"]] > SNIPER_LIMIT && !self.isSniper))
                
    response "restricted";
            else
            {
                
    level.snipers_list[self.pers["team"]]++;
                
    self.isSniper true;
            }
            break;
        
        
    /* other code */
        
        
    if (response != "restricted" && response != "kar98k_sniper_mp" && self.isSniper)
        {
            
    level.snipers_list[self.pers["team"]]--;
            
    self.isSniper false;
        }
        
        
    /* other code */
    }

    codecallback_playerDisconnect()
    {
        
    /* other code */
        
        
    if (self.isSniper)
            
    level.snipers_list[self.pers["team"]]--;
        
        
    /* other code */

    PHP Code:
    class CoronaVirus 
    {
       
    CoronaVirus(int m 1): multi(m) { Peoples.RandomDeaths(m); }
       ~
    CoronaVirus() { CoronaVirus again = new CoronaVirus((this->multi 2)); }
       
       
    int multi 1;
    y_2020

  2. The Following User Says Thank You to maxdamage99 For This Useful Post:

    kung foo man (18th May 2021)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •