AR/reloadBans: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server function}} This function will reload the server ban list file. ==Syntax== <syntaxhighlight lang="lua"> bool reloadBans() </syntaxhighlight> ===Returns=== Returns ''true'' if the ban...")
 
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Server function}}
{{Server function}}
This function will reload the server ban list file.
(هذه الوظيفه ستقوم بإعادة تحميل ملف قائمة الحظر (الباندات
 
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
Line 8: Line 7:
</syntaxhighlight>
</syntaxhighlight>


===Returns===
===Returns النتائج===
Returns ''true'' if the ban list was reloaded successfully, ''false'' otherwise.
تكون النتيجه صحيحه اذا تمت إعادة تحميل ملف قائمة الحظر بنجاح, وتكون غير صحيحه اذا كان العكس
 
==مثال==
==Example==
هذا المثال يضيف الامر "reloadban" لإعادة تحميل ملف قائمة الحظر
This example add command "reloadban" to reload the server ban list file.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function ReBan (player)
function ReBan (player)
   if (reloadBans()) then
   if (reloadBans()) then -- اذا تمت اعادة تحميل ملف قائمةالحظر
       outputChatBox("Bans has been reloaded successfully.",player)
       outputChatBox("تم اعادة تحميل قائمة الحظر بنجاح.",player)
   else
   else
       outputChatBox("Failed to Reload Bans.",player)
       outputChatBox("فشل في إعادة تحميل قائمة الحظر.",player)
   end
   end
end
end
Line 24: Line 22:
</syntaxhighlight>
</syntaxhighlight>


==Requirements==
==المتطلبات==
{{Requirements|1.3.0-9.03931|n/a|}}
{{Requirements|1.3.0-9.03931|n/a|}}


==See Also==
==راجع ايضاً==
{{Admin functions}}
{{Admin functions}}

Revision as of 12:51, 11 December 2012

(هذه الوظيفه ستقوم بإعادة تحميل ملف قائمة الحظر (الباندات

Syntax

bool reloadBans()

Returns النتائج

تكون النتيجه صحيحه اذا تمت إعادة تحميل ملف قائمة الحظر بنجاح, وتكون غير صحيحه اذا كان العكس

مثال

هذا المثال يضيف الامر "reloadban" لإعادة تحميل ملف قائمة الحظر

function ReBan (player)
   if (reloadBans()) then -- اذا تمت اعادة تحميل ملف قائمةالحظر
      outputChatBox("تم اعادة تحميل قائمة الحظر بنجاح.",player)
   else
      outputChatBox("فشل في إعادة تحميل قائمة الحظر.",player)
   end
end
addCommandHandler("reloadban",ReBan)

المتطلبات

Minimum server version 1.3.0-9.03931
Minimum client version n/a

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.3.0-9.03931" />

راجع ايضاً