#how to remove status flattened / ran over / ran down
1 messages · Page 1 of 1 (latest)
Remove any calls to chat:addMessage
where would this be relating to the falttened? qb-ambulancejob?
Yes
if i remove them surely thecheck status in radial wont work?
RegisterNetEvent('hospital:client:CheckStatus', function()
local player, distance = GetClosestPlayer()
if player ~= -1 and distance < 5.0 then
local playerId = GetPlayerServerId(player)
QBCore.Functions.TriggerCallback('hospital:GetPlayerStatus', function(result)
if result then
for k, v in pairs(result) do
if k ~= 'BLEED' and k ~= 'WEAPONWOUNDS' then
statusChecks[#statusChecks + 1] = {
bone = Config.BoneIndexes[k],
label = v.label .. ' (' .. Config.WoundStates[v.severity] .. ')'
}
elseif result['WEAPONWOUNDS'] then
for _, v2 in pairs(result['WEAPONWOUNDS']) do
TriggerEvent('chat:addMessage', {
color = { 255, 0, 0 },
multiline = false,
args = { Lang:t('info.status'), QBCore.Shared.Weapons[v2].damagereason }
})
end
elseif result['BLEED'] > 0 then
TriggerEvent('chat:addMessage', {
color = { 255, 0, 0 },
multiline = false,
args = { Lang:t('info.status'),
Lang:t('info.is_status', { status = Config.BleedingStates[v].label }) }
})
else
QBCore.Functions.Notify(Lang:t('success.healthy_player'), 'success')
end
end
isStatusChecking = true
Status()
end
end, playerId)
else
QBCore.Functions.Notify(Lang:t('error.no_player'), 'error')
end
end)
No, it's not checking it by reading the chat message that is added - and that's the part you asked how to remove.
Just replace the chat message with notify
Or put menu or something to shows status
menu?
Yean i mean using qb menu to show player status on it
Just use this
RegisterNetEvent('hospital:client:CheckStatus', function()
local player, distance = GetClosestPlayer()
if player ~= -1 and distance < 5.0 then
local playerId = GetPlayerServerId(player)
QBCore.Functions.TriggerCallback('hospital:GetPlayerStatus', function(result)
if result then
for k, v in pairs(result) do
if k ~= 'BLEED' and k ~= 'WEAPONWOUNDS' then
statusChecks[#statusChecks + 1] = {
bone = Config.BoneIndexes[k],
label = v.label .. ' (' .. Config.WoundStates[v.severity] .. ')'
}
elseif result['WEAPONWOUNDS'] then
for _, v2 in pairs(result['WEAPONWOUNDS']) do
QBCore.Functions.Notify(Lang:t('info.status') .. ': ' .. QBCore.Shared.Weapons[v2].damagereason, 'error')
end
elseif result['BLEED'] > 0 then
QBCore.Functions.Notify(Lang:t('info.status') .. ': ' .. Lang:t('info.is_status', { status = Config.BleedingStates[v].label }), 'error')
else
QBCore.Functions.Notify(Lang:t('success.healthy_player'), 'success')
end
end
isStatusChecking = true
Status()
end
end, playerId)
else
QBCore.Functions.Notify(Lang:t('error.no_player'), 'error')
end
end)
It shows notify
And put the resolved tag if its done
will do just checking now
no luck with this sorry for the long reply.
Whats the problem ?
This must work, I checked it myself
My network is bad
Overwrite it
What the problem that in video
Remove any calls to chat:addMessage as MadCapz said previously you need to remove these occurences
Btw bro this is the event to check player status that near to you
He will take a day to respond as before :)
The problem is he is getting the chat message "flattened" and so on
He doesn't want that
Yea i replace the event he sent but he was talking to another thing
Well at least he got robust solution now. All he need to do now is perhaps refresh the cache before testing this out
okay imma give it a go now @austere fog sorry i had some things to attend to i didnt intend on being a long time but you know how things are, sometimes shit just takes longer than expected. thank you both of you for chiming in and helping me out.
No dw btw iam just joking with you
No worries Stan, we all got some priorities if you know what I mean, just want to help you out
always appricated sorry got side tracked again... restarting so ill keep u in the loop
works but cant revive
might be me hold up i just saw your clear cache msg
okay works fine, only one thats opped up so far was suicide