isPedDoingGangDriveby | Multi Theft Auto: Wiki Skip to content

isPedDoingGangDriveby

Client-side
Server-side
Shared

Pair: setPedDoingGangDriveby

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 checks if the ped is in the driveby state.

Syntax

isPedDoingGangDriveby ( )

Code Examples

server

This example turns on driveby mode when the local player typesdrivebyin the console.

function setDoingDriveby ( )
-- we check if local player isn't currently doing a gang driveby
if not isPedDoingGangDriveby ( localPlayer ) then
-- if he got driveby mode off, turn it on
setPedWeaponSlot ( localPlayer, 4 )
setPedDoingGangDriveby ( localPlayer, true )
else
-- otherwise, turn it off
setPedWeaponSlot ( localPlayer, 0 )
setPedDoingGangDriveby ( localPlayer, false )
end
end
addCommandHandler ( "driveby", setDoingDriveby )

See Also