Revision Difference
Player:RemovePData#552601
<function name="RemovePData" parent="Player" type="classfunc">
<description>
Removes a **P**layer **Data** key-value pair from the SQL database. (sv.db when called on server, cl.db when called on client)
Internally uses the <page>sql</page>.
Removes a **P**ersistent **Data** key-value pair from the SQL database. (`sv.db` when called on server, `cl.db` when called on client)
Internally uses the <page>sql</page> library. See <page>util.RemovePData</page> for cases when the player is not currently on the server.
<warning>This function internally uses <page>Player:UniqueID</page>, which can cause collisions (two or more players sharing the same PData entry). It's recommended that you don't use it. See the related wiki page for more information.</warning>
</description>
<realm>Shared</realm>
<file line="184-L193">lua/includes/extensions/player.lua</file>
<args>
<arg name="key" type="string">Key to remove</arg>
</args>
<rets>
<ret name="" type="boolean">true is succeeded, false otherwise</ret>
</rets>
</function>
<example>
<description>Deletes the key "money" from player 1</description>
<code>Entity( 1 ):RemovePData( "money" )</code>
</example>