isPedReloadingWeapon | Multi Theft Auto: Wiki Skip to content

isPedReloadingWeapon

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function is used to determine whether or not a ped is currently reloading their weapon. Useful to stop certain quick reload exploits.

Syntax

isPedReloadingWeapon ( )

Code Examples

server

This example checks if the player who enters the/amireloadingcommand is reloading and outputs a message.

function isHeReloading( )
if isPedReloadingWeapon( localPlayer ) then
outputChatBox( "You are reloading a weapon" )
else
outputChatBox( "No, you're not reloading a weapon" )
end
end
addCommandHandler( "amireloading", isHeReloading )

See Also