AR/removeAccount: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
m (Добавление языков)
 
(3 intermediate revisions by 3 users not shown)
Line 18: Line 18:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function onCmdDeregister(player)
function onCmdDeregister(player)
-- get the account
-- ناخد حساب لاعب
local playerAccount = getPlayerAccount(player)
local playerAccount = getPlayerAccount(player)
if playerAccount then
if playerAccount then  
removeAccount(playerAccount)
removeAccount(playerAccount) -- نحذف الحساب
outputChatBox("Account deregistered for "..getPlayerName(player))
outputChatBox("Account deregistered for "..getPlayerName(player))
else  
else  
Line 30: Line 30:
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==انظر ايضاً==
{{AR Account_functions}}
{{AR Account_functions}}


[[en:setAccountPassword]]
[[en:removeAccount]]
[[ru:removeAccount]]
[[ar:removeAccount]]

Latest revision as of 15:20, 12 April 2021

هذه الوظيفة لـ حذف حساب مسجل مسبقاً

Syntax

bool removeAccount ( account theAccount )

العناصر المطلوبة

  • theAccount: الحساب الذي تريد حذفه

Returns

إذا كان الحساب غير موجود false ,إذا تم حذف الحساب بنجاح true يرجع

مثال

/deregister هذا المثال يقوم بحذف حسابك عند أستخدام

function onCmdDeregister(player)
	-- ناخد حساب لاعب
	local playerAccount = getPlayerAccount(player)
	if playerAccount then 
		removeAccount(playerAccount) -- نحذف الحساب
		outputChatBox("Account deregistered for "..getPlayerName(player))
	else 
		outputChatBox("Unable to get your account, make sure you are logged in", player)
	end
end
addCommandHandler("deregister",onCmdDeregister)

انظر ايضاً