AR/getPlayerName: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| (2 intermediate revisions by the same user not shown) | |||
| Line 6: | Line 6: | ||
</section>  | </section>  | ||
<section name="Client" class="client" show="true">  | <section name="Client" class="client" show="true">  | ||
<syntaxhighlight lang="lua">  | <syntaxhighlight lang="lua">string getPlayerName ( thePlayer )</syntaxhighlight>    | ||
==: مثال==     | ==: مثال==     | ||
| Line 12: | Line 12: | ||
هذا المثال يظهر اسم الاعب في الشات    | هذا المثال يظهر اسم الاعب في الشات    | ||
<syntaxhighlight lang="lua">  | <syntaxhighlight lang="lua">  | ||
function Name () -- أضافة وظيفة  | |||
local localPlayerName = getPlayerName(getLocalPlayer()) -- أحظار اسم الاعب  | |||
outputChatBox(localPlayerName,255,255,0,true) -- اخراج صندوق دردشه في الشات  | |||
end --   | |||
addCommandHandler("Name", Name) -- اضافة امر في الكونسول  | |||
</syntaxhighlight>  | </syntaxhighlight>  | ||
</section>  | </section>  | ||
For Wnash Time ..  | |||
Latest revision as of 00:28, 1 February 2015
: ملاحظة
ملأحظة : هاذي الوظيفة تقوم بـجلب اسم الاعب
عناصر مطلوبة
- thePlayer: اللاعب الذي سيحصل على اسم الاعب
 
</section>
Click to collapse [-]
Clientstring getPlayerName ( thePlayer )
: مثال
<section show="true" name="المثال الأول - Client" class="client"> هذا المثال يظهر اسم الاعب في الشات
function Name () -- أضافة وظيفة
local localPlayerName = getPlayerName(getLocalPlayer()) -- أحظار اسم الاعب
outputChatBox(localPlayerName,255,255,0,true) -- اخراج صندوق دردشه في الشات
end -- 
addCommandHandler("Name", Name) -- اضافة امر في الكونسول
For Wnash Time ..