AR/isPedOnFire: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
{{Server client function}}
هذه الوظيفة تتحقق إذا كانت الشخصية في النار أو لا
هذه الوظيفة تتحقق إذا كانت الشخصية تحترق بالنار أو لا
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">bool isPedOnFire ( ped thePed )</syntaxhighlight>
<syntaxhighlight lang="lua">bool isPedOnFire ( ped thePed )</syntaxhighlight>

Latest revision as of 20:36, 31 March 2022

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

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