AR/isPedOnFire

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

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

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