AR/getMarkerColor

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

هذه الوظيفة تقوم بجلب لون الماركر.

Syntax

int, int, int, int getMarkerColor ( marker theMarker )

OOP Syntax Help! I don't understand this!

Method: Marker:getColor(...)
Counterpart: setMarkerColor


Required Arguments

  • theMarker: الماركر الذي تريد جلب لونه.


Example

Click to collapse [-]
Serverside example

هذا المثال يجلب لون الماركر ان كان ابيض يعطي دم وان احمر يقتل .

function healOrKill ( hitMarker, matchingDimension )
	
	if not matchingDimension then
		return
	end
	
	local R, G, B, A = getMarkerColor( hitMarker )-- نجلب لون الماركر
	-- (255,255,255) اذا كان اللون ابيض
	if R == 255 and G == 255 and B == 255 then
		--نعطي دم 100
		setElementHealth( source, 100 )
	--(255,0,0) اذا كان اللون احمر
	elseif R == 255 and G == 0 and B == 0 then
		-- نقتل الاعب
		killPed( source )
	end
end
--حدث عند لمس الماركر
addEventHandler( "onPlayerMarkerHit", getRootElement(), healOrKill )

See Also