AR/removeAccount: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 14: Line 14:
إذا كان الحساب غير موجود ''false'' ,إذا تم حذف الحساب بنجاح ''true'' يرجع  
إذا كان الحساب غير موجود ''false'' ,إذا تم حذف الحساب بنجاح ''true'' يرجع  


==Example==  
==مثال==  
/deregister هذا المثال يقوم بحذف حسابك عند أستخدام
/deregister هذا المثال يقوم بحذف حسابك عند أستخدام
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">

Revision as of 10:30, 25 August 2012

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

Syntax

bool removeAccount ( account theAccount )

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

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

Returns

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

مثال

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

function onCmdDeregister(player)
	-- get the account
	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)

See Also