Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void MaxAmmo(int mode)
- {
- if (mode == 1) // Current
- {
- QUEUE_JOB_BEGIN_CLAUSE()
- {
- WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), &hashvar, 1);
- if (WEAPON::GET_MAX_AMMO(PLAYER::PLAYER_PED_ID(), hashvar, &maxAmmo))
- {
- WEAPON::SET_PED_AMMO(PLAYER::PLAYER_PED_ID(), hashvar, maxAmmo, 0);
- maxAmmo = WEAPON::GET_MAX_AMMO_IN_CLIP(PLAYER::PLAYER_PED_ID(), hashvar, 1);
- if (maxAmmo > 0)
- WEAPON::SET_AMMO_IN_CLIP(PLAYER::PLAYER_PED_ID(), hashvar, maxAmmo);
- }
- }
- QUEUE_JOB_END_CLAUSE
- }
- else if (mode == 2) // All
- {
- QUEUE_JOB_BEGIN_CLAUSE()
- {
- for (int i = 0; i < 90; i++)
- {
- if (WEAPON::GET_MAX_AMMO(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY(WeaponNames[i]), &maxAmmo))
- {
- WEAPON::SET_PED_AMMO(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY(WeaponNames[i]), maxAmmo, 0);
- maxAmmo = WEAPON::GET_MAX_AMMO_IN_CLIP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY(WeaponNames[i]), 1);
- if (maxAmmo > 0)
- WEAPON::SET_AMMO_IN_CLIP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY(WeaponNames[i]), maxAmmo);
- }
- }
- }
- QUEUE_JOB_END_CLAUSE
- }
- }
- void GiveAllWeapons(Player selectedPlayer)
- {
- Evar = selectedPlayer;
- QUEUE_JOB_BEGIN_CLAUSE()
- {
- for (int i = 0; i < 90; i++)
- {
- WEAPON::GIVE_DELAYED_WEAPON_TO_PED(Evar,MISC::GET_HASH_KEY(WeaponNames[i]), 1000, 0);
- for (int j = 0; j < 383; j++)
- {
- WEAPON::GIVE_WEAPON_COMPONENT_TO_PED(Evar, MISC::GET_HASH_KEY(WeaponNames[i]), MISC::GET_HASH_KEY(WeaponCompNames[j]));
- }
- }
- }
- QUEUE_JOB_END_CLAUSE
- }
- void Stun(Ped playerPed)
- {
- Pvar = playerPed;
- QUEUE_JOB_BEGIN_CLAUSE()
- {
- Vector3 From;
- Vector3 To = ENTITY::GET_WORLD_POSITION_OF_ENTITY_BONE(Pvar, PED::GET_PED_BONE_INDEX(Pvar, 39317));
- From = To;
- From.z = From.z + 0.0001f;
- Vehicle Vehicle = PED::GET_VEHICLE_PED_IS_IN(Pvar, 0);
- MISC::SHOOT_SINGLE_BULLET_BETWEEN_COORDS(From.x, From.y, From.z, To.x, To.y, To.z, 0, false, RAGE_JOAAT("WEAPON_STUNGUN"), PLAYER::PLAYER_PED_ID(), false, true, 9999999.0f);
- }
- QUEUE_JOB_END_CLAUSE
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement