Hello there,
Ive been looking for a script that enables players to equip body armor (via AddArmourToPed(GetPlayerPed(-1), 100)) or heal themselves (via SetEntityHealth(GetPlayerPed(-1), 200)) with a key to do so. That shouldnt happen in an instant though but should take like a few seconds during which the player is unable to move or equip a weapon. In a best case scenario it also has a progressBar which shows the player how far they have progressed in trying to apply the vest. I would like to have this a script like this for a PvP gamemode in which it doesnt matter if you actually have a vest as an item in your inventory but which allows you to equip one anyways. It would also be great if there was something similar for healing the player by pressing a different key.
Does anyone if a script like this already exists or how I could possibly make one?
I’m not sure how to use this native “AddArmourToPed”. I highly recommend you use both native ones I sent in the first reply.
As for the notification part, which framework are you using?
“Sadly, the code only works until the ped is freezed.”
You declared that the ped needed to be frozen in order for the rest of the code to run, so when the ped is no longer frozen, it will consequently not run.
FreezeEntityPosition(PlayerPedId(), true)
I hope I have helped and that I have clarified your doubts.