|
Name
|
EntitySpawn
|
|
Arguments
(in table)
|
object entity
|
|
Return option
|
None
|
Description
entity can be one of:
- Player
- Vehicle
- Checkpoint
- StaticObject
- ClientStaticObject
- ClientEffect
- ClientSound
To get the type, use
args.entity.__type.
Vehicles count as spawned when they automatically respawn.
On the client, when objects are streamed in, they fire the event as well, not just when they are created.
Example
function Foo(args)
print("A "..args.entity.__type.." just spawned.")
end
Events:Subscribe("EntitySpawn", Foo)