OnClientMarkerHit: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 20: Line 20:
function MarkerHit ( hitPlayer, matchingDimension )--عند لمس اللاعب للماركر
function MarkerHit ( hitPlayer, matchingDimension )--عند لمس اللاعب للماركر
outputChatBox ( getPlayerName(hitPlayer) .. " entered a marker" )--نخرج نص ب الشات
outputChatBox ( getPlayerName(hitPlayer) .. " entered a marker" )--نخرج نص ب الشات
end
end--انهاء
addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit )--اضافة الحدث عند اللمس
addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit )--اضافة الحدث عند اللمس
</syntaxhighlight>
</syntaxhighlight>

Revision as of 21:26, 26 September 2016

This event is triggered when a player enters a marker created using createMarker.

Parameters

player hitPlayer, bool matchingDimension
  • hitPlayer: The player that hit the marker
  • matchingDimension: true if the player is in the same dimension as the marker he hit

Source

The source of this event is the marker that got hit by the player.

Example

This code will output a message to the chatbox whenever any player walks into any marker.

function MarkerHit ( hitPlayer, matchingDimension )--عند لمس اللاعب للماركر
	outputChatBox ( getPlayerName(hitPlayer) .. " entered a marker" )--نخرج نص ب الشات
end--انهاء
addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit )--اضافة الحدث عند اللمس

See Also

Client marker events


Client marker functions