Dota 2 Workshop Tools/Scripting/API/CDOTA BaseNPC.GetPlayerOwnerID: Difference between revisions
< Dota 2 Workshop Tools | Scripting | API
		
		
		
		Jump to navigation
		Jump to search
		| Thunder4ik (talk | contribs)  m (clean up, added deadend tag) | |||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| {{Dead end|date=January 2024}} | |||
| {{Note | This page is automatically generated.  Any changes may be overwritten}} | {{Note | This page is automatically generated.  Any changes may be overwritten}} | ||
| == Function Description == | == Function Description == | ||
| ''' int GetPlayerOwnerID() ''' | ''' int GetPlayerOwnerID() ''' | ||
| Line 10: | Line 9: | ||
| ''Get the owner player ID for this unit.'' | ''Get the owner player ID for this unit.'' | ||
| It is recommended that instead of this function you use GetOwner():GetPlayerID(). Units summoned in LUA will return -1 for :GetPlayerOwnerID(), but with GetOwner():GetPlayerID() it will correctly return the owners player ID | |||
| == Returns == | == Returns == | ||
| ''int'' - The owning players ID (0-9) If none is found than it will return -1 | ''int'' - The owning players ID (0-9) If none is found than it will return -1 | ||
| [[Category:Dota2Function]] | |||
| [[Category:CDOTA_BaseNPC]] | |||
Latest revision as of 09:11, 21 January 2024

This article has no  links to other VDC articles. Please help improve this article by adding links
 links to other VDC articles. Please help improve this article by adding links  that are relevant to the context within the existing text.
 that are relevant to the context within the existing text. 
January 2024
 links to other VDC articles. Please help improve this article by adding links
 links to other VDC articles. Please help improve this article by adding links  that are relevant to the context within the existing text.
 that are relevant to the context within the existing text. January 2024
 Note: This page is automatically generated.  Any changes may be overwritten
Note: This page is automatically generated.  Any changes may be overwrittenFunction Description
int GetPlayerOwnerID()
Get the owner player ID for this unit.
It is recommended that instead of this function you use GetOwner():GetPlayerID(). Units summoned in LUA will return -1 for :GetPlayerOwnerID(), but with GetOwner():GetPlayerID() it will correctly return the owners player ID
Returns
int - The owning players ID (0-9) If none is found than it will return -1