OnClientPedStep

From Multi Theft Auto: Wiki
Revision as of 21:38, 1 September 2019 by Qaisjp (talk | contribs) (needs checking local player trigger only)
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.

This event is called when a peds foot has come on to the ground after jumping or taking a full step.

Dialog-information.png This article needs checking.

Reason(s): This event only seems to be trigger for the local player
[[{{{image}}}|link=|]] Note: This event is only triggered for peds that are streamed in

Parameters

 bool leftFoot
  • leftFoot: a bool representing if it was the left foot that moved.

Source

The source of this event is the ped who stepped.

Requirements

Minimum supported server n/a
Minimum supported client 1.5.6.14735

Note: Using this function/event requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.5.6.14735" />

Example

addEventHandler("onClientPedStep", localPlayer,
     function(leftFoot)
          if (leftFoot) then
               outputChatBox("Your left foot hit the ground.", 0, 255, 0)
          else
               outputChatBox("Your right foot hit the ground.", 0, 255, 0)
          end
     end
)

</section>

See Also

Client ped events

BETA: FROM VERSION 1.5.8 r20740 ONWARDS


Client event functions