CreateDog
Gives a player a dog that follows them.
soul names the look - a soul of the Dog archetype from the dog souls by name, id or GUID; nil = the
plain dog. x, y, z, yaw is where it appears; without them, two metres in front of the master. A player who already has a
dog gets the one they have. nil when the player is not in the world or the world is full.
Syntax
Section titled “Syntax”CreateDog(pid [, soul, x, y, z, yaw])| Parameter | Type | |
|---|---|---|
pid |
number | the master |
soul |
string | number | a dog soul’s name, id or GUID; nil = the plain dog (optional) |
x |
number | metres; without a point the dog appears in front of the master (optional) |
y |
number | metres (optional) |
z |
number | metres (optional) |
yaw |
number | degrees (optional) |
Returns
Section titled “Returns”number - the dog’s entity id; nil when it could not be made
Example
Section titled “Example”function OnPlayerSpawn(pid) if GetPlayerData(pid, "houndmaster") then CreateDog(pid) endendSee also
Section titled “See also”GetPlayerDog · DestroyEntity · FindSouls · the Dogs group of the index
