Zombie Class STEAMID Problem.



  • Hey there guys so I made a class of a xenomorph basing it off of the fast zombie’s code and I put in a function that looks for a certain SteamID of a player so it can be used by only that player and the player who’s STEAM ID I set cant see the class in the class menu. When i put my SteamID in I could see it and use it. heres the code for reference.

    CLASS.Name = "Xenomorph"
    CLASS.TranslationName = "class_xeno"
    CLASS.Description = "description_donate"
    CLASS.Help = "controls_xeno"
    
    CLASS.Model = Model("models/iffy/alienscm/alien/xeno_lurker_player.mdl")
    
    CLASS.Wave = 0
    CLASS.Unlocked = true
    CLASS.Hidden = true
    CLASS.Threshold = 0
    
    CLASS.Health = 325
    CLASS.Speed = 305
    CLASS.JumpPower = 300
    CLASS.SWEP = "weapon_zs_xeno"
    CLASS.NoFallDamage = true
    
    CLASS.Mass = DEFAULT_MASS * 1.5
    
    CLASS.Points = 8
    
    CLASS.PainSounds = {""}
    CLASS.DeathSounds = {"zombiesurvival/xeno_death.wav"}
    
    CLASS.ViewOffset = Vector(0, 0, 50)
    CLASS.Hull = {Vector(-16, -16, 0), Vector(16, 16, 64)}
    CLASS.HullDuck = {Vector(-16, -16, 0), Vector(16, 16, 35)}
    
    function CLASS:CanUse(pl)
    	return pl:SteamID() == "STEAM_0:0:042130849"
    end
    
    function CLASS:CalcMainActivity(pl, velocity)
    	if velocity:Length2D() <= 0.5 then
    		pl.CalcIdeal = ACT_HL2MP_IDLE_ZOMBIE
    	else
    		pl.CalcIdeal = ACT_HL2MP_RUN_ZOMBIE_FAST
    	end
    
    local speed = velocity:Length2D()
    	if not pl:OnGround() or pl:WaterLevel() >= 3 then
    		pl.CalcIdeal = ACT_ZOMBIE_LEAPING
    --	elseif speed <= 0.5 and wep:IsRoaring() then
    --		pl.CalcSeqOverride = pl:LookupSequence("angry_idle")
    	end		
    
    	return true
    end
    
    local mathrandom = math.random
    function CLASS:PlayerFootstep(pl, vFootPos, iFoot, strSoundName, fVolume, pFilter)
    	if iFoot == 0 and mathrandom(3) < 3 then
    		pl:EmitSound("")
    	else
    		pl:EmitSound("")
    	end
    
    	return true
    end
    
    function CLASS:PlayerStepSoundTime(pl, iType, bWalking)
    	if iType == STEPSOUNDTIME_NORMAL or iType == STEPSOUNDTIME_WATER_FOOT then
    		return 365 - pl:GetVelocity():Length()
    	elseif iType == STEPSOUNDTIME_ON_LADDER then
    		return 300
    	elseif iType == STEPSOUNDTIME_WATER_KNEE then
    		return 450
    	end
    
    	return 150
    end
    
    function CLASS:DoAnimationEvent(pl, event, data)
    	if event == PLAYERANIMEVENT_ATTACK_PRIMARY then
    		pl:AnimRestartGesture(GESTURE_SLOT_ATTACK_AND_RELOAD, ACT_GMOD_GESTURE_RANGE_ZOMBIE_SPECIAL, true)
    		return ACT_INVALID
    	end
    end
    
    function CLASS:UpdateAnimation(pl, velocity, maxseqgroundspeed)
    	pl:FixModelAngles(velocity)
    end
    
    if not CLIENT then return end
    
    --CLASS.Icon = ""
    
    


  • Hey there guys so I made a class of a xenomorph basing it off of the fast zombie’s code and I put in a function that looks for a certain SteamID of a player so it can be used by only that player and the player who’s STEAM ID I set cant see the class in the class menu. When i put my SteamID in I could see it and use it. heres the code for reference.

    CLASS.Name = "Xenomorph"
    CLASS.TranslationName = "class_xeno"
    CLASS.Description = "description_donate"
    CLASS.Help = "controls_xeno"
    
    CLASS.Model = Model("models/iffy/alienscm/alien/xeno_lurker_player.mdl")
    
    CLASS.Wave = 0
    CLASS.Unlocked = true
    CLASS.Hidden = true
    CLASS.Threshold = 0
    
    CLASS.Health = 325
    CLASS.Speed = 305
    CLASS.JumpPower = 300
    CLASS.SWEP = "weapon_zs_xeno"
    CLASS.NoFallDamage = true
    
    CLASS.Mass = DEFAULT_MASS * 1.5
    
    CLASS.Points = 8
    
    CLASS.PainSounds = {""}
    CLASS.DeathSounds = {"zombiesurvival/xeno_death.wav"}
    
    CLASS.ViewOffset = Vector(0, 0, 50)
    CLASS.Hull = {Vector(-16, -16, 0), Vector(16, 16, 64)}
    CLASS.HullDuck = {Vector(-16, -16, 0), Vector(16, 16, 35)}
    
    function CLASS:CanUse(pl)
    	return pl:SteamID() == "STEAM_0:0:042130849"
    end
    
    function CLASS:CalcMainActivity(pl, velocity)
    	if velocity:Length2D() <= 0.5 then
    		pl.CalcIdeal = ACT_HL2MP_IDLE_ZOMBIE
    	else
    		pl.CalcIdeal = ACT_HL2MP_RUN_ZOMBIE_FAST
    	end
    
    local speed = velocity:Length2D()
    	if not pl:OnGround() or pl:WaterLevel() >= 3 then
    		pl.CalcIdeal = ACT_ZOMBIE_LEAPING
    --	elseif speed <= 0.5 and wep:IsRoaring() then
    --		pl.CalcSeqOverride = pl:LookupSequence("angry_idle")
    	end		
    
    	return true
    end
    
    local mathrandom = math.random
    function CLASS:PlayerFootstep(pl, vFootPos, iFoot, strSoundName, fVolume, pFilter)
    	if iFoot == 0 and mathrandom(3) < 3 then
    		pl:EmitSound("")
    	else
    		pl:EmitSound("")
    	end
    
    	return true
    end
    
    function CLASS:PlayerStepSoundTime(pl, iType, bWalking)
    	if iType == STEPSOUNDTIME_NORMAL or iType == STEPSOUNDTIME_WATER_FOOT then
    		return 365 - pl:GetVelocity():Length()
    	elseif iType == STEPSOUNDTIME_ON_LADDER then
    		return 300
    	elseif iType == STEPSOUNDTIME_WATER_KNEE then
    		return 450
    	end
    
    	return 150
    end
    
    function CLASS:DoAnimationEvent(pl, event, data)
    	if event == PLAYERANIMEVENT_ATTACK_PRIMARY then
    		pl:AnimRestartGesture(GESTURE_SLOT_ATTACK_AND_RELOAD, ACT_GMOD_GESTURE_RANGE_ZOMBIE_SPECIAL, true)
    		return ACT_INVALID
    	end
    end
    
    function CLASS:UpdateAnimation(pl, velocity, maxseqgroundspeed)
    	pl:FixModelAngles(velocity)
    end
    
    if not CLIENT then return end
    
    --CLASS.Icon = ""
    
    


  • @Braintwistah:

    CLASS.Wave = 0
    CLASS.Description = “description_donate”

    Is this intended to be a “donator” class?



  • @Stelker:

    Is this intended to be a “donator” class?

    No it is a personal class that my friend donated for so only he can use the class.



  • But that’s still a donator class…

    STEAM_0:0:042130849

    Is this your friend’s STEAMID? Because it isn’t valid. Third section doesn’t start with 0, ever.



  • @Braintwistah:

    No it is a personal class that my friend donated for so only he can use the class.

    I am not going to be much help, but I had to point this out.

    GG to your logic, friend.



  • Its not a donator only class… but he donated for exclusive use?



  • What the hell happened to doing things for your friends because they’re your friends, not because they have money  :wacko:


Log in to reply
 

10
Online

11082
Users

15302
Topics

298006
Posts

Looks like your connection to NoXiousNet was lost, please wait while we try to reconnect.