Skip to content

Commit

Permalink
fix(server/player): set isDead as bool
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Mar 1, 2024
1 parent f1e2683 commit 818c973
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/player/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ export class OxPlayer extends ClassInterface {
* https://github.com/citizenfx/fivem/pull/2257 - state bag write policies
*/
const state = Player(this.source).state;
state.set('isDead', isDead ?? false, true);
state.set('isDead', isDead === 1, true);

DEV: console.info(`OxPlayer<${this.userId}> loaded character ${this.get('name')} (${this.charId})`);

Expand Down
2 changes: 1 addition & 1 deletion server/player/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export async function DeleteCharacter(charId: number) {

export function GetCharacterMetadata(charId: number) {
return db.row<{
isDead: boolean;
isDead: number;
gender: string;
dateOfBirth: string;
phoneNumber: string;
Expand Down

0 comments on commit 818c973

Please sign in to comment.