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 )
<script src="./server/functions/auth.js" type="server" language="javascript" />
<script src="./server/functions/main.js" type="server" language="javascript" />
TypeError: gta.setCameraLookAt is not a function
var cameraPosition = new Vec3(-1000.0, 191.5, 12.0);
var cameraLookAtPosition = new Vec3(-1000.0, 185.5, 11.5);
var jumpCut = true;
addEventHandler("OnPlayerJoined", (event, client) => {
if (typeof gta !== 'undefined' && gta !== null) {
gta.setCameraLookAt(cameraPosition, cameraLookAtPosition, jumpCut);
}
});