AR/getPlayerFromName

From Multi Theft Auto: Wiki
Revision as of 15:13, 29 July 2015 by RamJano (talk | contribs) (Created page with "==تكوين الجملة== <syntaxhighlight lang="lua"> player getPlayerFromName ( string playerName ) </syntaxhighlight> {{OOP||اللاعب||}} ===الارقمنت=== * '''playerName''': اسم ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

تكوين الجملة

player getPlayerFromName ( string playerName )

OOP Syntax Help! I don't understand this!

Method: اللاعب(...)


الارقمنت

  • playerName: اسم اللاعب الذي تريد إحضاره

إرجاع

  • يقوم بإرجاع اللاعب الذي تم اختياره من قِبل اسمه

مثال

على سبيل المثال، يقوم هذا الامر "إرسال" بأرسال رسالة خاصة للاعب المحدد من الأمر

function send( player,command, playerName, ... )
	message = table.concat({...}, " ")
	outputChatBox("(PM) "..getPlayerName(player)..": "..message.."",getPlayerFromName(playerName),255,255,0)
end
addCommandHandler("إرسال", send)

آخر