AR/setPlayerMoney: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
 (→مثال)  | 
				|||
| Line 8: | Line 8: | ||
'''Example :'''في هذا المثال يقوم اللاعب بكتابة الامر 'setcash' في اف 8 وسوف يقوم بوضع ماله ل 5000 .  | '''Example :'''في هذا المثال يقوم اللاعب بكتابة الامر 'setcash' في اف 8 وسوف يقوم بوضع ماله ل 5000 .  | ||
<syntaxhighlight lang="lua">  | <syntaxhighlight lang="lua">  | ||
function setCash(thePlayer  | function setCash(thePlayer)  | ||
     setPlayerMoney(thePlayer, tonumber(5000))      |      setPlayerMoney(thePlayer, tonumber(5000))      | ||
end  | end  | ||
addCommandHandler("setcash", setCash)           | addCommandHandler("setcash", setCash)           | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
Latest revision as of 09:13, 17 April 2018
هذه الوظيفة تقوم بوضع مال اللاعب
الجملة التركيبية
bool setPlayerMoney( player thePlayer, int amount )
العناصر المطلوبة
- thePlayer: اللاعب المراد وضع امواله.
 - amount: عدد الاموال التي تريد ان تضعها للاعب.
 
مثال
Example :في هذا المثال يقوم اللاعب بكتابة الامر 'setcash' في اف 8 وسوف يقوم بوضع ماله ل 5000 .
function setCash(thePlayer)
    setPlayerMoney(thePlayer, tonumber(5000))   
end
addCommandHandler("setcash", setCash)