mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 23:17:52 +08:00

* feat(Spoofing): add spoofing * feat(Spoofing): prepare code for player attach * remove(PlayerAttach): isn't going to work due to netsync architecture * fix(GUI): fix scaling * feat(Project): add clang-format file * feat(Classes): update classes * fix(BlackHole): remove unnecessary cleanup * fix(Formatting): fix formatting for initializer lists * feat(clang-format): Set tab width and 1 space before comment Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
32 lines
897 B
C++
32 lines
897 B
C++
#include "backend/looped_command.hpp"
|
|
#include "natives.hpp"
|
|
#include "pointers.hpp"
|
|
#include "util/entity.hpp"
|
|
|
|
namespace big
|
|
{
|
|
|
|
class ped_rain : looped_command
|
|
{
|
|
using looped_command::looped_command;
|
|
|
|
virtual void on_tick() override
|
|
{
|
|
for (auto ped : entity::get_entities(false, true))
|
|
{
|
|
if (!ENTITY::IS_ENTITY_IN_AIR(ped))
|
|
{
|
|
Vector3 my_location = ENTITY::GET_ENTITY_COORDS(self::ped, 1);
|
|
my_location.x = my_location.x + (rand() % 100 + (-50));
|
|
my_location.y = my_location.y + (rand() % 100 + (-50));
|
|
my_location.z = my_location.z + (rand() % 50 + 50);
|
|
ENTITY::SET_ENTITY_COORDS(ped, my_location.x, my_location.y, my_location.z, 0, 0, 0, 0);
|
|
ENTITY::SET_ENTITY_VELOCITY(ped, 0.0, 0.0, -1.0);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
ped_rain g_ped_rain("pedrain", "Rain Peds", "Will pour down and rain nearby peds.", g.world.nearby.ped_rain);
|
|
|
|
} |