AR/isPedOnFire: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server client function}} هذه الوظيفة تتحقق إذا كانت الشخصية في النار أو لار ==Syntax== <syntaxhighlight lang="lua">bool is...")
(No difference)

Revision as of 21:02, 18 May 2020

هذه الوظيفة تتحقق إذا كانت الشخصية في النار أو لار

Syntax

bool isPedOnFire ( ped thePed )

OOP Syntax Help! I don't understand this!

Method: ped:isOnFire(...)
Variable: .onFire
Counterpart: setPedOnFire


Required Arguments

  • thePed: الشخصية الذي تود التحقق اذا كانت بالنار او لا

Returns

Returns true if the ped is on fire, false otherwise.

مثال

Click to collapse [-]
Server

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

local randomPlayer = getRandomPlayer() -- جلب لاعب عشوائي من السيرفر
if isPedOnFire ( randomPlayer ) then -- تحقق اذا كان اللاعب فوق النار
	giveWeapon ( randomPlayer, 42, 100, true ) -- اعطاء اللاعب طفاية الحريق
end -- إغلاق التحقق ..

See Also