• Fix for respawning players on fire
    0 replies, posted
I'm trying to extinguish every player that respawns on fire (This happens when you ignite somebody and they die before the fire burns out). However I cannot for the hell of it make this work. I've tried different hooks and nothing helped. [code] local function RespawnFireFix(ply) --if ply:IsOnFire() then --ply:Ignite(5) ply:Extinguish() --end end hook.Add("PlayerSpawn", "RespawnFireFix", RespawnFireFix) [/code] If I die normally but uncomment the ignite line above then the extinguish method works correctly. However I can't make it work for ignitions that happened before player death. Is it a bug? Is it a feature or am I missing something? Edit: I think I've found out why this happens. Upon printing which entities are ignited we get this (I spawn the entity which ignites me and nothing else) [code] Entity [35][info_player_start] Entity [36][info_player_start] Entity [37][info_player_start] Entity [42][info_player_start] Entity [43][info_player_start] Entity [44][info_player_start] Entity [49][info_player_start] Entity [50][info_player_start] Entity [51][info_player_start] Entity [56][info_player_start] Entity [57][info_player_start] Entity [58][info_player_start] Entity [68][predicted_viewmodel] Weapon [75][weapon_crowbar] Weapon [76][weapon_pistol] Weapon [77][weapon_smg1] Weapon [78][weapon_frag] Weapon [79][weapon_physcannon] Weapon [80][weapon_crossbow] Weapon [81][weapon_shotgun] Weapon [82][weapon_357] Weapon [83][weapon_rpg] Weapon [84][weapon_ar2] Weapon [85][gmod_tool] Weapon [86][gmod_camera] Weapon [87][weapon_physgun] Entity [89][predicted_viewmodel] Entity [90][predicted_viewmodel] Entity [67][gb_explosivebarrel] Entity [73][crossbow_bolt] Entity [92][env_sprite] Entity [93][env_sprite] [/code] So I guess technically the player cannot be extinguished because he's not on fire - his weapons are :v
Sorry, you need to Log In to post a reply to this thread.