Hey everyone.
I would like to be able to press use on my entity, have the player freeze for five seconds, and have the player then unfreeze, all while adding a value to that SPECIFIC player (NOTE: I do not want the player to receive the value or have the entity disappear if they die while frozen).
Here's my code so far:
[CODE]function ENT:Use( activator, ply, useType, value )
ply:Freeze( true )
timer.Create( "Collection Timer", 5, 1, function() TimerDone() end)
end[/CODE]
Any help is appreciated :)
[CODE]function ENT:Use( activator, ply, useType, value )
ply:Freeze( true )
timer.Simple( 6, function() ply:Freeze( false) if(ply:IsAlive()) then ply:SetNWInt("YourValue",69) end end)
end[/CODE]
Note: If you use ply:freeze(), then they won't be able to die. They'll still be frozen even when dead.
In the console it says IsAlive is a nil value
[QUOTE]attempt to call method 'IsAlive' (a nil value)[/QUOTE]
[editline]24th April 2016[/editline]
Nevermind xD. the class is "Alive" not "IsAlive"
Sorry, you need to Log In to post a reply to this thread.