Hey guys, its me again.
Since im still learning how to do all that stuff, heres another question.
This time im trying to do something that runs all the time a player is online (timer), and get removed on disconnect. The thing is, im not sure how. Thats what i have already:
function OnPlayerSpawn() local delay = 10 timer.Create( "Thing", delay, 0, function(ply) end) end hook.Add( "PlayerInitialSpawn", "Incoming", OnPlayerSpawn) local function DisconnectedCheck() self:timer.Remove( "Thing" ) end hook.Add( "PlayerDisconnected", "Dischconnect", DisconnectedCheck, -20 )
Is that correct? Does something else needs to be added there?
[editline]26th July 2015[/editline]
Also, it happened to me ever since. Why do i get this error
attempt to call field 'notifyAll' (a nil value)
for example for that?
DarkRP.notifyAll( 3, 5, "Message")