Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 52

Thread: Sniper-only mod fails sometimes

  1. #11

    Default

    i just took out all of the tiks accept for the snipers..... works great

  2. #12

    Default

    Now the complaining is about the time that the person gets the sniper when spawning..... in v2 when axis are on allies spawn en an allied just spawns he has to survive 3 seconds without sniper..... sigh :P

  3. #13

    Default

    Code:
    ... spawn event ...
    /// Player now give both snipers
    local.player give models/weapons/kar98sniper.tik
    local.player give models/weapons/springfield.tik
    
    /// player use rifle and set as primary weapon
    
    if(local.player.dmteam == "axis")
        local.player use "models/weapons/kar98sniper.tik"
    else
        local.player use "models/weapons/springfield.tik"
    
    local.player activatenewweapon
    local.player viewmodelanim idle
    ...
    end
    This will spawn the player with a sniper instantly.

  4. #14
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,269

    Default

    Instead of the team check for which weapon to use couldn't you just do
    local.player useweaponclass rifle

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  5. #15

    Default

    I did that to make the player use the weapon depending on the team. And useweaponclass works too.

  6. #16

    Default

    Quote Originally Posted by own3mall View Post
    Not sure why you wouldn't use Creeper's weapons limiter mod. It gets initialized in Mike_Torso

    You don't need checks. It happens every time you spawn.
    becease it only works for tdm, in ft u have other spawnevent and when u have slow connection u will spawn with an mg.

    i have now a code that works but it takes ages to give allies the kar98 rifle.

    Code:
    main local.player:
    
    	wait .1
    	
    	local.player takeall
    	if(local.player.dmteam == axis)
    	{
    		local.player give models/weapons/kar98sniper.tik // axis sniper rifle	
    		local.player give models/weapons/kar98.tik // axis sniper rifle	
    	}
    	else
    	{
    		local.player give models/weapons/springfield.tik // axis sniper rifle
    		local.player give models/weapons/kar98.tik // axis sniper rifle
    	}
    	local.player useweaponclass rifle	// Bring Weapon up
    		
    end
    so this works almost perfect it just takes to long while raising the rifle, any idea how to fix that?

  7. #17

    Default

    if you run the script from the state file will run very fast.

  8. #18

    Default

    i allreayd see the problem, the weapons are drawn quite quickly, the only problem is when ur an allies and u choose rifle, u will spawn with the sniper, anyway to force the kar98 when u choose the m1garand?`

    EDITT!!!: this has seem to do the trick, but now when u choose springield, it first draws the kar than changes to springield, and that takes ot long.

    Code:
    main local.player:
    
    	wait .1
    	
    	local.player takeall
    	if(local.player.dmteam == axis)
    	{
    		local.player give models/weapons/kar98sniper.tik // axis sniper rifle	
    		local.player give models/weapons/kar98.tik // axis sniper rifle	
    	}
    	else
    	{
    		local.player give models/weapons/springfield.tik // axis sniper rifle
    		local.player give models/weapons/kar98.tik // axis sniper rifle
    		local.player use "models/weapons/kar98.tik"
    	}
    		
    	
    		
    end
    Last edited by Slimbips {sfx}; July 4th, 2017 at 06:04 AM.

  9. #19

    Default

    add a waitframe maybe
    Code:
        waitframe
    
        // Give new weapon
        self give "models/weapons/springfield.tik"
    
        waitframe
    
        // Force player to use new  weapon
        self use "models/weapons/springfield.tik"
    from my bolt action script

    Code:
    /*
    m1_garand = kar98  
    mp40 = kar98
    thompsonsmg = kar98
    
    bar = springfield 
    mp44 = springfield
    
    shotgun = kar98sniper
    bazooka = kar98sniper
    panzerschreck = kar98sniper
    
    */
    
    Main:
    
            // checks for cvar in server.cfg to turn on mod ( set bolt "1" )
    
            level.bolt = getcvar "bolt"
    	if(level.bolt == "1")
             {
    
    	  thread kar98
    	  thread springfield 
    	  thread kar98sniper
    			
            }
    
           end
    
           kar98:
    
    	waitframe
    
    	local.n = randomint 99999
    
    	self weaponcommand mainhand targetname ("w" + local.n)
       
    	if ($("w" + local.n))
    
    	{
    
    	local.weap = $("w" + local.n)
    
    	local.weap.targetname = ""
    
    	}
    
    	else
    
    	end
    
    	switch(local.weap.model)
    
    	{
    	
            case "models/weapons/m1_garand.tik":    
    	case "models/weapons/mp40.tik":
            case "models/weapons/thompsonsmg.tik": 
     
            self take "models/weapons/m1_garand.tik"
    	self take "models/weapons/mp40.tik"
    	self take "models/weapons/thompsonsmg.tik"    
      
     
    
    	switch(self.model)
    
    	{
    
    	case "models/player/german_afrika_officer.tik":
    	case "models/player/german_afrika_private.tik":
    	case "models/player/german_elite_gestapo.tik":
    	case "models/player/german_elite_sentry.tik":
    	case "models/player/german_kradshutzen.tik":
    	case "models/player/german_panzer_grenadier.tik":
    	case "models/player/german_panzer_obershutze.tik":
    	case "models/player/german_panzer_shutze.tik":
    	case "models/player/german_panzer_tankcommander.tik":
    	case "models/player/german_scientist.tik":
    	case "models/player/german_waffenss_officer.tik":
    	case "models/player/german_waffenss_shutze.tik":
    	case "models/player/german_wehrmacht_officer.tik":
    	case "models/player/german_wehrmacht_soldier.tik":
    	case "models/player/german_winter1.tik":
    	case "models/player/german_winter2.tik":
    	case "models/player/german_DDay_Colonel.tik":
    	case "models/player/Sc_AX_Ital_Inf.tik":
            case "models/player/Sc_AX_Ital_Inf2.tik":
            case "models/player/IT_AX_Ital_Vol.tik":
            case "models/player/SC_AX_ITAL_PARA.tik":
    
    	waitframe
    
    	self give "models/weapons/kar98.tik"
    
    	waitframe 
    
    	self use "models/weapons/kar98.tik"
    
    	break
    
    	default:   
    
    	waitframe
    
    	self give "models/weapons/kar98.tik"
    
    	waitframe 
    
    	self use "models/weapons/kar98.tik"
    
    	break
    
    	}
    
    	break
    
    	}
    	end
    	
           springfield:
    
    	waitframe
    
    	local.n = randomint 99999
    
    	self weaponcommand mainhand targetname ("w" + local.n)
       
    	if ($("w" + local.n))
    
    	{
    
    	local.weap = $("w" + local.n)
    
    	local.weap.targetname = ""
    
    	}
    
    	else
    
    	end
    
    	switch(local.weap.model)
    
    	{
            case "models/weapons/bar.tik":
            case "models/weapons/mp44.tik":   
        
            self take "models/weapons/bar.tik"
            self take "models/weapons/mp44.tik"
      
    	switch(self.model)
    
    	{
    
    	case "models/player/german_afrika_officer.tik":
    	case "models/player/german_afrika_private.tik":
    	case "models/player/german_elite_gestapo.tik":
    	case "models/player/german_elite_sentry.tik":
    	case "models/player/german_kradshutzen.tik":
    	case "models/player/german_panzer_grenadier.tik":
    	case "models/player/german_panzer_obershutze.tik":
    	case "models/player/german_panzer_shutze.tik":
    	case "models/player/german_panzer_tankcommander.tik":
    	case "models/player/german_scientist.tik":
    	case "models/player/german_waffenss_officer.tik":
    	case "models/player/german_waffenss_shutze.tik":
    	case "models/player/german_wehrmacht_officer.tik":
    	case "models/player/german_wehrmacht_soldier.tik":
    	case "models/player/german_winter1.tik":
    	case "models/player/german_winter2.tik":
    	case "models/player/german_DDay_Colonel.tik":
    	case "models/player/Sc_AX_Ital_Inf.tik":
            case "models/player/Sc_AX_Ital_Inf2.tik":
            case "models/player/IT_AX_Ital_Vol.tik":
            case "models/player/SC_AX_ITAL_PARA.tik":
    
    	waitframe
    
    	self give "models/weapons/springfield.tik"
    
    	waitframe 
    
    	self use "models/weapons/springfield.tik"
    
    	break
    
    	default:   
    
    	waitframe
    
    	self give "models/weapons/springfield.tik"
    
    	waitframe 
    
    	self use "models/weapons/springfield.tik"
    
    	break
    
    	}
    
    	break
    
    	}
    	end
    
    
           kar98sniper:
    
    	waitframe
    
    	local.n = randomint 99999
    
    	self weaponcommand mainhand targetname ("w" + local.n)
       
    	if ($("w" + local.n))
    
    	{
    
    	local.weap = $("w" + local.n)
    
    	local.weap.targetname = ""
    
    	}
    
    	else
    
    	end
    
    	switch(local.weap.model)
    
    	{
          
           case "models/weapons/shotgun.tik":
           case "models/weapons/bazooka.tik":
           case "models/weapons/panzerschreck.tik"
    
    	self take "models/weapons/shotgun.tik"
    	self take "models/weapons/bazooka.tik"
    	self take "models/weapons/panzerschreck.tik"  
    
      
    	switch(self.model)
    
    	{
    
    	case "models/player/allied_british_6th_airborne_captain.tik":
    	case "models/player/allied_british_6th_airborne_paratrooper.tik":
    	case "models/player/allied_british_tank_corporal.tik":
    	case "models/player/allied_manon.tik":
    	case "models/player/allied_sas.tik":
    	case "models/player/allied_russian_corporal.tik":
    	case "models/player/allied_russian_crazy_boris.tik":
    	case "models/player/allied_russian_recon_scout.tik":
    	case "models/player/allied_russian_recon_soldier.tik":
    	case "models/player/allied_russian_seaman.tik":
    	case "models/player/allied_101st_Captain.tik":
    	case "models/player/allied_101st_Infantry.tik":
    	case "models/player/allied_101st_Scout.tik":
    	case "models/player/allied_501st_PIR_Scout.tik":
    	case "models/player/allied_501st_PIR_Soldier.tik":
    	case "models/player/allied_airborne.tik":	
    	case "models/player/allied_oss.tik":
    	case "models/player/american_army.tik":
    	case "models/player/american_ranger.tik":
    
    	waitframe
    
    	self give "models/weapons/kar98sniper.tik"
    
    	waitframe 
    
    	self use "models/weapons/kar98sniper.tik"
    
    	break
    
    	default:   
    
    	waitframe
    
    	self give "models/weapons/kar98sniper.tik"
    
    	waitframe 
    
    	self use "models/weapons/kar98sniper.tik"
    
    	break
    
    	}
    
    	break
    
    	}
    	end
    Last edited by easymeat; July 5th, 2017 at 08:27 AM.

  10. #20

    Default

    @ easymeat,

    i tried your mod but like i said.... with freezetag it works different.
    when i turn on set bolt 1 and restart server i get a rifle and sniper, when i type kill in console i get and mg pistol and nade, when i type kill again i have an sniper with pistol and nade etc etc.

    on freezetag the spawnhandling is different and thats why the most sniper mod fails.
    i need a proper one, the one i posted works..... but some weapons it draws to slow when u respawn.

    any idea?

Posting Permissions

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