AR/isGuestAccount: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
m (Добавление языков)
 
(2 intermediate revisions by one other user not shown)
Line 13: Line 13:
===Required Arguments===  
===Required Arguments===  
*'''theAccount:''' الحساب الذي تريد ان تتحقق منه اذا كان غير مسجل
*'''theAccount:''' الحساب الذي تريد ان تتحقق منه اذا كان غير مسجل
''guest account''


===Returns===
===Returns===
Line 20: Line 18:


==مثال==  
==مثال==  
هذا المثال سوف يُريك كيف تسطيع ان تُنشئ كلمة للاعبين المسجلين فقط
هذا المثال سوف يُريك كيف تستطيع ان تُنشئ كلمة للاعبين المسجلين فقط
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function callAdmin ( playerSource )
function callAdmin ( playerSource )
Line 40: Line 38:
{{AR Account_functions}}
{{AR Account_functions}}
[[en:isGuestAccount]]
[[en:isGuestAccount]]
[[ru:isGuestAccount]]
[[ar:isGuestAccount]]
[[zh-cn:isGuestAccount]]

Latest revision as of 14:02, 12 April 2021

هذه الوظيفة تتحقق من حساب الاعب إذا كان مسجل الدخول أو لا

guest account

هو حساب يُنشئ اوتوماتيكياً عند دخول الاعب ويُمسح اوتوماتيكياً عند خروجه الا اذا كان الاعب مسجل في السيرفر من قبل

Syntax

bool isGuestAccount ( account theAccount )

Required Arguments

  • theAccount: الحساب الذي تريد ان تتحقق منه اذا كان غير مسجل

Returns

Returns true if the account is a guest account, false otherwise.

مثال

هذا المثال سوف يُريك كيف تستطيع ان تُنشئ كلمة للاعبين المسجلين فقط

function callAdmin ( playerSource )
    -- اختصار للتحقق من حساب اللاعب
    sourceAccount = getPlayerAccount ( playerSource )
    -- اذا كان غير مسجل
    if isGuestAccount ( sourceAccount ) then
        -- يقول لهم في لوحة اف 8 الآتي
        outputConsole ( "الرجاء التسجيل لـ تستخدم هذه الوظيفة", playerSource )
    else
       -- الطريقة التي تريد بها أن تصل للأدمن هنا
    end
end
-- يُمثَل الحدث هنا بـ كلمة " الادمن " لكي يتم الاتصال به
addCommandHandler ( "الادمن", callAdmin )

أنظر أيضاً