mirror of
https://github.com/shiroikitsu8/Bayshore_6r_legacy.git
synced 2024-12-01 02:27:22 +01:00
Update game.ts
This commit is contained in:
parent
36dbf5e7b0
commit
b98b704386
@ -1175,16 +1175,32 @@ export default class GameModule extends Module {
|
||||
}
|
||||
})
|
||||
|
||||
// Error handling if windowStickerString is undefined if user registering bannapass from terminal first instead of driver unit
|
||||
let wsString = "";
|
||||
let wsFont = 0;
|
||||
if(user.cars[0].windowStickerString !== null && user.cars[0].windowStickerString !== undefined && user.cars[0].windowStickerString !== ''){
|
||||
wsString = user.cars[0].windowStickerString;
|
||||
wsFont = user.cars[0].windowStickerFont;
|
||||
}
|
||||
else{
|
||||
|
||||
// No car data
|
||||
if(user.cars.length > 0)
|
||||
{
|
||||
wsString = 'WANGAN';
|
||||
wsFont = 0;
|
||||
}
|
||||
// There is car data
|
||||
else
|
||||
{
|
||||
// User atleast have cars
|
||||
if(user.cars){
|
||||
if(user.cars[0]?.windowStickerString !== null && user.cars[0]?.windowStickerString !== undefined && user.cars[0]?.windowStickerString !== ''){
|
||||
wsString = user.cars[0].windowStickerString;
|
||||
wsFont = user.cars[0].windowStickerFont;
|
||||
}
|
||||
}
|
||||
// User don't have car yet
|
||||
else{
|
||||
wsString = 'WANGAN';
|
||||
wsFont = 0;
|
||||
}
|
||||
}
|
||||
|
||||
let msg = {
|
||||
error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS,
|
||||
|
Loading…
Reference in New Issue
Block a user