-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgta5.py
More file actions
93 lines (85 loc) · 2.89 KB
/
Copy pathgta5.py
File metadata and controls
93 lines (85 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import sys
from time import sleep
from gta5.entities import PlayerEntity, VehicleEntity, PedsEntity
def drop_ped(ped, player):
try:
ped.freeze = True
if ped.cash < 2000:
ped.cash = 2000
ped.invisible = True
ped.teleport_to_player(z_offset=10, player=player)
ped.healt_ = 99
print(".")
except WindowsError:
print("umh... error!")
if __name__ == '__main__':
cmd = ""
if len(sys.argv) > 1:
cmd = sys.argv[1]
if cmd == "run" or cmd == "":
player = PlayerEntity()
while True:
print("name: %s" % player.name)
print("healt: %d" % player.healt)
print("max_healt_m: %d" % player.max_healt_m)
print("max_healt: %d" % player.max_healt)
print("max_healt_regen_m: %d" % player.max_healt_regen_m)
print("healt_regen_rate_m: %d" % player.healt_regen_rate_m)
print("min_healt_m: %d" % player.min_healt_m)
print("armor: %d" % player.armor)
print("min_armor_m: %d" % player.min_armor_m)
print("god: ", player.god)
print("no_bike_fall: ", player.no_bike_fall)
print("rp_m: %d" % player.rp_m)
print("x: %d" % player.x)
print("y: %d" % player.y)
print("z: %d" % player.z)
print("_x: %d" % player._x)
print("_y: %d" % player._y)
print("_z: %d" % player._z)
print("in vehicle:", player.in_vehicle)
print("teleport")
player.teleport_to_waypoint()
print("")
sleep(1)
elif cmd == "test":
player = PlayerEntity()
vehicle = VehicleEntity()
player.self_test()
if player.in_vehicle:
vehicle.self_test()
elif cmd == "ped":
# while True:
peds = PedsEntity()
player = PlayerEntity()
for ped in peds.get_all_peds():
print(".")
drop_ped(ped, player)
'''
else:
system = System()
system.request_debug_privileges()
dwParentProcessId = get_pid("GTA5.EXE")
python_exe = get_python_path()
# start
try:
args = [python_exe, sys.argv[0], "run"]
print "executing %s" % ' '.join(args)
process = system.start_process(
system.argv_to_cmdline(args),
bConsole=True,
bInheritHandles=True,
dwParentProcessId=dwParentProcessId
)
dwProcessId = process.get_pid()
print "Process created: %d" % dwProcessId
except AttributeError, e:
if "InitializeProcThreadAttributeList" in str(e):
raise Exception("This tool requires Windows Vista or above.")
else:
# ...
raise
except WindowsError, e:
# ...
raise
'''