Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- To make this work in most menu bases at least in C++ do it like so,
- Put these variables as global variables wherever you store yours.
- bool getNearbyPeds = false //just an example if variable.
- const int numElements = 10;
- const int arrSize = numElements * 2 + 2;
- int nearbyPed[arrSize];
- Example use,
- if(getNearbyPeds){
- nearbyPed[0] = numElements2;
- int count = PED::GET_PED_NEARBY_PEDS(PLAYER::PLAYER_PED_ID(), nearbyPed, -1);
- if (nearbyPed != NULL)
- {
- for (int i = 0; i < count; i++)
- {
- int offsettedID = i * 2 + 2;
- if (nearbyPed[offsettedID] != NULL && ENTITY::DOES_ENTITY_EXIST(nearbyPed[offsettedID]))
- {
- NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(nearbyPed[i]);
- if(NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(nearbyPed[i])){
- if(!FIRE::IS_ENTITY_ON_FIRE(nearbyPed[i])){
- FIRE::START_ENTITY_FIRE(nearbyPed[i]);
- printf("Peds Grabbed: %i \n", count);
- getNearbyPed = false;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement