Hi, i want to know if you can get more than 100% Armour / Health im right now working on some bullet proof vests and i dont know how to get more than 100 armour so i can get more bullets in the vest!
Its a copy of the bulletproof vest in esx_extraitems and here is my code bit ish
RegisterNetEvent('esx_extraitems:heavybulletproof')
AddEventHandler('esx_extraitems:heavybulletproof', function()
local playerPed = GetPlayerPed(-1)
SetPedComponentVariation(playerPed, 9, 27, 9, 2)
AddArmourToPed(playerPed, 400)
SetPedArmour(playerPed, 400)
end)
i got it in server and everything and as an item in SQL!
Possibly someone might know, but to my knowledge there isnt a way or a native for it! Not sure why you have an SQL for an item, i’m confused… ESX confuses me, it’s very bad!
Use SetPlayerMaxArmour and SetEntityMaxHealth.
// 0x77DFCCF5948B8C71 0xC6C3C53B
// SetPlayerMaxArmour
void SET_PLAYER_MAX_ARMOUR(Player player, int value);
Default is 100. Use player id and not ped id. For instance: PLAYER::SET_PLAYER_MAX_ARMOUR(PLAYER::PLAYER_ID(), 100); // main_persistent.ct4
// 0x166E7CF68597D8B5 0x96F84DF8
// SetEntityMaxHealth
void SET_ENTITY_MAX_HEALTH(Entity entity, int value);
For instance:
ENTITY::SET_ENTITY_MAX_HEALTH(PLAYER::PLAYER_PED_ID(), 200); // director_mode.c4: 67849
ESX holds items’ information ( id, item name, price, inventory limit of that item, weight? ) in its database.
i cant really understand you cause im an big noob but if you can explain it abit more its very nice of you!
RegisterNetEvent('esx_extraitems:heavybulletproof')
AddEventHandler('esx_extraitems:heavybulletproof', function()
local playerPed = GetPlayerPed(-1)
SetPlayerMaxArmour(-1,400)
SetPedComponentVariation(playerPed, 9, 27, 9, 2)
AddArmourToPed(playerPed, 400)
SetPedArmour(playerPed, 400)
end)
2 Likes
yeah that’s dumb, server tables and other alternates…
Can you do the same with Health?
how far can you push SetPlayerMaxArmour if default is 100…
is there a limit ?
the native dont tell
pliz can someone make a full script of that cuz i really ned that
1 Like