This repository has been archived by the owner on Jan 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy patham_mp_carwash_launch.c
277 lines (260 loc) · 5.48 KB
/
am_mp_carwash_launch.c
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
#region Local Var
var uLocal_0 = 0;
var uLocal_1 = 0;
int iLocal_2 = 0;
int iLocal_3 = 0;
int iLocal_4 = 0;
int iLocal_5 = 0;
int iLocal_6 = 0;
int iLocal_7 = 0;
int iLocal_8 = 0;
int iLocal_9 = 0;
int iLocal_10 = 0;
int iLocal_11 = 0;
float fLocal_12 = 0f;
var uLocal_13 = 0;
var uLocal_14 = 0;
int iLocal_15 = 0;
var uLocal_16 = 0;
var uLocal_17 = 0;
var uLocal_18 = 0;
var uLocal_19 = 0;
var uLocal_20 = 0;
char* sLocal_21 = NULL;
var uLocal_22 = 0;
var uLocal_23 = 0;
float fLocal_24 = 0f;
float fLocal_25 = 0f;
float fLocal_26 = 0f;
var uLocal_27 = 0;
var uLocal_28 = 0;
float fLocal_29 = 0f;
var uLocal_30 = 0;
var uLocal_31 = 0;
var uLocal_32 = 0;
float fLocal_33 = 0f;
float fLocal_34 = 0f;
var uLocal_35 = 0;
var uLocal_36 = 0;
int iLocal_37 = 0;
var uLocal_38 = 0;
var uLocal_39 = 0;
var uLocal_40 = 0;
int iLocal_41 = 0;
int iLocal_42 = 0;
int iLocal_43 = 0;
int iLocal_44 = 0;
var uLocal_45 = 0;
var uLocal_46 = 0;
var uLocal_47 = 0;
struct<2> ScriptParam_0 = { 0, 5 } ;
var uScriptParam_2 = 0;
var uScriptParam_3 = 0;
var uScriptParam_4 = 0;
var uScriptParam_5 = 0;
var uScriptParam_6 = 0;
var uScriptParam_7 = 0;
var uScriptParam_8 = 0;
var uScriptParam_9 = 0;
var uScriptParam_10 = 0;
var uScriptParam_11 = 0;
var uScriptParam_12 = 0;
var uScriptParam_13 = 0;
var uScriptParam_14 = 0;
var uScriptParam_15 = 0;
var uScriptParam_16 = 0;
var uScriptParam_17 = 5;
var uScriptParam_18 = 0;
var uScriptParam_19 = 0;
var uScriptParam_20 = 0;
var uScriptParam_21 = 0;
var uScriptParam_22 = 0;
#endregion
void __EntryFunction__()//Position - 0x0
{
int iVar0;
int iVar1;
char* sVar2;
struct<3> Var3;
int iVar6;
iLocal_2 = 1;
iLocal_3 = 134;
iLocal_4 = 134;
iLocal_5 = 1;
iLocal_6 = 1;
iLocal_7 = 1;
iLocal_8 = 134;
iLocal_9 = 1;
iLocal_10 = 12;
iLocal_11 = 12;
fLocal_12 = 0.001f;
iLocal_15 = -1;
sLocal_21 = "NULL";
fLocal_24 = 80f;
fLocal_25 = 140f;
fLocal_26 = 180f;
fLocal_29 = 0f;
fLocal_33 = -0.0375f;
fLocal_34 = 0.17f;
iLocal_37 = 3;
iLocal_41 = 1;
iLocal_42 = 65;
iLocal_43 = 49;
iLocal_44 = 64;
iVar1 = joaat("carwash1");
sVar2 = "carwash1";
Var3 = { ScriptParam_0.f_1[0 /*3*/] };
if (SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(joaat("am_mp_carwash_launch")) > 1)
{
SCRIPT::TERMINATE_THIS_THREAD();
}
if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
{
MISC::NETWORK_SET_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
MISC::SET_THIS_SCRIPT_CAN_BE_PAUSED(false);
}
else
{
SCRIPT::TERMINATE_THIS_THREAD();
}
if (Global_2883694)
{
if (SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(131838674) == 0)
{
SCRIPT::REQUEST_SCRIPT_WITH_NAME_HASH(131838674);
while (!SCRIPT::HAS_SCRIPT_WITH_NAME_HASH_LOADED(131838674))
{
SYSTEM::WAIT(0);
}
SYSTEM::START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS(131838674, &ScriptParam_0, 23, 1424);
}
SCRIPT::TERMINATE_THIS_THREAD();
}
if (func_12(PLAYER::PLAYER_PED_ID()))
{
}
iVar6 = 0;
while (iVar6 == 0)
{
if ((((((func_9(PLAYER::PLAYER_ID(), 1, 0) || func_8()) || !func_7(PLAYER::PLAYER_ID())) || func_6()) || func_5(PLAYER::PLAYER_ID())) || func_4(PLAYER::PLAYER_ID())) || func_2(PLAYER::PLAYER_ID()))
{
iVar6 = 0;
}
else
{
iVar6 = 1;
}
SYSTEM::WAIT(0);
}
if (SYSTEM::VDIST2(Var3, func_1(157)) < SYSTEM::VDIST2(Var3, func_1(156)))
{
sVar2 = "carwash2";
}
iVar0 = MISC::GET_GAME_TIMER();
iVar1 = MISC::GET_HASH_KEY(sVar2);
if (SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(iVar1) == 0)
{
SCRIPT::REQUEST_SCRIPT(sVar2);
while (!SCRIPT::HAS_SCRIPT_LOADED(sVar2))
{
SCRIPT::REQUEST_SCRIPT(sVar2);
SYSTEM::WAIT(0);
if (MISC::GET_GAME_TIMER() > iVar0 + 20000)
{
SCRIPT::TERMINATE_THIS_THREAD();
}
}
if (SCRIPT::HAS_SCRIPT_LOADED(sVar2))
{
SYSTEM::START_NEW_SCRIPT(sVar2, 1424);
SCRIPT::SET_SCRIPT_AS_NO_LONGER_NEEDED(sVar2);
}
}
SCRIPT::TERMINATE_THIS_THREAD();
}
Vector3 func_1(int iParam0)//Position - 0x1FF
{
int iVar0;
iVar0 = iParam0;
return Global_33467[iVar0 /*23*/][0 /*3*/];
}
int func_2(int iParam0)//Position - 0x217
{
if (iParam0 != func_3())
{
return BitTest(Global_2657991[iParam0 /*467*/].f_324.f_5, 4);
}
return 0;
}
int func_3()//Position - 0x23C
{
return -1;
}
int func_4(int iParam0)//Position - 0x245
{
if (iParam0 != func_3())
{
return BitTest(Global_1845221[iParam0 /*889*/].f_268.f_435.f_2, 16);
}
return 0;
}
int func_5(int iParam0)//Position - 0x26E
{
if (iParam0 != func_3())
{
return BitTest(Global_1845221[iParam0 /*889*/].f_268.f_372, 29);
}
return 0;
}
var func_6()//Position - 0x295
{
return BitTest(Global_1845221[PLAYER::PLAYER_ID() /*889*/].f_36.f_18, 0);
}
bool func_7(int iParam0)//Position - 0x2AE
{
return BitTest(Global_1845221[iParam0 /*889*/].f_140, 6);
}
int func_8()//Position - 0x2C3
{
int iVar0;
iVar0 = Global_2672939;
if (BitTest(Global_1882780[iVar0 /*149*/].f_17, 0) && Global_1882780[iVar0 /*149*/].f_27 == 2)
{
return 1;
}
return 0;
}
int func_9(int iParam0, bool bParam1, bool bParam2)//Position - 0x2F6
{
if (bParam1)
{
if (func_10(iParam0))
{
return 1;
}
}
if (!bParam2)
{
}
if (Global_1845221[iParam0 /*889*/] == -1)
{
return 0;
}
return 1;
}
bool func_10(int iParam0)//Position - 0x328
{
return func_11(iParam0);
}
var func_11(int iParam0)//Position - 0x336
{
return BitTest(Global_1845221[iParam0 /*889*/].f_11.f_1, 0);
}
bool func_12(int iParam0)//Position - 0x34D
{
if (!ENTITY::DOES_ENTITY_EXIST(iParam0))
{
return 0;
}
return !ENTITY::IS_ENTITY_DEAD(iParam0, false);
}