BigChungus 0 Posted June 4, 2019 Share Posted June 4, 2019 as the title suggests, i'm wondering how to create an auto kill enemies option in c++, i know there's something involved with the blips and all that but i'm not too sure how to work with it. Link to post Share on other sites
fwiskalicious 7 Posted June 5, 2019 Share Posted June 5, 2019 Use worldGetAllPeds(int *arr, int arrSize) to get all the NPCs in the area, and store them into an array with a size of your choice (1024 for example). Then, iterate through the array and check the blip color for red using UI::GET_BLIP_COLOUR of the current ped in the array, and also check if it's not the player. You may also want to check if the vehicle they are in has a red blip too. After that, you can kill them however you like. Link to post Share on other sites
BigChungus 0 Posted June 5, 2019 Author Share Posted June 5, 2019 16 hours ago, fwiskalicious said: Use worldGetAllPeds(int *arr, int arrSize) to get all the NPCs in the area, and store them into an array with a size of your choice (1024 for example). Then, iterate through the array and check the blip color for red using UI::GET_BLIP_COLOUR of the current ped in the array, and also check if it's not the player. You may also want to check if the vehicle they are in has a red blip too. After that, you can kill them however you like. is worldGetAllPeds a native? or what is it? i can't seem to find it in my base. Link to post Share on other sites
fwiskalicious 7 Posted June 5, 2019 Share Posted June 5, 2019 4 minutes ago, BigChungus said: is worldGetAllPeds a native? or what is it? i can't seem to find it in my base. It’s a provided function in the ScriptHookV library as far as I’m aware. Link to post Share on other sites
BigChungus 0 Posted June 5, 2019 Author Share Posted June 5, 2019 Just now, fwiskalicious said: It’s a provided function in the ScriptHookV library as far as I’m aware. The scripthookv.lib file? i've got it, thanks man! do you also know how to draw the instruction buttons? i use c++ and a custom base not something like scripthookv Link to post Share on other sites
fwiskalicious 7 Posted June 5, 2019 Share Posted June 5, 2019 You found the function? The instructional buttons are well explained over in this thread. Which base are you using? Link to post Share on other sites