I keep trying to use this check to make sure the ply is alive before paying him and I keep getting IsAlive as a nil value dont know why. The file is a shared.lua.
[CODE]if PAYDAYS then
timer.Create( "payday_timer", PAYDAY_INTERVAL, 0, function()
for k, ply in pairs(player.GetAll()) do
if ply:IsAlive() then
ply:Money_Add( PAYDAY_AMOUNT )
end
if PAYDAY_SOUND then
ply:EmitSound("tools/ifm/beep.wav")
end
end
end )
end[/CODE]
I also trying !ply:IsAlive in a different way as an alternative and still nothing.
Edit:
Im an idiot, ply:Alive. Thanks anyways.
You could at least try to find stuff out before posting here
Sorry, you need to Log In to post a reply to this thread.