So I’m trying to make a notification, which shows up if the players health is equal to or lower than 25, every 30 seconds, for a duration of 5 seconds.
But none of it is working, no errors or anything. Without a timer the player will be spammed with notifications.
function notifyplayer( ply )
for _, ply in pairs( player.GetAll() ) do
if ( ply:Alive() ) then
if ply:Health() <= 25 then
ply:SendLua(“GAMEMODE:AddNotify(“this should pop up?”, NOTIFY_GENERIC, 4)”)
timer.Create( “notifytimer”, 10, 1, notifyplayer, ply )