- Initiateur de la discussion
A
AlbanC
Geek suprême
- Messages
- 72
- Score réaction
- 2
- Points
- 100
Bonjour j'ai des problèmes au niveau de mes timers :
Voici erreur
Code:
-----------------------------------------------------
-----------------------------------------------------
if SERVER then
AddCSLuaFile()
hook.Add("PlayerDeath", "scpbite096", function(ply)
ply:SetNWBool("seenby096", false) if ply:Team() == TEAM_SCP096 then end
end)
hook.Add("PlayerDisconnected", "scpbitejeej096", function(ply)
ply:SetNWBool("seenby096", false) if ply:Team() == TEAM_SCP096 then end
end)
hook.Add("PlayerSpawn", "scpbitejeejrp096", function(ply)
ply:SetNWBool("seenby096", false)
end)
hook.Add("Think","target096",function() for _,ply in ipairs(player.GetAll()) do if ply:GetNWBool("seenby096") then continue end trace = ply:GetEyeTrace() if ply:Team() == TEAM_SCP035 or ply:Team() == TEAM_SCP049 or ply:Team() == TEAM_SCP079 or ply:Team() == TEAM_SCP173 or ply:Team() == TEAM_SCP006FR or ply:Team() == TEAM_SCP008 or ply:Team() == TEAM_SCP087 or ply:Team() == TEAM_SCP1048 or ply:Team() == TEAM_SCP106 or ply:Team() == TEAM_SCP131A or ply:Team() == TEAM_SCP131B or ply:Team() == TEAM_SCP513 or ply:Team() == TEAM_SCP666 or ply:Team() == TEAM_SCP682 or ply:Team() == TEAM_SCP895 or ply:Team() == TEAM_SCP999 or ply:Team() == TEAM_SCP029 or ply:Team() == TEAM_IA or ply:Team() == TEAM_ROBOT or ply:Team() == TEAM_SCP082 or ply:Team() == TEAM_CHIEN or ply:Team() == TEAM_BEBE or ply:Team() == TEAM_SOMMEIL or ply:Team() == TEAM_BIGHDKD or ply:Team() == TEAM_ADMIN or ply:Team() == TEAM_STAFF or ply:Team() == TEAM_OMBRE or ply:Team() == TEAM_SCP860 or ply:Team() == TEAM_SCP202 then continue end if IsValid(trace.Entity) and trace.Entity:IsPlayer() and ply:Alive() and trace.Entity:Team() == TEAM_SCP096 then ply:SetNWBool("seenby096", true) ply:PrintMessage(HUD_PRINTTALK, "Vous l'avez vu... vous ne lui echapperez pas...") trace.Entity:PrintMessage(HUD_PRINTTALK, ply:Name().." vous a vu...") trace.Entity:SetWalkSpeed(1) trace.Entity:SetRunSpeed(2) trace.Entity:EmitSound("scp096/crying.wav") timer.Simple(35, function() trace.Entity:SetWalkSpeed(500) trace.Entity:SetRunSpeed(500) print("1") trace.Entity:EmitSound("scp096/scream.wav") timer.Simple(53, function() trace = ply:GetEyeTrace() trace.Entity:SetWalkSpeed(100) trace.Entity:SetRunSpeed(100) print("2") end) end) end end
end)
end
if CLIENT then
hook.Add("PreDrawOpaqueRenderables", "drawhalo096", function() if LocalPlayer():Team() == TEAM_SCP096 then for k,v in pairs(player.GetAll()) do if v:GetNWBool("seenby096") then if v:Alive() then halo.Add({v}, Color(255, 0, 0), 3, 3, 10, false, true); end end end end
end)
end
Code:
[ERROR] addons/arme_096/lua/autorun/scp096.lua:42: attempt to call method 'SetWalkSpeed' (a nil value) 1. unknown - addons/arme_096/lua/autorun/scp096.lua:42
Timer Failed! [Simple][@addons/arme_096/lua/autorun/scp096.lua (line 41)]
Dernière édition: