Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- THIS FILE IS A MODDED VERSION OF A FILE PART OF GTA V SCRIPT HOOK SDK
- http://dev-c.com
- (C) Alexander Blade 2015
- */
- #include "script.h"
- #include "keyboard.h"
- void update_features()
- {
- while (ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID()) || PLAYER::IS_PLAYER_BEING_ARRESTED(PLAYER::PLAYER_ID(), TRUE))
- WAIT(0);
- Ped playerPed = PLAYER::PLAYER_PED_ID();
- BOOL bPlayerExists = ENTITY::DOES_ENTITY_EXIST(playerPed);
- if (bPlayerExists){
- const int numElements = 20;
- const int arrSize = numElements * 2 + 2;
- int peds[arrSize];
- //0 index is the size of the array
- peds[0] = numElements;
- int count = PED::GET_PED_NEARBY_PEDS(PLAYER::PLAYER_PED_ID(), peds, 50);
- if (peds != NULL)
- {
- //Simple loop to go through results
- for (int i = 0; i < count; i++)
- {
- int offsettedID = i * 2 + 2;
- //Make sure it exists
- if (peds[offsettedID] != NULL && ENTITY::DOES_ENTITY_EXIST(peds[offsettedID]))
- {
- //Do something
- PED::SET_PED_CAN_RAGDOLL(peds[offsettedID], FALSE);
- ENTITY::SET_ENTITY_PROOFS(peds[offsettedID], 0, 0, 0, 1/*collisionProof*/, 0, 0, 0, 0);
- /*
- void SET_ENTITY_PROOFS(Entity entity, BOOL bulletProof, BOOL fireProof,
- BOOL explosionProof, BOOL collisionProof, BOOL meleeProof,
- BOOL p6, BOOL p7, BOOL drownProof)*/
- }
- }
- }
- }
- }
- void main()
- {
- while (true)
- {
- update_features();
- WAIT(0);
- }
- }
- void ScriptMain()
- {
- srand(GetTickCount());
- main();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement