File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
src/main/server/controllers Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 11import * as alt from 'alt-server' ;
22import * as native from 'natives' ;
3- import { PedOptions , OmitFirstArg } from '@Shared/types/index.js' ;
3+ import { PedOptions , OmitFirstArg } from '@Shared/types/index.js' ;
44import { Events } from '../../shared/events/index.js' ;
55import * as Utility from '@Shared/utility/index.js' ;
66
@@ -271,6 +271,19 @@ export function usePed(ped: alt.Ped, uid?: string) {
271271 } , 5000 ) ;
272272 }
273273
274+ /**
275+ * set ped dimension
276+ * @param ped
277+ * @param dimension
278+ * @returns
279+ */
280+ function setPedDimension ( ped : alt . Ped , dimension : number ) {
281+ if ( ! ped . valid ) {
282+ return ;
283+ }
284+ ped . dimension = dimension ;
285+ }
286+
274287 peds . set ( uid , {
275288 fadeOutAndDestroy,
276289 getClosestPlayer,
@@ -283,6 +296,7 @@ export function usePed(ped: alt.Ped, uid?: string) {
283296 setFrozen,
284297 setNoCollision,
285298 setOption,
299+ setPedDimension,
286300 } ) ;
287301
288302 return {
@@ -297,6 +311,7 @@ export function usePed(ped: alt.Ped, uid?: string) {
297311 setFrozen,
298312 setNoCollision,
299313 setOption,
314+ setPedDimension,
300315 } ;
301316}
302317
You can’t perform that action at this time.
0 commit comments