Hello. I was wondering if there were any fixes for this.
[U]Those on the dead team can be set on fire from multiple ways (such as dying from lava on some maps), damaging others who are alive.[/U] Searching didn't bring anything up, so here I am. ;]
All help is appreciated.
Something like this, should work for TTT but not incredibly optimised.
[Lua]
hook.Add( "Think", "CheckForSpecFire", function()
for k,v in pairs( player.GetAll() ) do
if v:IsOnFire() and v:IsSpec() then
v:Extinguish()
end
end
end)
[/lua]
Put it in lua/autorun/server
Doing it on PlayerDeath would be better.
[code]hook.Add( "PlayerDeath", "ExtinguishGhosts", function( _p, _inflictor, _attacker )
if ( IsValid( _p ) && _p:IsOnFire( ) ) then
_p:Extinguish( );
end
end );[/code]
[QUOTE=Acecool;46482659]Doing it on PlayerDeath would be better.
[code]hook.Add( "PlayerDeath", "ExtinguishGhosts", function( _p, _inflictor, _attacker )
if ( IsValid( _p ) && _p:IsOnFire( ) ) then
_p:Extinguish( );
end
end );[/code][/QUOTE]
Is there any code like this for spectators holding weapons?
[QUOTE=monstermega10;46482755]Is there any code like this for spectators holding weapons?[/QUOTE]
player:RemoveAllItems( )
But how did they get weapon in first place?
[QUOTE=GreenGold;46484582]player:RemoveAllItems( )
But how did they get weapon in first place lmao[/QUOTE]
It seems as if i spawn into the server a second before the server starts, i get the gun in my hand. Or if i go into spectator mode 1 second before the game starts, it spawns in my hand.
[QUOTE=monstermega10;46484621]It seems as if i spawn into the server a second before the server starts, i get the gun in my hand. Or if i go into spectator mode 1 second before the game starts, it spawns in my hand.[/QUOTE]
are you using addon that gives player selected loadout or something similar that gives player guns?
Pointshop is the only thing i could think of
I'm pretty sure pointshop is removing all equipped items on death so it's probably not pointshop.
[QUOTE=GreenGold;46484742]I'm pretty sure pointshop is removing all equipped items on death so it's probably not pointshop.[/QUOTE]
Can't seem to think of any addons that would mess with the load out.
Do you know if "player:RemoveAllItems( )" would override whatever that is?
[QUOTE=monstermega10;46484766]Can't seem to think of any addons that would mess with the load out.
Do you know if "player:RemoveAllItems( )" would override whatever that is?[/QUOTE]
you can try something like this:
[CODE]
hook.Add( "PlayerDeath", "ExtinguishGhosts", function( _p, _inflictor, _attacker )
if IsValid( _p ) then
_p:RemoveAllItems( )
if _p:IsOnFire( ) then
_p:Extinguish( );
end
end
end );
[/CODE]
Or you can try this
[CODE]
hook.Add( "TTTBeginRound", "CheckForGunz", function()
for k,ply in pairs( player.GetAll() ) do
if IsValid (ply) and ply:IsSpec() then
ply:RemoveAllItems()
end
end
end)
[/CODE]
[QUOTE=Acecool;46482659]Doing it on PlayerDeath would be better.
[code]hook.Add( "PlayerDeath", "ExtinguishGhosts", function( _p, _inflictor, _attacker )
if ( IsValid( _p ) && _p:IsOnFire( ) ) then
_p:Extinguish( );
end
end );[/code][/QUOTE]
Thank you :D I'll test this out.
Also is there a way to check for spectators in general? There are some fire weapons out that that can light spectators on fire if they are within in the general radius of the explosion.
[QUOTE=Gengarism;46486232]Thank you :D I'll test this out.
Also is there a way to check for spectators in general? There are some fire weapons out that that can light spectators on fire if they are within in the general radius of the explosion.[/QUOTE]
You have to give us code of those weapons or use think hook instead playerdeath
Sorry, you need to Log In to post a reply to this thread.