gtav-ent / GTAV-EnhancedNativeTrainer

GTA V PC Enhanced Native Trainer
http://gtaforums.com/topic/789786-vrelwip-enhanced-native-trainer
GNU General Public License v2.0
37 stars 14 forks source link

about ped driver this code only can driver air veh #136

Closed oskey closed 9 years ago

oskey commented 9 years ago
           DWORD ac130model = GAMEPLAY::GET_HASH_KEY((char *)"SAVAGE");
           STREAMING::REQUEST_MODEL(ac130model);
           while (!STREAMING::HAS_MODEL_LOADED(ac130model)) WAIT(0);

           DWORD playermodel = GAMEPLAY::GET_HASH_KEY((char *)"s_m_y_pilot_01");
           STREAMING::REQUEST_MODEL(playermodel);
           while (!STREAMING::HAS_MODEL_LOADED(playermodel))    WAIT(0);

           Vector3 locPOS = ENTITY::GET_ENTITY_COORDS(tager, true); 

             Vehicle killervehac130 = VEHICLE::CREATE_VEHICLE(ac130model, locPOS.x, locPOS.y, locPOS.z + 50, 0.0, 1, 1);
             VEHICLE::SET_VEHICLE_ENGINE_ON(killervehac130, 1, 1);

           Ped KillerPED[10];

           for (int i = -1; i < 3; i++)
           {
               KillerPED[i] = PED::CREATE_PED(26, playermodel, locPOS.x, locPOS.y, locPOS.z, 1, true, true);
               PED::SET_PED_INTO_VEHICLE(KillerPED[i], killervehac130, i);
               WEAPON::GIVE_WEAPON_TO_PED(KillerPED[i], GAMEPLAY::GET_HASH_KEY("WEAPON_PISTOL"), 999, 1, 1); 
               WEAPON::GIVE_WEAPON_TO_PED(KillerPED[i], GAMEPLAY::GET_HASH_KEY((char *)"WEAPON_SMG"), 999, 1, 1); 
               PED::SET_PED_ACCURACY(KillerPED[i], 100); 
               PED::SET_PED_CAN_SWITCH_WEAPON(KillerPED[i], 1); 
               PED::SET_PED_COMBAT_ABILITY(KillerPED[i], 100); 

               PED::SET_PED_COMBAT_RANGE(KillerPED[i], 2);
               PED::SET_PED_ALERTNESS(KillerPED[i], 100); 

               PED::SET_CAN_ATTACK_FRIENDLY(KillerPED[i], 1, 1);

               PED::SET_PED_CAN_BE_SHOT_IN_VEHICLE(KillerPED[i], 1);

               PED::SET_PED_CAN_BE_TARGETTED_BY_PLAYER(KillerPED[i], tager, 1);

               Blip enemyBlip = UI::ADD_BLIP_FOR_ENTITY(KillerPED[i]);
               UI::SET_BLIP_SCALE(enemyBlip, 0.75f);
               UI::SET_BLIP_COLOUR(enemyBlip, 2);

               PED::SET_PED_COMBAT_RANGE(KillerPED[i], 2);

               PED::SET_PED_KEEP_TASK(KillerPED[i], true);

               PED::SET_PED_SHOOT_RATE(KillerPED[i], 100);

               AI::TASK_COMBAT_PED(KillerPED[i], tager, 0, 1);
               AI::TASK_SHOOT_AT_ENTITY(KillerPED[i], tager, 0, 1);

           }

           int groupId = PLAYER::GET_PLAYER_GROUP(PED::GET_PED_GROUP_INDEX(KillerPED[0]));
           PED::SET_PED_AS_GROUP_LEADER(KillerPED[0], groupId);
           PED::SET_PED_AS_GROUP_MEMBER(KillerPED[-1], groupId);
           PED::SET_PED_AS_GROUP_MEMBER(KillerPED[1], groupId);
           PED::SET_PED_AS_GROUP_MEMBER(KillerPED[2], groupId);

}

when i creat the SAVAGE,it will driver my to miss ped coord,but when i creat the "T20" the diver will down the car.

sorry my bad english..

qaisjp commented 9 years ago

This is not a support forum.