This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
Rimmuru 5260b27899
Editor+ (#745)
* feat(Toxic): add send to island
* feat(mobile): add helicopter backup
* refractor(mobile): update seperator
* feat(Troll): add set bounty

* tps
tp all to island
tp all to eclipse
tp to eclipse

* working hijack &, delete. + placeholders
* speed, derail
* drive train, working derail
* improved drive train
* exit train, rework delete
* using CReplayInterface
2023-01-06 23:25:16 +00:00

32 lines
649 B
C++

#include "backend/looped/looped.hpp"
#include "gta/enums.hpp"
#include "natives.hpp"
#include "util/blip.hpp"
#include "util/entity.hpp"
#include "util/train.hpp"
namespace big
{
void looped::drive_train()
{
int trainSpeed = ENTITY::GET_ENTITY_SPEED(train::get_closest_train());
if (g.train.drive_train)
{
if (PAD::IS_CONTROL_PRESSED(0, 71))
trainSpeed++;
if (PAD::IS_CONTROL_PRESSED(0, 72))
trainSpeed--;
train::set_train_speed(trainSpeed);
}
}
void looped::derail_train()
{
int train = train::get_closest_train();
if (train != 0)
VEHICLE::SET_RENDER_TRAIN_AS_DERAILED(train, g.train.derail_train);
}
}