SHOW:
|
|
- or go back to the newest paste.
1 | union ScriptArg {unsigned int ui;float f;int i; char *str;}; | |
2 | namespace SCRIPT { | |
3 | static void TRIGGER_SCRIPT_EVENT(int always1, ScriptArg *argsStruct, int argsStructCount, int playerbitset) { invoke<Void>(0x54763B35, always1, argsStruct, argsStructCount, playerbitset); } // 0x54763B35 | |
4 | }; | |
5 | namespace PlayerMods { | |
6 | namespace eventCreator { | |
7 | void callScriptEvent(ScriptArg *args,int argsCount,unsigned int playerBits) { | |
8 | SCRIPT::TRIGGER_SCRIPT_EVENT(1,args,argsCount,playerBits); | |
9 | } | |
10 | }; | |
11 | }; | |
12 | ||
13 | void kickPlayerNonHost(int player) { | |
14 | //0x00D003DFB4+10*0x4 = args | |
15 | unsigned int playerBit = (1<<player); | |
16 | //0x2 0x7 0x35 and 0xA was me so idk... | |
17 | ScriptArg args[3] = {0x2,player,0x35};//0x35 is the speccial one I guess | |
18 | ||
19 | //first arg is always 1 | |
20 | //last arg is always the bit thing | |
21 | //second arg meh | |
22 | //third arg is the size of the data | |
23 | SCRIPT::TRIGGER_SCRIPT_EVENT(1,args,3,playerBit); | |
24 | } | |
25 | ||
26 | ||
27 | ||
28 | opd_s _0x012C8D60_t = {0x0012C8D60,TOC}; | |
29 | unsigned int (*_0x0012C8D60)(unsigned int r3, unsigned int senderData, unsigned int recieverData, unsigned int r6, unsigned int r7, unsigned int r8, unsigned int r9) = (unsigned int(*)(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int))&_0x012C8D60_t; | |
30 | ||
31 | //bool jobProtection = true; | |
32 | bool moneyProtection = true; | |
33 | bool teleportProtectionEnabled = true; | |
34 | char scriptEventDialogText[100]; | |
35 | unsigned int scriptEventDetour(unsigned int r3, unsigned int senderData, unsigned int recieverData, unsigned int r6, unsigned int r7, unsigned int r8, unsigned int r9) { | |
36 | int addressOfArgs = r3+10*0x4; | |
37 | char *senderName = (char*)(*(int*)(senderData+0x78)+0x10); | |
38 | //if (*(int*)addressOfArgs == 166) { | |
39 | //this is the one I want to research cuz of func_6272("CnCTG_IN_BF", 2147483647, 1); | |
40 | //snprintf$(scriptEventDialogText,sizeof(scriptEventDialogText),"%s tried to kick you!",senderName); | |
41 | //printf("0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X (next is 1337) 0x%X\n",*(int*)(addressOfArgs+0x4*0),*(int*)(addressOfArgs+0x4*1),*(int*)(addressOfArgs+0x4*2),*(int*)(addressOfArgs+0x4*3),*(int*)(addressOfArgs+0x4*4),*(int*)(addressOfArgs+0x4*5),*(int*)(addressOfArgs+0x4*6),*(int*)(addressOfArgs+0x4*7),*(int*)(addressOfArgs+0x4*8),*(int*)(addressOfArgs+0x4*9),*(int*)(addressOfArgs+0x4*10),*(int*)(addressOfArgs+0x4*11),*(int*)(addressOfArgs+0x4*12),*(int*)(addressOfArgs+0x4*13),*(int*)(addressOfArgs+0x4*14),*(int*)(addressOfArgs+0x4*15),*(int*)(addressOfArgs+0x4*16),*(int*)(addressOfArgs+0x4*17),*(int*)(addressOfArgs+0x4*18),*(int*)(addressOfArgs+0x4*19),*(int*)(addressOfArgs+0x4*20),*(int*)(addressOfArgs+0x4*21),*(int*)(addressOfArgs+0x4*22),1337); | |
42 | //return 0; | |
43 | //*(int*)addressOfArgs = 0; | |
44 | //} | |
45 | if (*(int*)addressOfArgs == 0x2/* && *(int*)(addressOfArgs+0x4) == PLAYER::PLAYER_ID()*/ && *(int*)(addressOfArgs+0x8) == 0x35) { | |
46 | //this is kick player | |
47 | snprintf$(scriptEventDialogText,sizeof(scriptEventDialogText),"%s tried to kick you!",senderName); | |
48 | print2(scriptEventDialogText,5000); | |
49 | //return 0; | |
50 | *(int*)addressOfArgs = 0; | |
51 | } | |
52 | if (*(int*)addressOfArgs == 0x2/* && *(int*)(addressOfArgs+0x4) == PLAYER::PLAYER_ID()*/ && *(int*)(addressOfArgs+0x8) == 0x34) { | |
53 | //this is fake leave | |
54 | snprintf$(scriptEventDialogText,sizeof(scriptEventDialogText),"%s tried to make you fake leave!",senderName); | |
55 | print2(scriptEventDialogText,5000); | |
56 | //return 0; | |
57 | *(int*)addressOfArgs = 0; | |
58 | } | |
59 | if (*(int*)addressOfArgs == 0x2/* && *(int*)(addressOfArgs+0x4) == PLAYER::PLAYER_ID()*/ && *(int*)(addressOfArgs+0x8) == 0x2e) { | |
60 | //this is fake leave | |
61 | snprintf$(scriptEventDialogText,sizeof(scriptEventDialogText),"%s tried to reset your view!",senderName); | |
62 | print2(scriptEventDialogText,5000); | |
63 | //return 0; | |
64 | *(int*)addressOfArgs = 0; | |
65 | } | |
66 | if (*(int*)addressOfArgs == 0xD8) { | |
67 | //this is give rp | |
68 | snprintf$(scriptEventDialogText,sizeof(scriptEventDialogText),"%s tried to give you %i rp!",senderName,*(int*)(addressOfArgs+0x8)); | |
69 | print2(scriptEventDialogText,5000); | |
70 | //*(int*)(addressOfArgs+0x8) = 0;//rp amount | |
71 | *(int*)addressOfArgs = 0; | |
72 | //return 0; | |
73 | } | |
74 | /*if (*(int*)addressOfArgs == 0x9A) { | |
75 | //this is job circle | |
76 | if (jobProtection) { | |
77 | snprintf$(scriptEventDialogText,sizeof(scriptEventDialogText),"%s tried to make you go into a job with job protection enabled! This may be a false alarm.",senderName); | |
78 | print2(scriptEventDialogText,5000); | |
79 | //try doing *(int*)addressOfArgs = 0 instead | |
80 | //return 0; | |
81 | *(int*)addressOfArgs = 0; | |
82 | } | |
83 | }*/ | |
84 | //not needed anymore because bypassed | |
85 | if (*(int*)addressOfArgs == 0xDA) { | |
86 | //this is money | |
87 | if (moneyProtection) { | |
88 | //Write_Global(262145+4812,0);//set the amount to zero instead of returning | |
89 | snprintf$(scriptEventDialogText,sizeof(scriptEventDialogText),"%s tried to give you money with money protection enabled!",senderName); | |
90 | print2(scriptEventDialogText,2000); | |
91 | //return 0; | |
92 | *(int*)addressOfArgs = 0; | |
93 | } else { | |
94 | //Write_Global(262145+4812,20000); | |
95 | } | |
96 | } | |
97 | if (*(int*)addressOfArgs == 0x16C) { | |
98 | //this is apartment | |
99 | snprintf$(scriptEventDialogText,sizeof(scriptEventDialogText),"%s tried to force you into their apartment!",senderName); | |
100 | print2(scriptEventDialogText,5000); | |
101 | //return 0; | |
102 | *(int*)addressOfArgs = 0; | |
103 | } | |
104 | if (*(int*)addressOfArgs == 0x3) { | |
105 | if (*(int*)(addressOfArgs+0x8) == 0x37 || *(int*)(addressOfArgs+0x8) == 0x36 || *(int*)(addressOfArgs+0x8) == 0x35) { | |
106 | //this is job | |
107 | snprintf$(scriptEventDialogText,sizeof(scriptEventDialogText),"%s tried to force you to join a job!",senderName); | |
108 | print2(scriptEventDialogText,5000); | |
109 | //return 0; | |
110 | *(int*)addressOfArgs = 0; | |
111 | } | |
112 | } | |
113 | return _0x0012C8D60(r3,senderData,recieverData,r6,r7,r8,r9); | |
114 | } | |
115 | void setupScriptEventDetour() {//call this on game start to set it up | |
116 | *(int*)(0x1C6BD80) = *(int*)( /*this returns the opd struct address Function*/(int)&scriptEventDetour );//same | |
117 | *(int*)((0x1C6BD80+0x4)) = *(int*)( /*this returns the opd struct address TOC*/(int)&scriptEventDetour+0x4 ); | |
118 | } | |
119 | void resetPlayerView(int player) { | |
120 | ScriptArg args[3]; | |
121 | args[0].i = 0x2; | |
122 | args[1].i = player; | |
123 | args[2].i = 0x2e;//46 | |
124 | unsigned int bits = (1<<player); | |
125 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
126 | } | |
127 | ||
128 | bool resetViewBoolLoop[18]; | |
129 | void resetPlayerViewLoop() { | |
130 | for (int i = 0; i < 16; i++) | |
131 | if (resetViewBoolLoop[i]) | |
132 | resetPlayerView(i); | |
133 | } | |
134 | ||
135 | ||
136 | void setPlayerStats(int player) { | |
137 | //event id is 150 | |
138 | //get_event_data for it is in freemode at line 313711 | |
139 | //the call to func_544 is set_stat_int usage | |
140 | //doesn't seem to have a trigger_script_event call | |
141 | ScriptArg args[12]; | |
142 | args[0].i = 150; | |
143 | args[1].i = player; | |
144 | args[2].i = 0;//unknown value | |
145 | ||
146 | //the values are for NOT setting the correlated stat | |
147 | //these are the hash from the array. weird but it's wat it is | |
148 | args[3].i = 88;//int | |
149 | args[4].i = 34;//bool | |
150 | args[5].i = 1;//float | |
151 | args[6].i = 2949;//int | |
152 | args[7].i = 228;//bool | |
153 | args[8].i = 228;//float | |
154 | ||
155 | args[9].i = 0;//value to set for the int ones. This is added on to the previous value set for the stat | |
156 | args[10].i = 0;//value to set for the float ones. This is added on to the previous value set for the stat | |
157 | args[11].i = 0;//value to set for the bool ones | |
158 | unsigned int bits = (1<<player); | |
159 | PlayerMods::eventCreator::callScriptEvent(args,12,bits); | |
160 | } | |
161 | ||
162 | enum { | |
163 | EVENT_STAT_INT_0 = 3, | |
164 | EVENT_STAT_INT_1 = 6, | |
165 | EVENT_STAT_BOOL_0 = 4, | |
166 | EVENT_STAT_BOOL_1 = 7, | |
167 | EVENT_STAT_FLOAT_0 = 5, | |
168 | EVENT_STAT_FLOAT_1 = 8, | |
169 | EVENT_STAT_VALUE_INT = 9, | |
170 | EVENT_STAT_VALUE_FLOAT = 10, | |
171 | EVENT_STAT_VALUE_BOOL = 11 | |
172 | }; | |
173 | void setupDefaultStatEvent(int player, ScriptArg *args) { | |
174 | args[0].i = 150; | |
175 | args[1].i = player; | |
176 | args[2].i = player;//unknown value | |
177 | args[3].i = 88;//int | |
178 | args[4].i = 34;//bool | |
179 | args[5].i = 1;//float | |
180 | args[6].i = 2949;//int | |
181 | args[7].i = 228;//bool | |
182 | args[8].i = 228;//float | |
183 | args[9].i = 0;//value to set for the int ones. This is added on to the previous value set for the stat | |
184 | args[10].i = 0;//value to set for the float ones. This is added on to the previous value set for the stat | |
185 | args[11].i = 0;//value to set for the bool ones | |
186 | } | |
187 | //https://pastebin.com/9HqhUUCK | |
188 | bool globalStatVersionType = 1;//this decides whether I use the first 3 (0) or the last 3 (1) | |
189 | void setPlayerStatInt(int player, int statIndex, int statValue, bool type = globalStatVersionType) { | |
190 | statValue = 0xFFFFFFFF-statValue+1; | |
191 | ScriptArg args[12]; | |
192 | setupDefaultStatEvent(player,args); | |
193 | printf("%i\n",args[6].i); | |
194 | args[EVENT_STAT_VALUE_INT].ui = *(unsigned int*)(&statValue); | |
195 | args[EVENT_STAT_VALUE_BOOL].i = statValue; | |
196 | args[EVENT_STAT_VALUE_FLOAT].f = statValue; | |
197 | if (type == 0) | |
198 | args[EVENT_STAT_INT_0].i = statIndex; | |
199 | else | |
200 | args[EVENT_STAT_INT_1].i = statIndex; | |
201 | unsigned int bits = (1<<player); | |
202 | PlayerMods::eventCreator::callScriptEvent(args,12,bits); | |
203 | } | |
204 | void setPlayerStatBool(int player, int statIndex, bool statValue, bool type = globalStatVersionType) { | |
205 | ScriptArg args[12]; | |
206 | setupDefaultStatEvent(player,args); | |
207 | args[EVENT_STAT_VALUE_INT].i = *(unsigned int*)(&statValue); | |
208 | args[EVENT_STAT_VALUE_BOOL].i = statValue; | |
209 | args[EVENT_STAT_VALUE_FLOAT].f = statValue; | |
210 | if (type == 0) | |
211 | args[EVENT_STAT_BOOL_0].i = statIndex; | |
212 | else | |
213 | args[EVENT_STAT_BOOL_1].i = statIndex; | |
214 | unsigned int bits = (1<<player); | |
215 | PlayerMods::eventCreator::callScriptEvent(args,12,bits); | |
216 | } | |
217 | void setPlayerStatFloat(int player, int statIndex, float statValue, bool type = globalStatVersionType) { | |
218 | ScriptArg args[12]; | |
219 | setupDefaultStatEvent(player,args); | |
220 | args[EVENT_STAT_VALUE_INT].i = *(unsigned int*)(&statValue); | |
221 | args[EVENT_STAT_VALUE_BOOL].i = statValue; | |
222 | args[EVENT_STAT_VALUE_FLOAT].f = statValue; | |
223 | if (type == 0) | |
224 | args[EVENT_STAT_FLOAT_0].i = statIndex; | |
225 | else | |
226 | args[EVENT_STAT_FLOAT_1].i = statIndex; | |
227 | unsigned int bits = (1<<player); | |
228 | PlayerMods::eventCreator::callScriptEvent(args,12,bits); | |
229 | } | |
230 | ||
231 | void setPlayerRpStat(int player, int rp) { | |
232 | //for (int i = 0; i < 25; i++) | |
233 | setPlayerStatInt(player,626,rp,true); | |
234 | } | |
235 | void setPlayerSnackStat(int player, int amt) { | |
236 | //for (int i = 0; i < 25; i++) | |
237 | setPlayerStatInt(player,1261,amt,true); | |
238 | } | |
239 | void setPlayerMentalStat(int player, float amt) { | |
240 | //for (int i = 0; i < 25; i++) | |
241 | setPlayerStatFloat(player,133,amt,true); | |
242 | } | |
243 | ||
244 | void givePlayerRP(int player, int amount, int unk1 = -1, int unk2 = 1) { | |
245 | //rank 500 is 0x0103941C | |
246 | //rank 120 is 0x0021025A | |
247 | ScriptArg args[5]; | |
248 | args[0].i = 0xD8;//216 | |
249 | args[1].i = player; | |
250 | args[2].i = 0xffffffff-amount+1;//46 | |
251 | args[3].i = 0;//-1 0 is partner, else is gen | |
252 | args[4].i = 0;//unk2;//1 | |
253 | unsigned int bits = (1<<player); | |
254 | PlayerMods::eventCreator::callScriptEvent(args,5,bits); | |
255 | } | |
256 | //get_event_data( | |
257 | void removePlayerWantedLevel(int player) { | |
258 | ScriptArg args[2]; | |
259 | args[0].i = 356; | |
260 | args[1].i = player; | |
261 | unsigned int bits = (1<<player); | |
262 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
263 | } | |
264 | void setPlayerPassiveModeOn(int player) { | |
265 | ScriptArg args[3]; | |
266 | args[0].i = 0x104; | |
267 | args[1].i = player; | |
268 | args[2].i = 0; | |
269 | unsigned int bits = (1<<player); | |
270 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
271 | } | |
272 | void setPlayerPassiveModeOff(int player) { | |
273 | ScriptArg args[3]; | |
274 | args[0].i = 0x118; | |
275 | args[1].i = player; | |
276 | args[2].i = 0; | |
277 | unsigned int bits = (1<<player); | |
278 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
279 | } | |
280 | void activateBroadcastApp(int player) { | |
281 | ScriptArg args[3]; | |
282 | args[0].i = 2; | |
283 | args[1].i = player; | |
284 | args[2].i = 0x23;//35 | |
285 | unsigned int bits = (1<<player); | |
286 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
287 | } | |
288 | void sendPlayerMessage(int player, char *message) { | |
289 | //line 318419 freemode.c | |
290 | ScriptArg args[3]; | |
291 | args[0].i = 152; | |
292 | args[1].i = player; | |
293 | unsigned int bits = (1<<player); | |
294 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
295 | } | |
296 | void fakeJoinJobMessage(int player) { | |
297 | ScriptArg args[3]; | |
298 | args[0].i = 152; | |
299 | args[1].i = player; | |
300 | unsigned int bits = (1<<player); | |
301 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
302 | } | |
303 | void playSound(int player, int type) {//types: 0 or 1 | |
304 | ScriptArg args[3]; | |
305 | args[0].i = 30+type; | |
306 | args[1].i = player; | |
307 | unsigned int bits = (1<<player); | |
308 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
309 | } | |
310 | void apartmentInvite(int sender, int reciever) {//I think it just sends it to the whole lobby | |
311 | ScriptArg args[2]; | |
312 | args[0].i = 32; | |
313 | args[1].i = sender; | |
314 | unsigned int bits = (1<<reciever); | |
315 | PlayerMods::eventCreator::callScriptEvent(args,2,bits); | |
316 | } | |
317 | void onevonedeathmatchInvite(int sender, int reciever) {//I think it just sends it to the whole lobby | |
318 | ScriptArg args[3]; | |
319 | args[0].i = 41; | |
320 | args[1].i = sender; | |
321 | unsigned int bits = (1<<reciever); | |
322 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
323 | } | |
324 | //00000150 00000000 00000004 00000001 change clothes for other team | |
325 | void apartmentInvite(int playerToInvite, int apartmentOwner, int apartmentNum) { | |
326 | ScriptArg args[3]; | |
327 | args[0].i = 0x16c; | |
328 | args[1].i = apartmentOwner; | |
329 | args[2].i = apartmentNum; | |
330 | unsigned int bits = (1<<playerToInvite); | |
331 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
332 | } | |
333 | void showOffTextAtBottom(int player) { | |
334 | ScriptArg args[3]; | |
335 | args[0].i = 166;//this should actually be 15 | |
336 | args[1].i = player; | |
337 | args[2].i = 15;//35 | |
338 | unsigned int bits = (1<<player); | |
339 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
340 | } | |
341 | void deactivateBroadcastApp(int player) { | |
342 | ScriptArg args[3]; | |
343 | args[0].i = 2; | |
344 | args[1].i = player; | |
345 | args[2].i = 0x24;//36 | |
346 | unsigned int bits = (1<<player); | |
347 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
348 | } | |
349 | void crateDropTestEvent(int player) { | |
350 | ScriptArg args[6]; | |
351 | args[0].i = 290; | |
352 | args[1].i = player; | |
353 | args[2].i = -1; | |
354 | args[3].i = 8; | |
355 | unsigned int bits = (1<<player); | |
356 | PlayerMods::eventCreator::callScriptEvent(args,6,bits); | |
357 | } | |
358 | void sendCash(int player, int amount) { | |
359 | ScriptArg args[5]; | |
360 | args[0].i = 219;//0xDB | |
361 | args[1].i = 40;//player... I think you set to 40 to make it work post-patch. I haven't tested | |
362 | args[2].i = amount; | |
363 | args[3].i = -1; | |
364 | args[4].i = 1; | |
365 | unsigned int bits = (1<<player); | |
366 | PlayerMods::eventCreator::callScriptEvent(args,5,bits); | |
367 | } | |
368 | /* | |
369 | keys: | |
370 | 0FOQ5-KK57M-AESTM | |
371 | TJHLD-68F6Z-ABXOV | |
372 | 00EYT-2LCJK-LFZHA | |
373 | WZ4F4-18VPV-EEK62 | |
374 | JIGVF-1XMS1-3FETR | |
375 | ZVGJ9-GSZWY-DCE3S | |
376 | BNDV8-8C6FB-2E4WY | |
377 | LEK6P-OG63E-SHT2L | |
378 | 507MQ-CLMAX-24646 | |
379 | IGOQX-2H7I8-D4ZAO | |
380 | ZUJ3X-GBNLO-LWLDC | |
381 | CRQTM-G3NWY-GTHEK | |
382 | SCYU0-E8GJ7-LJUAB | |
383 | I351B-R79L2-W0R6H | |
384 | 696SR-DQXNC-P28W5 | |
385 | AOMFW-TWNY9-BWO0Y | |
386 | PSV5R-IKXUG-86Z15 | |
387 | 8QPIW-6DKAU-NN0OK | |
388 | D44D7-GZECS-R8MGF | |
389 | 4O87A-50070-2D51C | |
390 | 2YWYX-W9AKW-EACBS | |
391 | 16TVD-77JX0-XHAQX | |
392 | WZ4F4-18VPV-EEK62 | |
393 | JZO8D-HIA9M-4R7LU | |
394 | NK9EP-NQODV-EH4EN | |
395 | VOV6B-53RGG-1J93Y | |
396 | YQ32I-RSZFP-W9Y1I | |
397 | WPZ5G-URY2C-LWC7V | |
398 | MWU8S-BSA4T-ER26E | |
399 | Serendipity | |
400 | ||
401 | 28KJ-EV78-6S9S-AV22 | |
402 | PD42-S7YY-U3F5-9APK | |
403 | WVCX-CVQX-J4YY-U7TG | |
404 | X4M5-DDVG-T4J7-2MJA | |
405 | VKEV-KF2H-VD4S-3B5J | |
406 | J3BU-XT8P-5EWU-4MGE | |
407 | WJ34-HMVM-D4BP-Z6SN | |
408 | NBH6-WQWB-EKM4-C6SJ | |
409 | URSJ-CCQR-M4SA-2D2Q | |
410 | 5DVT-SGUB-TM38-6893 | |
411 | G3EK-6TM7-DG7W-TX7F | |
412 | C5UZ-N2X3-NAZZ-E4WR | |
413 | MQSE-DBAX-4RSZ-GS9Z | |
414 | 2CJ7-W6K2-JFWW-SB6H | |
415 | lexicon | |
416 | ||
417 | RIP :( | |
418 | */ | |
419 | /*void sendCash2(int player, int amount) { | |
420 | ScriptArg args[3]; | |
421 | args[0].i = 219;//0xDB | |
422 | args[1].i = player; | |
423 | args[2].i = amount; | |
424 | unsigned int bits = 0xFFFFFFFF; | |
425 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
426 | }*/ | |
427 | void makePlayerFakeLeave(int player) { | |
428 | ScriptArg args[3]; | |
429 | args[0].i = 0x2; | |
430 | args[1].i = player; | |
431 | args[2].i = 0x34;//46 | |
432 | unsigned int bits = (1<<player); | |
433 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
434 | } | |
435 | ||
436 | void playerLeaveDialog(int player) { | |
437 | ScriptArg args[2]; | |
438 | args[0].i = 193; | |
439 | args[1].i = PLAYER::GET_PLAYER_PED(player); | |
440 | unsigned int bits = (1<<player); | |
441 | PlayerMods::eventCreator::callScriptEvent(args,2,bits); | |
442 | } | |
443 | ||
444 | //000000DA 00000003 06648E28 00000001 | |
445 | void givePlayerMoney(int player, int amount) {//refunds to themself. max 20k | |
446 | ScriptArg args[4]; | |
447 | args[0].i = 0xDA; | |
448 | args[1].i = 40;//player... I think you set to 40 to make it work post-patch. I haven't tested //cash giver (them cuz they refund themself) | |
449 | args[2].i = amount;//46 | |
450 | args[3].i = 1; | |
451 | unsigned int bits = 0xFFFFFFFF;//(1<<player); | |
452 | PlayerMods::eventCreator::callScriptEvent(args,4,bits); | |
453 | } | |
454 | /*void killPlayerByEvent(int player) { | |
455 | //my player id is 4 | |
456 | //9 args | |
457 | //bits: 0xFFEF which is ~(1<<4) | |
458 | //data: 00000000 00000004 00000067 00000000 00000000 00000004 00000000 00000000 00000000 | |
459 | ScriptArg args[9]; | |
460 | args[0].i = 0x0; | |
461 | args[1].i = player;//cash giver (them cuz they refund themself) | |
462 | args[2].i = 0x67;//46 | |
463 | args[3].i = 0; | |
464 | args[4].i = 0; | |
465 | args[5].i = player; | |
466 | args[6].i = 0; | |
467 | args[7].i = 0; | |
468 | args[8].i = 0; | |
469 | unsigned int bits = 0xFFFFFFFF;//~(1<<player);//(1<<player); | |
470 | PlayerMods::eventCreator::callScriptEvent(args,4,bits); | |
471 | }*/ | |
472 | void teleportPlayerIntoGolfEvent(int player) { | |
473 | ScriptArg args[3]; | |
474 | args[0].i = 0x3; | |
475 | args[1].i = player; | |
476 | args[2].i = 0x37; | |
477 | unsigned int bits = (1<<player); | |
478 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
479 | } | |
480 | void teleportPlayerIntoDartsEvent(int player) { | |
481 | ScriptArg args[3]; | |
482 | args[0].i = 0x3; | |
483 | args[1].i = player; | |
484 | args[2].i = 0x36; | |
485 | unsigned int bits = (1<<player); | |
486 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
487 | } | |
488 | void teleportPlayerIntoArmWrestlingEvent(int player) { | |
489 | ScriptArg args[3]; | |
490 | args[0].i = 0x3; | |
491 | args[1].i = player; | |
492 | args[2].i = 0x35; | |
493 | unsigned int bits = (1<<player); | |
494 | PlayerMods::eventCreator::callScriptEvent(args,3,bits); | |
495 | } | |
496 | ||
497 | void changePlayerWeather(int player, char *weather = "RAIN") { | |
498 | ScriptArg args[22]; | |
499 | args[0].i = 16; | |
500 | args[1].i = player; | |
501 | //strcpy((char*)&args[2].i,weather); | |
502 | //printf("\n%s\n",(char*)&args[2].i); | |
503 | args[2].ui = 0x187198C; | |
504 | unsigned int bits = (1<<player); | |
505 | PlayerMods::eventCreator::callScriptEvent(args,22,bits); | |
506 | } | |
507 | /* | |
508 | void playerProperty(int player, int arg1, int arg2, int arg3) { | |
509 | ScriptArg args[5]; | |
510 | args[0].i = 364; | |
511 | args[1].i = player;//apartment of this player | |
512 | args[2].i = 0; | |
513 | args[3].i = 0; | |
514 | args[4].i = 0; | |
515 | unsigned int bits = (1<<player); | |
516 | PlayerMods::eventCreator::callScriptEvent(args,5,bits); | |
517 | - | }*/ |
517 | + | |
518 | ||
519 | Event Logger -> | |
520 | if (*(int*)(addressOfArgs + 0x8) == 0x2e || *(int*)(addressOfArgs + 0x8) == 0xD8 || *(int*)(addressOfArgs + 0x8) == 0x23 || *(int*)(addressOfArgs + 0x8) == 0x34 || *(int*)(addressOfArgs + 0x8) == 0x36 || *(int*)(addressOfArgs + 0x8) == 0x35 || *(int*)(addressOfArgs + 0x8) == 0x37 || *(int*)(addressOfArgs + 0x8) == 300 || *(int*)(addressOfArgs + 0x8) == 312 || *(int*)(addressOfArgs + 0x8) == 0x35 || *(int*)(addressOfArgs + 0x8) == 0x16C || *(int*)(addressOfArgs + 0x8) == 37 || *(int*)(addressOfArgs + 0x8) == 0x1B || *(int*)(addressOfArgs + 0x8) == 0x46 || *(int*)(addressOfArgs + 0x8) == 0x1A || *(int*)(addressOfArgs + 0x8) == 0x14 || *(int*)(addressOfArgs + 0x8) == 0x40) { | |
521 | //snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "~w~ It's Most Likely! ~b~%s ", senderName); | |
522 | // PRINT(scriptEventDialogText, 5000); | |
523 | char fakeleave[100]; | |
524 | sprintf(fakeleave, "Dear ,%s sadly your dank scripts has been blocked Please contact ~y~support.rockstargames.com ~w~if you think this is a mistake! ", senderName); | |
525 | sendmemesession(fakeleave); | |
526 | *(int*)addressOfArgs = 0; | |
527 | ||
528 | // sendPlayerMessage((returnPlayerPed(senderName)) , "Very Sad From U , hextic sprx found out u did it :("); | |
529 | ||
530 | } | |
531 | ||
532 | Protections -- | |
533 | 0x830D9380B - SCTV radgeroll | |
534 | 0x830D80B8 - Clock Event | |
535 | ||
536 | ||
537 | ||
538 | void get_temperature(uint32_t _dev, uint32_t *_temp) | |
539 | { | |
540 | system_call_2(383, (uint64_t)(uint32_t)_dev, (uint64_t)(uint32_t)_temp); | |
541 | //temp 0 = cpu temp 1 = rsx | |
542 | } | |
543 | ||
544 | ||
545 | void showtempvoid() | |
546 | { | |
547 | ||
548 | ||
549 | get_temperature(0, &cpu_temp_c); | |
550 | get_temperature(1, &rsx_temp_c); | |
551 | cpu_temp_c = cpu_temp_c >> 24; | |
552 | rsx_temp_c = rsx_temp_c >> 24; | |
553 | ||
554 | } | |
555 | ||
556 | NETWORK::JOIN_ANY_SESSION(4) | |
557 | invoke<Void>(0x3C3E2AB6, p0); <- For Sessions | |
558 | ||
559 | ||
560 | void fakeHospitalBills(int playerId, int amount) | |
561 | { | |
562 | int Args[3]; | |
563 | Args[0] = 312; | |
564 | Args[1] = PLAYER::PLAYER_ID(); | |
565 | Args[2] = amount; | |
566 | TriggerScriptEvent(Args, 3, playerId); | |
567 | } | |
568 | // That doesnt take any money off user :P | |
569 | void ForcePickUpHeli() | |
570 | { | |
571 | int Args[3]; | |
572 | Args[0] = 37; | |
573 | Args[1] = selectedPlayer; | |
574 | Args[2] = 1; | |
575 | TriggerScriptEvent(Args, 3, selectedPlayer); | |
576 | } | |
577 | ///Sometimes doesn't want to work :( | |
578 | ||
579 | void ForceAirStrike() | |
580 | { | |
581 | int Args[3]; | |
582 | Args[0] = 3; | |
583 | Args[1] = selectedPlayer; | |
584 | Args[2] = 0x1B; | |
585 | TriggerScriptEvent(Args, 3, selectedPlayer); | |
586 | } | |
587 | //gives Selected user flare :? | |
588 | void ForceToBackUpHeliCopter() | |
589 | { | |
590 | int Args[3]; | |
591 | Args[0] = 3; | |
592 | Args[1] = selectedPlayer; | |
593 | Args[2] = 0x1A; | |
594 | TriggerScriptEvent(Args, 3, selectedPlayer); | |
595 | } | |
596 | //Backup Heli ? | |
597 | ||
598 | void placebounty(){ | |
599 | int Var0[20]; | |
600 | Var0[0] = 58; | |
601 | Var0[1] = PLAYER_ID(); | |
602 | Var0[2] = PLAYER_PED_ID(); // SetGlobal(2410912 + 4054, 0, 1) | |
603 | Var0[3] = PLAYER_PED_ID() + 1; //player | |
604 | Var0[4] = 1; | |
605 | Var0[5] = 2; | |
606 | Var0[6] = 3; | |
607 | Var0[7] = 4; | |
608 | Var0[8] = 5; //player | |
609 | Var0[9] = 6; | |
610 | Var0[10] = 7; | |
611 | Var0[11] = 8; | |
612 | Var0[12] = PLAYER_PED_ID() + 2; //or | |
613 | Var0[13] = 1; | |
614 | Var0[14] = 2; | |
615 | Var0[15] = 3; | |
616 | Var0[16] = 4; | |
617 | Var0[17] = 13380000; | |
618 | Var0[18] = 5; | |
619 | Var0[19] = 1; | |
620 | GAMEPLAY::SET_BIT(&Var0[16], 0); | |
621 | TriggerScriptEvent(Var0, 20, PLAYER_PED_ID()); | |
622 | } | |
623 | //indeed works only on self and only with 25k not more , idk why but as bountys are removed i find this one interesting | |
624 | ||
625 | ||
626 | ScriptArg args[5]; | |
627 | args[0].i = 219; | |
628 | args[1].i = 40; | |
629 | args[2].i = amount; | |
630 | args[3].i = -1; | |
631 | args[4].i = 1; | |
632 | unsigned int bits = (1 << player); | |
633 | PlayerMods::eventCreator::callScriptEvent(args, 5, bits); | |
634 | //PPl call this direct deposit ? | |
635 | ||
636 | ||
637 | 1581952 | |
638 | Global to spoof rank | |
639 | ||
640 | ||
641 | ||
642 | //Mudar Clima pros players | |
643 | ||
644 | //ENUMS | |
645 | char * weather[] = { "Extra Sunny", "Clear", "Clouds", "Smog", "Foggy", "Thunder", "Overcast", "Snowlight", "Snow", "Blizzard", "Neutral" }; | |
646 | int weathers; | |
647 | char * weathero[] = { "EXTRASUNNY", "CLEAR", "CLOUDS", "SMOG", "FOGGY", "THUNDER", "OVERCAST", "SNOWLIGHT", "SNOW", "BLIZZARD", "NEUTRAL" }; | |
648 | ||
649 | ||
650 | // NO CASE | |
651 | ||
652 | for (int i = 0; i < 18; i++) | |
653 | ||
654 | { | |
655 | if (!(cstrcmp(PLAYER::GET_PLAYER_NAME(i), "-")) && i != PLAYER::PLAYER_ID()) | |
656 | ||
657 | { | |
658 | ||
659 | ||
660 | bool_weather = !bool_weather;} | |
661 | ||
662 | } | |
663 | ||
664 | ||
665 | //LOOP | |
666 | if (bool_weather) { | |
667 | setWeather(weathero[weathers]);//This is for change weather to others(Ammmmzzzinng) | |
668 | ||
669 | ||
670 | } | |
671 | ||
672 | ||
673 | //VOID | |
674 | void setWeather(char *weather) | |
675 | { | |
676 | *(unsigned int*)0x10953F8 = 0x60000000; | |
677 | *(unsigned int*)0x10953A4 = 0x60000000; | |
678 | *(unsigned int*)0x3D3EB0 = 0x60000000; | |
679 | GAMEPLAY::SET_WEATHER_TYPE_NOW_PERSIST(weathero[weathers]); | |
680 | } | |
681 | ||
682 | ||
683 | //-------------------------------------------------------------------- | |
684 | addTitle("Water Editor"); | |
685 | addIntOption("Water Height", &WaterHeight, -1000, 1000, true); | |
686 | addIntOption("Ripple Density", &WaterDensity, -1000, 1000, true); | |
687 | addIntOption("Foam Amount", &FoamAmount, -1000, 1000, true); | |
688 | switch (getOption()) { | |
689 | case 1: | |
690 | WriteFloat(WaterHeightAddress, WaterHeight); | |
691 | break; | |
692 | case 2: | |
693 | WriteFloat(WaterDensityAddress, WaterDensity); | |
694 | break; | |
695 | case 3: | |
696 | WriteFloat(FoamAmountAddress, FoamAmount); | |
697 | break; | |
698 | } | |
699 | break; | |
700 | ||
701 | ||
702 | float floatArray[100]; | |
703 | float* ReadFloat(int address, int length) | |
704 | { | |
705 | for (int i = 0; i < length; i++) | |
706 | { | |
707 | floatArray[i] = *(float*)(address + (i * 0x04)); | |
708 | } | |
709 | return floatArray; | |
710 | } | |
711 | float WriteFloats(uint Start, float Values) | |
712 | { | |
713 | for (int i = 0; i < Values; i++) | |
714 | { | |
715 | floatArray[i] = *(float*)(Start + (i * 0x04)); | |
716 | } | |
717 | } | |
718 | ||
719 | //========================= | |
720 | ||
721 | //PROTECOES | |
722 | ||
723 | addTitle("Modder Protection"); | |
724 | addToggle("Non Host Kick", &bool_eventp[0]); | |
725 | addToggle("Fake Leave", &bool_eventp[1]); | |
726 | addToggle("Rank", &bool_eventp[3]); | |
727 | addToggle("Give Money", &bool_eventp[4]); | |
728 | addToggle("Apartment Invite", &bool_eventp[5]); | |
729 | addToggle("Game Invite", &bool_eventp[6]); | |
730 | addToggle("Job Invite", &bool_eventp[7]); | |
731 | addToggle("Time", &bool_eventp[16]); | |
732 | addToggle("Weather", &bool_eventp[17]); | |
733 | addToggle("Clear Task", &bool_protection[3]); | |
734 | addToggle("Take / Give Weapons", &bool_protection[4]); | |
735 | addToggle("Animation / Teleport", &bool_protection[5]); | |
736 | addToggle("Alter Wanted Level", &bool_protection[6]); | |
737 | addToggle("Particle FX", &bool_protection[7]); | |
738 | addToggle("Admin Kick Protection", &AK); | |
739 | addToggle("Fire Protection", &bool_protection[8]); | |
740 | addToggle("Weapon Protection", &bool_protection[9]); | |
741 | addToggle("Clone Protection", &CloneProtection); | |
742 | addToggle("Disable Account & Stat Protection", &bool_protection[20]); | |
743 | switch (getOption()) { | |
744 | case 1: | |
745 | *(int*)0x12D1A50 = bool_eventp[0] ? 0x4E800020 : 0x7C0802A6; | |
746 | *(int*)0x12C96B4 = bool_eventp[0] ? 0x4E800020 : 0x7C0802A6; | |
747 | *(int*)0x12D1E28 = bool_eventp[0] ? 0x4E800020 : 0x7C0802A6; | |
748 | *(int*)0x172D73C = bool_eventp[0] ? 0x4E800020 : 0x7C0802A6; | |
749 | break; | |
750 | case 2: | |
751 | *(int*)0x12C2988 = bool_eventp[1] ? 0x4E800020 : 0x7C0802A6; | |
752 | break; | |
753 | case 3: | |
754 | *(int*)0x12D1E28 = bool_eventp[3] ? 0x4E800020 : 0x7C0802A6; | |
755 | break; | |
756 | case 4: | |
757 | *(int*)0x12CB55C = bool_eventp[4] ? 0x4E800020 : 0x7C0802A6; | |
758 | *(int*)0x12C1AF4 = bool_eventp[4] ? 0x4E800020 : 0x7C0802A6; | |
759 | *(int*)0x12D2104 = bool_eventp[4] ? 0x4E800020 : 0x7C0802A6; | |
760 | break; | |
761 | case 5: | |
762 | *(int*)0x12C3C74 = bool_eventp[5] ? 0x4E800020 : 0x7C0802A6; | |
763 | *(int*)0x12CB198 = bool_eventp[5] ? 0x4E800020 : 0x7C0802A6; | |
764 | *(int*)0x12CB70C = bool_eventp[5] ? 0x4E800020 : 0x7C0802A6; | |
765 | *(int*)0x12CB930 = bool_eventp[5] ? 0x4E800020 : 0x7C0802A6; | |
766 | break; | |
767 | case 6: | |
768 | *(int*)0x12C8D60 = bool_eventp[6] ? 0x4E800020 : 0x7C0802A6; | |
769 | break; | |
770 | case 7: | |
771 | *(int*)0x12C5638 = bool_eventp[7] ? 0x4E800020 : 0x7C0802A6; | |
772 | *(int*)0x12D5098 = bool_eventp[7] ? 0x4E800020 : 0x7C0802A6; | |
773 | *(int*)0x12BD36C = bool_eventp[7] ? 0x4E800020 : 0x7C0802A6; | |
774 | break; | |
775 | case 8: | |
776 | *(int*)0x12BDFCC = bool_eventp[16] ? 0x4E800020 : 0x7C0802A6; | |
777 | break; | |
778 | case 9: | |
779 | *(int*)0x12D5098 = bool_eventp[17] ? 0x4E800020 : 0x7C0802A6; | |
780 | break; | |
781 | case 10: | |
782 | *(int*)0x12CC958 = bool_protection[3] ? 0x4E800020 : 0x7C0802A6; | |
783 | break; | |
784 | case 11: | |
785 | *(int*)0x12D0584 = bool_protection[4] ? 0x4E800020 : 0x7C0802A6; | |
786 | *(int*)0x12C3ACC = bool_protection[4] ? 0x4E800020 : 0x7C0802A6; | |
787 | *(int*)0x12C37EC = bool_protection[4] ? 0x4E800020 : 0x7C0802A6; | |
788 | if (!bool_protection[4]) | |
789 | { | |
790 | AimProtectWeapon = false; | |
791 | } | |
792 | else | |
793 | { | |
794 | AimProtectWeapon = true; | |
795 | } | |
796 | break; | |
797 | case 12: | |
798 | *(int*)0x12C3C74 = bool_protection[5] ? 0x4E800020 : 0x7C0802A6; | |
799 | *(int*)0x12CB198 = bool_protection[5] ? 0x4E800020 : 0x7C0802A6; | |
800 | *(int*)0x12CB70C = bool_protection[5] ? 0x4E800020 : 0x7C0802A6; | |
801 | *(int*)0x12CB930 = bool_protection[5] ? 0x4E800020 : 0x7C0802A6; | |
802 | break; | |
803 | case 13: | |
804 | *(int*)0x12C78DC = bool_protection[6] ? 0x4E800020 : 0x7C0802A6; | |
805 | break; | |
806 | case 14: | |
807 | *(int*)0x12C5638 = bool_protection[7] ? 0x4E800020 : 0x7C0802A6; | |
808 | *(int*)0x12D5098 = bool_protection[7] ? 0x4E800020 : 0x7C0802A6; | |
809 | *(int*)0x12BD36C = bool_protection[7] ? 0x4E800020 : 0x7C0802A6; | |
810 | break; | |
811 | case 16: | |
812 | *(int*)0x12C4A44 = bool_protection[8] ? 0x4E800020 : 0x7C0802A6; | |
813 | *(int*)0x12C5638 = bool_protection[8] ? 0x4E800020 : 0x7C0802A6; | |
814 | *(int*)0x12C69F0 = bool_protection[8] ? 0x4E800020 : 0x7C0802A6; | |
815 | *(int*)0x12C0128 = bool_protection[8] ? 0x4E800020 : 0x7C0802A6; | |
816 | break; | |
817 | case 17: | |
818 | *(int*)0x12C3C74 = bool_protection[9] ? 0x4E800020 : 0x7C0802A6; | |
819 | *(int*)0x12C3ACC = bool_protection[9] ? 0x4E800020 : 0x7C0802A6; | |
820 | *(int*)0x12C37EC = bool_protection[9] ? 0x4E800020 : 0x7C0802A6; | |
821 | break; | |
822 | case 19: | |
823 | *(int*)0x12D137C = bool_protection[20] ? 0x4E800020 : 0x7C0802A6; | |
824 | break; | |
825 | } | |
826 | break; | |
827 | ||
828 | //-------------------------------------------------------------------- | |
829 | //-------------------------------------------------------------------- | |
830 | //-------------------------------------------------------------------- | |
831 | namespace PlayerMods | |
832 | { | |
833 | namespace eventCreator | |
834 | { | |
835 | void callScriptEvent(ScriptArg *args, int argsCount, unsigned int playerBits) | |
836 | { | |
837 | SCRIPT::TRIGGER_SCRIPT_EVENT(1, args, argsCount, playerBits); | |
838 | } | |
839 | }; | |
840 | }; | |
841 | ||
842 | bool globalStatVersionType = 1;//this decides whether I use the first 3 (0) or the last 3 (1) | |
843 | ||
844 | void setupDefaultStatEvent(int player, ScriptArg *args) { | |
845 | args[0].i = 150; | |
846 | args[1].i = player; | |
847 | args[2].i = player;//unknown value | |
848 | args[3].i = 88;//int | |
849 | args[4].i = 34;//bool | |
850 | args[5].i = 1;//float | |
851 | args[6].i = 2949;//int | |
852 | args[7].i = 228;//bool | |
853 | args[8].i = 228;//float | |
854 | args[9].i = 0;//value to set for the int ones. This is added on to the previous value set for the stat | |
855 | args[10].i = 0;//value to set for the float ones. This is added on to the previous value set for the stat | |
856 | args[11].i = 0;//value to set for the bool ones | |
857 | } | |
858 | ||
859 | enum { | |
860 | EVENT_STAT_INT_0 = 3, | |
861 | EVENT_STAT_INT_1 = 6, | |
862 | EVENT_STAT_BOOL_0 = 4, | |
863 | EVENT_STAT_BOOL_1 = 7, | |
864 | EVENT_STAT_FLOAT_0 = 5, | |
865 | EVENT_STAT_FLOAT_1 = 8, | |
866 | EVENT_STAT_VALUE_INT = 9, | |
867 | EVENT_STAT_VALUE_FLOAT = 10, | |
868 | EVENT_STAT_VALUE_BOOL = 11 | |
869 | }; | |
870 | ||
871 | void setPlayerStatInt(int player, int statIndex, int statValue, bool type = globalStatVersionType) | |
872 | { | |
873 | statValue = 0xFFFFFFFF - statValue + 1; | |
874 | ScriptArg args[12]; | |
875 | setupDefaultStatEvent(player, args); | |
876 | printf("%i\n", args[6].i); | |
877 | args[EVENT_STAT_VALUE_INT].ui = *(unsigned int*)(&statValue); | |
878 | args[EVENT_STAT_VALUE_BOOL].i = statValue; | |
879 | args[EVENT_STAT_VALUE_FLOAT].f = statValue; | |
880 | if (type == 0) | |
881 | args[EVENT_STAT_INT_0].i = statIndex; | |
882 | else | |
883 | args[EVENT_STAT_INT_1].i = statIndex; | |
884 | unsigned int bits = (1 << player); | |
885 | PlayerMods::eventCreator::callScriptEvent(args, 12, bits); | |
886 | } | |
887 | ||
888 | void setPlayerStatBool(int player, int statIndex, bool statValue, bool type = globalStatVersionType) { | |
889 | ScriptArg args[12]; | |
890 | setupDefaultStatEvent(player, args); | |
891 | args[EVENT_STAT_VALUE_INT].i = *(unsigned int*)(&statValue); | |
892 | args[EVENT_STAT_VALUE_BOOL].i = statValue; | |
893 | args[EVENT_STAT_VALUE_FLOAT].f = statValue; | |
894 | if (type == 0) | |
895 | args[EVENT_STAT_BOOL_0].i = statIndex; | |
896 | else | |
897 | args[EVENT_STAT_BOOL_1].i = statIndex; | |
898 | unsigned int bits = (1 << player); | |
899 | PlayerMods::eventCreator::callScriptEvent(args, 12, bits); | |
900 | } | |
901 | ||
902 | void sendCash(int player, int amount) { | |
903 | ScriptArg args[5]; | |
904 | args[0].i = 219;//0xDB | |
905 | args[1].i = 40;//player... I think you set to 40 to make it work post-patch. I haven't tested | |
906 | args[2].i = amount; | |
907 | args[3].i = -1; | |
908 | args[4].i = 1; | |
909 | unsigned int bits = (1 << player); | |
910 | PlayerMods::eventCreator::callScriptEvent(args, 5, bits); | |
911 | } | |
912 | ||
913 | //FUNCOES | |
914 | ||
915 | addOption("Player Unlock Heist Vehicles"); | |
916 | addOption("Player Redesign Character"); | |
917 | addOption("Give 1,000,000$ Cash"); | |
918 | addOption("Player Unlock All Heist Trophies"); | |
919 | addOption("Player Unlock All Hair Cuts"); | |
920 | addOption("Player Unlock All Tattoos"); | |
921 | addOption("Player Remove Badsport"); | |
922 | addOption("Player Give Badsport"); | |
923 | addOption("Player Enable Roosevelt"); | |
924 | addOption("Player Bypass Vehicle Sell Time"); | |
925 | addOption("Give Modded Rolls"); | |
926 | ||
927 | ||
928 | case 1: | |
929 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_CHAR_FM_VEHICLE_1_UNLCK"), -1, 1), 1); | |
930 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_CHAR_FM_VEHICLE_2_UNLCK"), -1, 1), 1); break; | |
931 | case 2: setPlayerStatBool(selectedPlayer, STATS::STAT_SET_BOOL(GAMEPLAY::GET_HASH_KEY("MP0_FM_CHANGECHAR_ASKED"), 0, 1), 1); break; | |
932 | case 3: sendCash(selectedPlayer, 1000000); break; | |
933 | case 4: setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MPPLY_HEIST_ACH_TRACKER"), -1, 1), 1); break; | |
934 | case 5: | |
935 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_CLTHS_AVAILABLE_HAIR"), -1, 1), 1); | |
936 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_CLTHS_AVAILABLE_HAIR_1"), -1, 1), 1); | |
937 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_CLTHS_AVAILABLE_HAIR_2"), -1, 1), 1); | |
938 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_CLTHS_AVAILABLE_HAIR_3"), -1, 1), 1); | |
939 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_CLTHS_AVAILABLE_HAIR_4"), -1, 1), 1); | |
940 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_CLTHS_AVAILABLE_HAIR_5"), -1, 1), 1); | |
941 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_CLTHS_AVAILABLE_HAIR_6"), -1, 1), 1); | |
942 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_CLTHS_AVAILABLE_HAIR_7"), -1, 1), 1); break; | |
943 | case 6: | |
944 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_FM_DM_WINS"), 50, 1), 1); | |
945 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_FM_TDM_MVP"), 50, 1), 1); | |
946 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_FM_DM_TOTALKILLS"), 500, 1), 1); | |
947 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_BOOL(GAMEPLAY::GET_HASH_KEY("MP0_AWD_FMATTGANGHQ"), 1, 1), 1); | |
948 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_FMBBETWIN"), 50000, 1), 1); | |
949 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_FMWINEVERYGAMEMODE"), 1, 1), 1); | |
950 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_FMRACEWORLDRECHOLDER"), 1, 1), 1); | |
951 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_FMFULLYMODDEDCAR"), 1, 1), 1); | |
952 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_FMMOSTKILLSSURVIVE"), 1, 1), 1); | |
953 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_FMKILL3ANDWINGTARACE"), 1, 1), 1); | |
954 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_FMKILLSTREAKSDM"), 1, 1), 1); | |
955 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_FMKILLBOUNTY"), 25, 1), 1); | |
956 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_LAPDANCES"), 25, 1), 1); | |
957 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_CAR_BOMBS_ENEMY_KILLS"), 25, 1), 1); | |
958 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_SECURITY_CARS_ROBBED"), 25, 1), 1); | |
959 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_HOLD_UP_SHOPS"), 20, 1), 1); | |
960 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_FMREVENGEKILLSDM"), 50, 1), 1); | |
961 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_AWD_RACES_WON"), 50, 1), 1); | |
962 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_PLAYER_HEADSHOTS"), 500, 1), 1); | |
963 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_DB_PLAYER_KILLS"), 1000, 1), 1); break; | |
964 | case 7: | |
965 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_BAD_SPORT_BITSET"), 0, 0), 1); | |
966 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_MPPLY_WAS_I_BAD_SPORT"), 0, 0), 1); | |
967 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_MPPLY_OVERALL_BADSPORT"), 0, 0), 1); | |
968 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_MPPLY_CHAR_IS_BADSPORT"), 0, 0), 1); | |
969 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_MPPLY_BECAME_BADSPORT_NUM"), 0, 0), 1); | |
970 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_MPPLY_DESTROYED_PVEHICLES"), 0, 0), 1); break; | |
971 | case 8: | |
972 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_BAD_SPORT_BITSET"), 1, 1), 1); | |
973 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_MPPLY_WAS_I_BAD_SPORT"), 1, 1), 1); | |
974 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_MPPLY_OVERALL_BADSPORT"), 1, 1), 1); | |
975 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_MPPLY_CHAR_IS_BADSPORT"), 1, 1), 1); | |
976 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_MPPLY_BECAME_BADSPORT_NUM"), 1, 1), 1); | |
977 | setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_MPPLY_DESTROYED_PVEHICLES"), 1, 1), 1); break; | |
978 | case 9: setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MPPLY_VEHICLE_ID_ADMIN_WEB"), 117401876, 1), 1); break; | |
979 | case 10: setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MPPLY_VEHICLE_SELL_TIME"), 0, 1), 1); break; | |
980 | case 11: setPlayerStatInt(selectedPlayer, STATS::STAT_SET_INT(GAMEPLAY::GET_HASH_KEY("MP0_SHOOTING_ABILITY"), 1000, true), 1); break; | |
981 | } | |
982 | ||
983 | //========================================================= | |
984 | //========================================================= | |
985 | //========================================================= | |
986 | // Funcoes trolagem players | |
987 | ||
988 | addOption("Non Host KICK");//case 1 | |
989 | addOption("De-Rank(SPAM)");//case 2 | |
990 | addOption("Set Passive on");//case 3 | |
991 | addOption("Set Passive Off");//case 4 | |
992 | addOption("Fake Leave");//case 5 | |
993 | addOption("Force Into Golf");//case 6 | |
994 | addOption("Reset View");//case 7 | |
995 | addOption("Remove Wanted Level");//case 4 | |
996 | ||
997 | case 1: kickPlayerNonHost(selectedPlayer); break; | |
998 | case 2: givePlayerRP(selectedPlayer, -200000); break; | |
999 | case 3: setPlayerPassiveModeOn(selectedPlayer); break; | |
1000 | case 4: setPlayerPassiveModeOff(selectedPlayer); break; | |
1001 | case 5: makePlayerFakeLeave(selectedPlayer); break; | |
1002 | case 6: teleportPlayerIntoGolfEvent(selectedPlayer); break; | |
1003 | case 7: resetPlayerView(selectedPlayer); break; | |
1004 | ||
1005 | ||
1006 | ||
1007 | namespace PlayerMods | |
1008 | { | |
1009 | namespace eventCreator | |
1010 | { | |
1011 | void callScriptEvent(ScriptArg *args, int argsCount, unsigned int playerBits) | |
1012 | { | |
1013 | SCRIPT::TRIGGER_SCRIPT_EVENT(1, args, argsCount, playerBits); | |
1014 | } | |
1015 | }; | |
1016 | }; | |
1017 | ||
1018 | void removePlayerWantedLevel(int player) { | |
1019 | ScriptArg args[2]; | |
1020 | args[0].i = 356; | |
1021 | args[1].i = player; | |
1022 | unsigned int bits = (1 << player); | |
1023 | PlayerMods::eventCreator::callScriptEvent(args, 3, bits); | |
1024 | } | |
1025 | ||
1026 | void resetPlayerView(int player) { | |
1027 | ScriptArg args[3]; | |
1028 | args[0].i = 0x2; | |
1029 | args[1].i = player; | |
1030 | args[2].i = 0x2e;//46 | |
1031 | unsigned int bits = (1 << player); | |
1032 | PlayerMods::eventCreator::callScriptEvent(args, 3, bits); | |
1033 | } | |
1034 | ||
1035 | void teleportPlayerIntoGolfEvent(int player) {//Basicallly Forced | |
1036 | ScriptArg args[3]; | |
1037 | args[0].i = 0x3; | |
1038 | args[1].i = player; | |
1039 | args[2].i = 0x37; | |
1040 | unsigned int bits = (1 << player); | |
1041 | PlayerMods::eventCreator::callScriptEvent(args, 3, bits); | |
1042 | } | |
1043 | ||
1044 | void kickPlayerNonHost(int player) {//NON HOSt KICK HECK YEAH | |
1045 | //0x00D003DFB4+10*0x4 = args | |
1046 | unsigned int playerBit = (1 << player); | |
1047 | //0x2 0x7 0x35 and 0xA was me so idk... | |
1048 | ScriptArg args[3] = { 0x2, player, 0x35 };//0x35 is the speccial one I guess | |
1049 | ||
1050 | //first arg is always 1 | |
1051 | //last arg is always the bit thing | |
1052 | //second arg meh | |
1053 | //third arg is the size of the data | |
1054 | SCRIPT::TRIGGER_SCRIPT_EVENT(1, args, 3, playerBit); | |
1055 | } | |
1056 | ||
1057 | void givePlayerRP(int player, int amount, int unk1 = -1, int unk2 = 1) | |
1058 | { | |
1059 | ScriptArg args[5]; | |
1060 | args[0].i = 0xD8;//216 | |
1061 | args[1].i = player; | |
1062 | args[2].i = 0xffffffff - amount + 1;//46 | |
1063 | args[3].i = 0;//-1 0 is partner, else is gen | |
1064 | args[4].i = 0;//unk2;//1 | |
1065 | unsigned int bits = (1 << player); | |
1066 | PlayerMods::eventCreator::callScriptEvent(args, 5, bits); | |
1067 | } | |
1068 | ||
1069 | void setPlayerPassiveModeOn(int player) { | |
1070 | ScriptArg args[3]; | |
1071 | args[0].i = 0x104; | |
1072 | args[1].i = player; | |
1073 | args[2].i = 0; | |
1074 | unsigned int bits = (1 << player); | |
1075 | PlayerMods::eventCreator::callScriptEvent(args, 3, bits); | |
1076 | } | |
1077 | void setPlayerPassiveModeOff(int player) { | |
1078 | ScriptArg args[3]; | |
1079 | args[0].i = 0x118; | |
1080 | args[1].i = player; | |
1081 | args[2].i = 0; | |
1082 | unsigned int bits = (1 << player); | |
1083 | PlayerMods::eventCreator::callScriptEvent(args, 3, bits); | |
1084 | } | |
1085 | ||
1086 | void makePlayerFakeLeave(int player) | |
1087 | { | |
1088 | ScriptArg args[3]; | |
1089 | args[0].i = 0x2; | |
1090 | args[1].i = player; | |
1091 | args[2].i = 0x34;//46 | |
1092 | unsigned int bits = (1 << player); | |
1093 | PlayerMods::eventCreator::callScriptEvent(args, 3, bits); | |
1094 | } | |
1095 | ||
1096 | ||
1097 | ||
1098 | //------------------ | |
1099 | int int_NetworkOptions[60]; | |
1100 | ||
1101 | case 10://FORCAR O TUTORIAL | |
1102 | int Args1[4]; | |
1103 | Args1[0] = 3;//0x3 | |
1104 | Args1[1] = int_NetworkOptions[0]; | |
1105 | Args1[2] = 20; | |
1106 | Args1[3] = -1; | |
1107 | SCRIPT::TriggerScriptEvent(Args1, 4, int_NetworkOptions[0]); | |
1108 | ||
1109 | //----------------- | |
1110 | ||
1111 | //ADD DINHEIRO NO BANCO | |
1112 | ||
1113 | int Args6[5]; | |
1114 | Args6[0] = 219;//0xDB | |
1115 | Args6[1] = 40; | |
1116 | Args6[2] = 100000000000; | |
1117 | Args6[3] = -1; | |
1118 | Args6[4] = 1; | |
1119 | SCRIPT::TriggerScriptEvent(Args6, 5, selectedPlayer); | |
1120 | ||
1121 | //-------------------------------------------------------------- | |
1122 | //-------------------------------------------------------------- | |
1123 | //-------------------------------------------------------------- | |
1124 | //--------------------NOVOS AVISOS DE MODDERS------------------- | |
1125 | //-------------------------------------------------------------- | |
1126 | //-------------------------------------------------------------- | |
1127 | ||
1128 | //Protecoes | |
1129 | ||
1130 | ||
1131 | bool moneyProtection = true; | |
1132 | bool nonhostkickprotection = true; | |
1133 | bool fakeleavelobbyprotection = true; | |
1134 | bool resetviewprotection = true; | |
1135 | bool joinjobprotection = true; | |
1136 | bool blockappart = true; | |
1137 | ||
1138 | bool removewantedprot = false; | |
1139 | bool passiveodeeeoff = false; | |
1140 | bool passiveodeeeon = false; | |
1141 | bool activateBroadcastAppprot = false; | |
1142 | bool messageprotection = false; | |
1143 | bool sondprot1 = false; | |
1144 | bool sondprot0 = false; | |
1145 | bool deactivateBroadcastAppprot = false; | |
1146 | bool onevonedeathmatchInviteprot = false; | |
1147 | bool tpArm = false; | |
1148 | bool tpdart = false; | |
1149 | bool whaterrrr = false; | |
1150 | bool tpgolf = false; | |
1151 | ||
1152 | ||
1153 | ||
1154 | char scriptEventDialogText[100]; | |
1155 | unsigned int scriptEventDetour(unsigned int r3, unsigned int senderData, unsigned int recieverData, unsigned int r6, unsigned int r7, unsigned int r8, unsigned int r9) { | |
1156 | int addressOfArgs = r3 + 10 * 0x4; | |
1157 | char *senderName = (char*)(*(int*)(senderData + 0x78) + 0x10); | |
1158 | ||
1159 | if (*(int*)addressOfArgs == 0x2 && *(int*)(addressOfArgs + 0x8) == 0x35) | |
1160 | if (nonhostkickprotection) | |
1161 | { | |
1162 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried To Kick U ~r~[ NONHOST KICK ]!", senderName); | |
1163 | PRINT(scriptEventDialogText, 5000); | |
1164 | *(int*)addressOfArgs = 0; | |
1165 | } | |
1166 | ||
1167 | if (*(int*)addressOfArgs == 0x2/* && *(int*)(addressOfArgs+0x4) == PLAYER::PLAYER_ID()*/ && *(int*)(addressOfArgs + 0x8) == 0x34) | |
1168 | { | |
1169 | if (fakeleavelobbyprotection) | |
1170 | { | |
1171 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried To Make U Fake Leave Lobby!", senderName); | |
1172 | PRINT(scriptEventDialogText, 5000); | |
1173 | *(int*)addressOfArgs = 0; | |
1174 | } | |
1175 | } | |
1176 | ||
1177 | if (*(int*)addressOfArgs == 0x2/* && *(int*)(addressOfArgs+0x4) == PLAYER::PLAYER_ID()*/ && *(int*)(addressOfArgs + 0x8) == 0x2e) { | |
1178 | if (resetviewprotection) | |
1179 | { | |
1180 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried To Reset Your View!", senderName); | |
1181 | PRINT(scriptEventDialogText, 5000); | |
1182 | *(int*)addressOfArgs = 0;} | |
1183 | } | |
1184 | ||
1185 | if (*(int*)addressOfArgs == 0xD8) | |
1186 | { | |
1187 | if (antigiverp) | |
1188 | { | |
1189 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried To Give/Remove %i RP!", senderName, *(int*)(addressOfArgs + 0x8)); | |
1190 | PRINT(scriptEventDialogText, 5000); | |
1191 | *(int*)addressOfArgs = 0; | |
1192 | } | |
1193 | } | |
1194 | ||
1195 | if (*(int*)addressOfArgs == 0xDB) | |
1196 | { | |
1197 | if (moneyProtection) | |
1198 | { | |
1199 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried To Give/Remove Money!", senderName); | |
1200 | PRINT(scriptEventDialogText, 2000); | |
1201 | *(int*)addressOfArgs = 0; | |
1202 | } | |
1203 | else | |
1204 | ||
1205 | { | |
1206 | ||
1207 | } | |
1208 | } | |
1209 | ||
1210 | if (*(int*)addressOfArgs == 0x23) { | |
1211 | if (activateBroadcastAppprot) { | |
1212 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried To Activate Broadcast App!", senderName); | |
1213 | PRINT(scriptEventDialogText, 2000); | |
1214 | *(int*)addressOfArgs = 0; | |
1215 | } | |
1216 | else { | |
1217 | ||
1218 | } | |
1219 | } | |
1220 | ||
1221 | ||
1222 | if (*(int*)addressOfArgs == 0x98) { | |
1223 | if (messageprotection) | |
1224 | { | |
1225 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried Fake Join Job Message!", senderName); | |
1226 | PRINT(scriptEventDialogText, 5000); | |
1227 | *(int*)addressOfArgs = 0; | |
1228 | } | |
1229 | } | |
1230 | if (*(int*)addressOfArgs == 0x29) { | |
1231 | if (onevonedeathmatchInviteprot) | |
1232 | { | |
1233 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried One Vone DeathMatch Invite!", senderName); | |
1234 | PRINT(scriptEventDialogText, 5000); | |
1235 | *(int*)addressOfArgs = 0; | |
1236 | } | |
1237 | } | |
1238 | if (*(int*)addressOfArgs == 0x24) { | |
1239 | if (deactivateBroadcastAppprot) | |
1240 | { | |
1241 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried To Desactivate Broadcast App!", senderName); | |
1242 | PRINT(scriptEventDialogText, 5000); | |
1243 | *(int*)addressOfArgs = 0; | |
1244 | } | |
1245 | } | |
1246 | if (*(int*)addressOfArgs == 0x1E) { | |
1247 | if (sondprot0) | |
1248 | { | |
1249 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried Play Sound Type 0!", senderName); | |
1250 | PRINT(scriptEventDialogText, 5000); | |
1251 | *(int*)addressOfArgs = 0; | |
1252 | } | |
1253 | } | |
1254 | if (*(int*)addressOfArgs == 0x1F) { | |
1255 | if (sondprot1) | |
1256 | { | |
1257 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried Play Sound Type !", senderName); | |
1258 | PRINT(scriptEventDialogText, 5000); | |
1259 | *(int*)addressOfArgs = 0; | |
1260 | } | |
1261 | } | |
1262 | ||
1263 | if (*(int*)addressOfArgs == 0x164) { | |
1264 | if (removewantedprot) | |
1265 | { | |
1266 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried Remove U Level!", senderName); | |
1267 | PRINT(scriptEventDialogText, 5000); | |
1268 | *(int*)addressOfArgs = 0; | |
1269 | } | |
1270 | } | |
1271 | ||
1272 | if (*(int*)addressOfArgs == 0x104) { | |
1273 | if (passiveodeeeon) | |
1274 | { | |
1275 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried Set U In Passive Mode ON!", senderName); | |
1276 | PRINT(scriptEventDialogText, 5000); | |
1277 | *(int*)addressOfArgs = 0; | |
1278 | } | |
1279 | } | |
1280 | ||
1281 | if (*(int*)addressOfArgs == 0x118) { | |
1282 | if (passiveodeeeoff) | |
1283 | { | |
1284 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried Set U In Passive Mode OFF!", senderName); | |
1285 | PRINT(scriptEventDialogText, 5000); | |
1286 | *(int*)addressOfArgs = 0; | |
1287 | } | |
1288 | } | |
1289 | ||
1290 | ||
1291 | ||
1292 | if (*(int*)addressOfArgs == 0x37) { | |
1293 | if (tpgolf) | |
1294 | { | |
1295 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried Teleport Into Golf Event!", senderName); | |
1296 | PRINT(scriptEventDialogText, 5000); | |
1297 | *(int*)addressOfArgs = 0; | |
1298 | } | |
1299 | } | |
1300 | ||
1301 | if (*(int*)addressOfArgs == 0x35) { | |
1302 | if (tpArm) | |
1303 | { | |
1304 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried Teleport Into Arm Wrestling Event!", senderName); | |
1305 | PRINT(scriptEventDialogText, 5000); | |
1306 | *(int*)addressOfArgs = 0; | |
1307 | } | |
1308 | } | |
1309 | ||
1310 | if (*(int*)addressOfArgs == 0x36) { | |
1311 | if (tpdart) | |
1312 | { | |
1313 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried Teleport Into Darts Event!", senderName); | |
1314 | PRINT(scriptEventDialogText, 5000); | |
1315 | *(int*)addressOfArgs = 0; | |
1316 | } | |
1317 | } | |
1318 | ||
1319 | if (*(int*)addressOfArgs == 0x187198C) { | |
1320 | if (whaterrrr) | |
1321 | { | |
1322 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried Change Weather!", senderName); | |
1323 | PRINT(scriptEventDialogText, 5000); | |
1324 | *(int*)addressOfArgs = 0; | |
1325 | } | |
1326 | } | |
1327 | ||
1328 | if (*(int*)addressOfArgs == 0x16C) { | |
1329 | if (blockappart) | |
1330 | { | |
1331 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried to force you into their apartment!", senderName); | |
1332 | PRINT(scriptEventDialogText, 5000); | |
1333 | *(int*)addressOfArgs = 0; | |
1334 | } | |
1335 | } | |
1336 | ||
1337 | if (*(int*)addressOfArgs == 0x3) | |
1338 | { | |
1339 | if (joinjobprotection) | |
1340 | { | |
1341 | if (*(int*)(addressOfArgs + 0x8) == 0x37 || *(int*)(addressOfArgs + 0x8) == 0x36 || *(int*)(addressOfArgs + 0x8) == 0x35) | |
1342 | { | |
1343 | ||
1344 | snprintf(scriptEventDialogText, sizeof(scriptEventDialogText), "%s Tried to force you to join a job!", senderName); | |
1345 | PRINT(scriptEventDialogText, 5000); | |
1346 | *(int*)addressOfArgs = 0; | |
1347 | } | |
1348 | } | |
1349 | } | |
1350 | return _0x0012C8D60(r3, senderData, recieverData, r6, r7, r8, r9); | |
1351 | } | |
1352 | ||
1353 | void setupScriptEventDetour() { | |
1354 | *(int*)(0x1C6BD80) = *(int*)((int)&scriptEventDetour); | |
1355 | *(int*)((0x1C6BD80 + 0x4)) = *(int*)( (int)&scriptEventDetour + 0x4); | |
1356 | } | |
1357 | ||
1358 | //------------------------------------------------------------------------------- | |
1359 | ||
1360 | //Suspencao Carros | |
1361 | ||
1362 | bool bool_VehicleOptions[50]; | |
1363 | int int_VehicleOptions[50]; | |
1364 | float float_VehicleOptions[20]; | |
1365 | int GPMA_stub[2] = { 0xA552E0, 0x1C85330 }; | |
1366 | ||
1367 | void vehicle_SetSuspensionHeight(float height) | |
1368 | { | |
1369 | if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), 0)) | |
1370 | { | |
1371 | int veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), 0); | |
1372 | int address = get_ent_address(veh); | |
1373 | *(float*)(address + 0xCEC) = height; | |
1374 | } | |
1375 | } | |
1376 | ||
1377 | //---------------------- | |
1378 | ||
1379 | int GET_VEHICLE_ADD(int Index) | |
1380 | { | |
1381 | int Tmp = *(int*)(0x208D1B8); | |
1382 | return *(int*)(Tmp + (Index * 0x04)) + 0x04; | |
1383 | } | |
1384 | void SET_HANDLING_MOD(int Index, int Mod, float Value) | |
1385 | { | |
1386 | int Address = GET_VEHICLE_ADD(Index) + Mod; | |
1387 | *(float*)(Address) = Value; | |
1388 | } | |
1389 | ||
1390 | ||
1391 | enum Handling | |
1392 | { | |
1393 | Mass = 0x04, | |
1394 | InitialDragCoeff = 0x08, | |
1395 | vecCentreOfMass1 = 0x0C, | |
1396 | vecCentreOfMass2 = 0x10, | |
1397 | vecCentreOfMass3 = 0x14, | |
1398 | vecInertiaMultiplier1 = 0x1C, | |
1399 | vecInertiaMultiplier2 = 0x20, | |
1400 | vecInertiaMultiplier3 = 0x24, | |
1401 | PercentSubmerged = 0x2C, | |
1402 | DriveInertia = 0x40, | |
1403 | ClutchRateUpShift = 0x44, | |
1404 | ClutchRateDownShift = 0x48, | |
1405 | InitialDriveForce = 0x4C, | |
1406 | BrakeForce = 0x58, | |
1407 | AntiRollBarForce = 0xC8, | |
1408 | HandBrakeForce = 0x68, | |
1409 | TractionCurveMax = 0x74, | |
1410 | TractionCurveMin = 0x7C, | |
1411 | TractionSpringDMax = 0x8C, | |
1412 | LSpeedTracLossMult = 0x94, | |
1413 | CamberStiffnesss = 0xA4, | |
1414 | SuspensionForce = 0xA8, | |
1415 | SuspensionUpperLimit = 0xB4, | |
1416 | SuspensionLowerLimit = 0xB8, | |
1417 | SuspensionRaise = 0xBC, | |
1418 | RollCHeightFront = 0xD4, | |
1419 | RollCHeightRear = 0xD8, | |
1420 | SeatOffsetDistX = 0xF4, | |
1421 | SeatOffsetDistY = 0xF8, | |
1422 | SeatOffsetDistZ = 0xFC, | |
1423 | Velocity = 0x50, | |
1424 | ||
1425 | CollisionDamageMult = 0xDC, | |
1426 | WeaponDamageMult = 0xE0, | |
1427 | DeformDamageMult = 0xE4, | |
1428 | EngineDamageMult = 0xE8, | |
1429 | PetrolTankVolume = 0xEC, | |
1430 | OilVolume = 0xF0, | |
1431 | MonetaryValue = 0x100, | |
1432 | strModelFlags = 0x104, | |
1433 | strHandlingFlags = 0x108, | |
1434 | strDamageFlags = 0x10C, | |
1435 | ||
1436 | //Plane / Helicopter | |
1437 | Thrust = 0x140, | |
1438 | ThrustFallOff = 0x144, | |
1439 | ThrustVectoring = 0x148, | |
1440 | YawMult = 0x14C, | |
1441 | YawStabilise = 0x150, | |
1442 | SideSlipMult = 0x154, | |
1443 | RollMult = 0x158, | |
1444 | RollStabilise = 0x15C, | |
1445 | PitchMult = 0x160, | |
1446 | PitchStabilise = 0x164, | |
1447 | FormLiftMult = 0x168, | |
1448 | AttackLiftMult = 0x16C, | |
1449 | AttackDiveMult = 0x170, | |
1450 | GearDownDragV = 0x174, | |
1451 | GearDownLiftMult = 0x178, | |
1452 | WindMult = 0x17C, | |
1453 | MoveRes = 0x180, | |
1454 | vecTurnRes1 = 0x18C, | |
1455 | vecTurnRes2 = 0x190, | |
1456 | vecTurnRes3 = 0x194, | |
1457 | vecSpeedRes1 = 0x19C, | |
1458 | vecSpeedRes2 = 0x1A0, | |
1459 | vecSpeedRes3 = 0x1A4, | |
1460 | GearDoorFrontOpen = 0x1AC, | |
1461 | GearDoorRearOpen = 0x1B0, | |
1462 | GearDoorRearOpen2 = 0x1B4, | |
1463 | GearDoorRearMOpen = 0x1B8, | |
1464 | TurublenceMagMax = 0x1BC, | |
1465 | TurublenceForceMulti = 0x1C0, | |
1466 | TurubRollTorqueMulti = 0x1C4, | |
1467 | TurubPitchTorqueMulti = 0x1C8, | |
1468 | BodyDamageMult = 0x1CC, | |
1469 | InputSensitivity = 0x1D0, | |
1470 | OnGroundSpeedPeak = 0x1D4, | |
1471 | OnGroundSpeedCap = 0x1D8, | |
1472 | EngineOffGlideMulti = 0x1DC, | |
1473 | ||
1474 | //Bikes | |
1475 | LeanFwdCOMMult = 0x140, | |
1476 | LeanFwdForceMult = 0x144, | |
1477 | LeanBakCOMMult = 0x148, | |
1478 | LeanBakForceMult = 0x14C, | |
1479 | DesLeanReturnFrac = 0x15C, | |
1480 | StickLeanMult = 0x160, | |
1481 | BrakingStabilityMult = 0x164, | |
1482 | InAirSteerMult = 0x168, | |
1483 | WheelieBalancePoint = 0x16C, | |
1484 | StoppieBalancePoint = 0x170, | |
1485 | WheelieSteerMult = 0x174, | |
1486 | RearBalanceMult = 0x178, | |
1487 | FrontBalanceMult = 0x17C, | |
1488 | BikeFrictionMult = 0x180, | |
1489 | BikeWheelFrictionMult = 0x184, | |
1490 | BikeLeanAngle = 0x188, | |
1491 | BikeSteerAngle = 0x18C, | |
1492 | JumpForce = 0x190, | |
1493 | }; | |
1494 | ||
1495 | addIntOption("BMX Jump Editor", &int_VehicleOptions[37], 0, 100, true); | |
1496 | addIntOption("BMX Lean Forward Multiplier", &int_VehicleOptions[38], 0, 100, true); | |
1497 | addIntOption("BMX Lean Backward Multiplier", &int_VehicleOptions[39], 0, 100, true); | |
1498 | addIntOption("BMX Lean Forward Force", &int_VehicleOptions[40], 0, 100, true); | |
1499 | addIntOption("BMX Lean Backward Force", &int_VehicleOptions[41], 0, 100, true); | |
1500 | addIntOption("BMX In-Air Steer Multiplier", &int_VehicleOptions[42], 0, 100, true); | |
1501 | ||
1502 | ||
1503 | case 1: SET_HANDLING_MOD(189, JumpForce, int_VehicleOptions[37]); break; | |
1504 | case 2: SET_HANDLING_MOD(189, LeanFwdCOMMult, int_VehicleOptions[38]); break; | |
1505 | case 3: SET_HANDLING_MOD(189, LeanBakCOMMult, int_VehicleOptions[39]); break; | |
1506 | case 4: SET_HANDLING_MOD(189, LeanFwdForceMult, int_VehicleOptions[40]); break; | |
1507 | case 5: SET_HANDLING_MOD(189, LeanBakForceMult, int_VehicleOptions[41]); break; | |
1508 | case 6: SET_HANDLING_MOD(189, InAirSteerMult, int_VehicleOptions[42]); break; | |
1509 | ||
1510 | //PLAYER HEIGTH | |
1511 | ||
1512 | addFloatSwap("Player Height", &variavelFloatUsada, -10, 10, boolUsada, 0.1); | |
1513 | ||
1514 | ||
1515 | int GPMA_stub[2] = { 0xA552E0, 0x1C85330 }; | |
1516 | int(*get_ent_address)(int peid) = (int(*)(int))&GPMA_stub; | |
1517 | ||
1518 | //loop | |
1519 | if (boolUsada) { | |
1520 | if (ENTITY::DOES_ENTITY_EXIST(PLAYER::PLAYER_PED_ID())){ | |
1521 | *(float*)(*(int*)(get_ent_address(PLAYER::PLAYER_PED_ID()) + 48) + 40) = variavelFloatUsada; | |
1522 | } | |
1523 | } | |
1524 | ||
1525 | ||
1526 | ||
1527 | ||
1528 | ||
1529 | ||
1530 | ||
1531 | ||
1532 | ||
1533 | ||
1534 | ||
1535 | ||
1536 | ||
1537 | ||
1538 | ||
1539 | //static BOOL GET_PED_LAST_WEAPON_IMPACT_COORD(Ped ped, Vector3* coords) { return invoke<BOOL>(0x9B266079, ped, coords); } // 0x9B266079 | |
1540 | ||
1541 | ||
1542 | static BOOL(*GET_PED_LAST_WEAPON_IMPACT_COORD)(Ped ped, int coordsfreeMem) = (BOOL(*)(Ped, int))&__GET_PED_LAST_WEAPON_IMPACT_COORD_t; | |
1543 | ||
1544 | static BOOL GET_PED_LAST_WEAPON_IMPACT_COORD_MODIFYED(Ped ped, float coords[4]) { | |
1545 | Vector3 in; | |
1546 | ResetArgs(); | |
1547 | PushArg(ped); | |
1548 | PushArg(&in); | |
1549 | CallHash(0x9B266079, NativeArg); | |
1550 | return GetResult<BOOL>(); | |
1551 | std::copy(GetDataResult<float*>(0), GetDataResult<float*>(0) + 4, coords); | |
1552 | } // 0x9B266079 | |
1553 | ||
1554 | template <typename R> | |
1555 | R GetDataResult(uint8_t index) | |
1556 | { | |
1557 | R* Result; | |
1558 | Result = (R*)NativeArg + 0x10 * (index + 4); //0x10030000 | |
1559 | return *(R*)Result; | |
1560 | } | |
1561 | ||
1562 | static BOOL GET_PED_LAST_WEAPON_IMPACT_COORD_MODIFYED(Ped ped, Vector3 &coords) { | |
1563 | float tmp[100]; ResetArgs(); PushArg(ped); PushArg(0x10030000); | |
1564 | for (int i = 0; i < 3; i++) | |
1565 | tmp[i] = *(float*)(0x10030000 + (i * 0x04)); | |
1566 | Vector3 vOut = FloatToVector(tmp[0], tmp[1], tmp[2]); | |
1567 | coords = vOut; | |
1568 | CallHash(0x9B266079, NativeArg); | |
1569 | return GetResult<BOOL>(); | |
1570 | ||
1571 | } // 0x9B266079 | |
1572 | ||
1573 | static BOOL(*GET_PED_LAST_WEAPON_IMPACT_COORD)(Ped ped, int coordsfreeMem) = (BOOL(*)(Ped, int))&__GET_PED_LAST_WEAPON_IMPACT_COORD_t; | |
1574 | ||
1575 | ||
1576 | int hitsomething = 0, entityHandle = 0; Vector3 endCoords, surfaceNormal; | |
1577 | int getRaycastHandle(int type) | |
1578 | { | |
1579 | /*Vector3 camrot = GET_GAMEPLAY_CAM_ROT(2); | |
1580 | Vector3 campos = GET_GAMEPLAY_CAM_COORD(); | |
1581 | Vector3 selfvec = GET_ENTITY_FORWARD_VECTOR(PLAYER_PED_ID()); | |
1582 | Vector3 multiplied = { RotationToDirection(camrot).x * 1000.0f, RotationToDirection(camrot).y * 1000.0f, RotationToDirection(camrot).z * 1000.0f }; | |
1583 | int ray = _CAST_RAY_POINT_TO_POINT(campos.x + selfvec.x, campos.y + selfvec.y, campos.z + selfvec.z, campos.x + multiplied.x * 5000, campos.y + multiplied.y * 5000, campos.z + multiplied.z * 5000, type, 0, 7); | |
1584 | return ray;*/ | |
1585 | Vector3 camPos = GET_GAMEPLAY_CAM_COORD(); | |
1586 | Vector3 camRot = GET_GAMEPLAY_CAM_ROT(2); | |
1587 | float retz = camRot.z * 0.0174532924F; | |
1588 | float retx = camRot.x * 0.0174532924F; | |
1589 | float absx = ABSF(COS(retx)); | |
1590 | Vector3 camStuff = { SIN(retz) * absx * -1, COS(retz) * absx, SIN(retx) }; | |
1591 | return _CAST_RAY_POINT_TO_POINT(camPos.x, camPos.y, camPos.z, camPos.x + camStuff.x * 1000, camPos.y + camStuff.y * 1000, camPos.z + camStuff.z * 1000, type, 0, 7); | |
1592 | } | |
1593 | ||
1594 | unsigned int *getGlobalPtr(int globalId) | |
1595 | { | |
1596 | unsigned int **arr = (unsigned int **)(0x1E70370); | |
1597 | return &arr[(globalId >> 18) & 0x3F][globalId & 0x3FFFF]; | |
1598 | ||
1599 | //return (unsigned int *)(*(DWORD *)(0x000000 + 8i64 * ((globalId >> 18) & 0x3F) + moduleHandle) //reversed | |
1600 | // + 8i64 * (globalId & 0x3FFFF)); | |
1601 | } | |
1602 | ||
1603 | ||
1604 | //SetGlobal(1325955, 1662, 1337); | |
1605 | ||
1606 | *getGlobalPtr(OFF_THE_RADAR_TIME) = 1337; //DEADC0DE time | |
1607 | ||
1608 | //262145 wanted lvl | |
1609 | //SetGlobal(2394218, 55, GET_NETWORK_TIME()); | |
1610 | ||
1611 | //SetGlobal(2387908, 169, 1); | |
1612 | //SetGlobal(2387908 + 223, 169, 1); | |
1613 | //SetGlobal(2387908[PLAYER_ID() * 223], 169, 1); | |
1614 | ||
1615 | //SetGlobal(2390201, 171, 1); | |
1616 | //SetGlobal(2390201 + 223, 171, 1); | |
1617 | //SetGlobal2390201[PLAYER_ID() * 223], 171, 1); | |
1618 | ||
1619 | /*SetGlobal(2387908, 169, 1); | |
1620 | ||
1621 | SetGlobal(2390201, 171, 1); | |
1622 | ||
1623 | SetGlobal(2387908 + 223, 169, 1); | |
1624 | ||
1625 | SetGlobal(2387908 + PLAYER_ID() * 223, 169, 1); | |
1626 | ||
1627 | SetGlobal(2387908 + PLAYER_ID() + 223, 169, 1); | |
1628 | ||
1629 | SetGlobal(2387908 + PLAYER_ID(), 169, 1);*/ | |
1630 | ||
1631 | ||
1632 | void btnOffRadar_Click(object sender, EventArgs e) | |
1633 | { | |
1634 | if (ScriptGlobals.Read(2390201 + (uint)(NativeFuncs.player_id() * 223) + 170) == 0) | |
1635 | { | |
1636 | ScriptGlobals.Write(2390201 + (uint)(NativeFuncs.player_id() * 223) + 170, 1); | |
1637 | ScriptGlobals.Write(2394218 + 55, 2147483647); | |
1638 | } | |
1639 | else | |
1640 | ScriptGlobals.Write(2390201 + (uint)(NativeFuncs.player_id() * 223) + 170, 0); | |
1641 | } | |
1642 | ||
1643 | ||
1644 | if (featureTest) | |
1645 | { | |
1646 | Vector3 closestcoords = GET_ENTITY_COORDS(PLAYER_PED_ID(), FALSE); | |
1647 | getNearEntities(PLAYER_PED_ID(), 1, 1, 7, 2, NULL); | |
1648 | ||
1649 | for (int i = 0; 0 < sizeof(); i++) | |
1650 | { | |
1651 | } | |
1652 | EntitiesNearBy[i] = GET_ENTITY_ATTACHED_TO(PLAYER_PED_ID()); | |
1653 | EntitiesNearBy[i] = GET_CLOSEST_VEHICLE(closestcoords.x, closestcoords.y, closestcoords.z, 10.0f, 0, CARS_N_MOTOCYCLES_2); | |
1654 | EntitiesNearBy[i] = GET_RANDOM_PED_AT_COORD(closestcoords.x, closestcoords.y, closestcoords.z, 10.0f, 10.0f, 10.0, -1); | |
1655 | if (DOES_ENTITY_EXIST(EntitiesNearBy[i])) | |
1656 | { | |
1657 | if (!NETWORK_HAS_CONTROL_OF_ENTITY(EntitiesNearBy[i])) | |
1658 | NETWORK_REQUEST_CONTROL_OF_ENTITY(EntitiesNearBy[i]); | |
1659 | else | |
1660 | { | |
1661 | DETACH_ENTITY(EntitiesNearBy[i], 1, 1); | |
1662 | SET_ENTITY_AS_MISSION_ENTITY(EntitiesNearBy[i], 1, 1); | |
1663 | DELETE_ENTITY(&EntitiesNearBy[i]); | |
1664 | } | |
1665 | } | |
1666 | ||
1667 | ||
1668 | ||
1669 | int funcaddr = 0x139ECB0;//0x13321EC; | |
1670 | ((void(*)(int, unsigned int, int, int, int, int, int, int, int))&funcaddr)(0x40022280, 0x1004004C, 1, 0, 0, 0, 0x540, 0x4ec, 0x59); | |
1671 | ||
1672 | ||
1673 | GetClosestVehicle | |
1674 | __int64 __fastcall sub_4549C8(__int64 a1, float a2, unsigned int a3, unsigned int a4) | |
1675 | { | |
1676 | signed int v4; // ebx@1 | |
1677 | unsigned int v5; // er14@1 | |
1678 | __int64 v6; // rdi@1 | |
1679 | signed int v7; // ebp@1 | |
1680 | float v8; // xmm6_4@1 | |
1681 | int v9; // eax@2 | |
1682 | unsigned int v10; // xmm1_4@3 | |
1683 | unsigned int v11; // xmm2_4@3 | |
1684 | float v12; // xmm6_4@3 | |
1685 | __int64 v13; // rcx@3 | |
1686 | unsigned int v14; // edi@3 | |
1687 | __int64 v15; // r9@4 | |
1688 | int v16; // eax@5 | |
1689 | __int64 v17; // rax@6 | |
1690 | __int64 v18; // rsi@9 | |
1691 | __m128 v19; // xmm2@12 | |
1692 | __m128i v20; // xmm2@12 | |
1693 | float v21; // xmm7_4@12 | |
1694 | int v22; // eax@13 | |
1695 | int v24; // [sp+20h] [bp-58h]@2 | |
1696 | __m128 v25; // [sp+30h] [bp-48h]@3 | |
1697 | int v26; // [sp+90h] [bp+18h]@1 | |
1698 | ||
1699 | v4 = 0; | |
1700 | v5 = a4; | |
1701 | v6 = a1; | |
1702 | v7 = 0; | |
1703 | v8 = a2; | |
1704 | v26 = (v26 | 0xFFFFFFF) & 0xFFFFFFF; | |
1705 | if ( !a3 | |
1706 | || (v24 = 0xFFFF, | |
1707 | sub_14079692C(a3, &v24), | |
1708 | LOWORD(v26) = v24, | |
1709 | v9 = v26 | 0xFFF0000, | |
1710 | _bittestandreset((unsigned int *)&v9, 0x1Cu), | |
1711 | v26 = v9, | |
1712 | (unsigned __int16)v9 != 0xFFFF) ) | |
1713 | { | |
1714 | v10 = *(_DWORD *)(v6 + 8); | |
1715 | v11 = *(_DWORD *)(v6 + 16); | |
1716 | v12 = v8 * v8; | |
1717 | v13 = *(_QWORD *)VehiclePool; | |
1718 | v25.m128_i32[0] = *(_DWORD *)v6; | |
1719 | *(unsigned __int64 *)((char *)&v25.m128_u64[0] + 4) = __PAIR__(v11, v10); | |
1720 | v14 = *(_DWORD *)(v13 + 8); | |
1721 | if ( v14 ) | |
1722 | { | |
1723 | do | |
1724 | { | |
1725 | --v14; | |
1726 | v15 = *(_QWORD *)VehiclePool; | |
1727 | if ( (signed int)v14 < *(_DWORD *)(*(_QWORD *)VehiclePool + 8i64) | |
1728 | && (v16 = *(_DWORD *)(*(_QWORD *)(v15 + 48) + 4 * ((unsigned __int64)v14 >> 5)), | |
1729 | _bittest((const unsigned int *)&v16, v14 & 0x1F)) ) | |
1730 | v17 = *(_QWORD *)v15 + v14 * *(_QWORD *)(v15 + 24); | |
1731 | else | |
1732 | v17 = 0i64; | |
1733 | if ( v17 ) | |
1734 | v18 = *(_QWORD *)v17; | |
1735 | else | |
1736 | v18 = 0i64; | |
1737 | if ( v18 ) | |
1738 | { | |
1739 | v19 = _mm_sub_ps(*(__m128 *)(v18 + 144), v25); | |
1740 | v20 = (__m128i)_mm_mul_ps(v19, v19); | |
1741 | LODWORD(v21) = (unsigned __int128)_mm_add_ps( | |
1742 | _mm_add_ps( | |
1743 | (__m128)_mm_shuffle_epi32(v20, 0), | |
1744 | (__m128)_mm_shuffle_epi32(v20, 85)), | |
1745 | (__m128)_mm_shuffle_epi32(v20, -86)); | |
1746 | if ( v21 < v12 ) | |
1747 | { | |
1748 | v22 = sub_140796DD8(&v26); | |
1749 | if ( (unsigned __int8)sub_13FF39C34(v18, (unsigned int)v22, v5) ) | |
1750 | { | |
1751 | v7 = sub_13FC7F104(v18); | |
1752 | v12 = v21; | |
1753 | } | |
1754 | } | |
1755 | } | |
1756 | } | |
1757 | while ( v14 ); | |
1758 | if ( v7 ) | |
1759 | sub_13FC728D0(v7); | |
1760 | } | |
1761 | v4 = v7; | |
1762 | } | |
1763 | return (unsigned int)v4; | |
1764 | } | |
1765 | __int64 __fastcall get_entity_type(int a1) | |
1766 | { | |
1767 | __int64 result; // rax@1 | |
1768 | signed int v2; // ecx@1 | |
1769 | char v3; | |
1770 | ||
1771 | result = GetAddressOfEntity(a1); | |
1772 | v2 = 0; | |
1773 | if (result) | |
1774 | { | |
1775 | v3 = *(_BYTE *)(result + 40); | |
1776 | if (v3 == 4) | |
1777 | { | |
1778 | result = 1i64; | |
1779 | } | |
1780 | else if (v3 == 3) | |
1781 | { | |
1782 | result = 2i64; | |
1783 | } | |
1784 | else | |
1785 | { | |
1786 | if (v3 == 5) | |
1787 | v2 = 3; | |
1788 | result = (unsigned int)v2; | |
1789 | } | |
1790 | } | |
1791 | return result; | |
1792 | } | |
1793 | ||
1794 | char __fastcall is_model_a_vehicle(__int64 a1) | |
1795 | { | |
1796 | char v1; // bl@1 | |
1797 | __int64 v2; // rax@1 | |
1798 | int v4; // [sp+38h] [bp+10h]@1 | |
1799 | ||
1800 | v1 = 0; | |
1801 | v4 = 0xFFFF; | |
1802 | LODWORD(v2) = sub_7FF601C276A4(a1, &v4); | |
1803 | if (v2) | |
1804 | { | |
1805 | v1 = 0; | |
1806 | if ((*(_BYTE *)(v2 + 157) & 0x1F) == 5) | |
1807 | v1 = 1; | |
1808 | } | |
1809 | return v1; | |
1810 | } | |
1811 | ||
1812 | int64 PLAYER_ID() | |
1813 | { | |
1814 | int64 v0; // rax@2 | |
1815 | __int64 result; // rax@2 | |
1816 | ||
1817 | if (byte_7FF602DDAB4E) | |
1818 | { | |
1819 | LODWORD(v0) = sub_7FF60170275C(off_7FF602370AA0); | |
1820 | result = *(_BYTE *)(v0 + 45); | |
1821 | } | |
1822 | else | |
1823 | { | |
1824 | result = 0i64; | |
1825 | } | |
1826 | return result; | |
1827 | } | |
1828 | ||
1829 | ||
1830 | ||
1831 | // GTA5_dump_Static_1604.1_1.46 | |
1832 | int __fastcall sub_14113F31C(__int64 a1, __int64 a2) | |
1833 | { | |
1834 | __int64 v2; // rdi@1 | |
1835 | char v3; // bl@1 | |
1836 | __int64 v4; // rax@1 | |
1837 | __int64 v5; // r8@1 | |
1838 | __int64 v6; // r9@1 | |
1839 | __int64 v7; // rax@1 | |
1840 | ||
1841 | v2 = a1; | |
1842 | v3 = a2; | |
1843 | LOBYTE(a2) = 1; | |
1844 | sub_1416036D8(qword_14286B510, a2); | |
1845 | LODWORD(v4) = sub_141568DC4(qword_142DF38C0); | |
1846 | v6 = v4; | |
1847 | v7 = 0i64; | |
1848 | if ( v6 ) | |
1849 | { | |
1850 | LOBYTE(v5) = v3; | |
1851 | LODWORD(v7) = sub_141128C60(v6, *(_WORD *)(*(_QWORD *)(v2 + 208) + 10i64), v5); | |
1852 | } | |
1853 | return sub_141613B54(qword_14286B510, v7); | |
1854 | } | |
1855 | ||
1856 | ||
1857 | void __fastcall sub_14113F31C(__int64 a1, __int64 a2) | |
1858 | { | |
1859 | __int64 v2; // rdi@1 | |
1860 | char v3; // bl@1 | |
1861 | _DWORD *v4; // r9@1 | |
1862 | __int64 v5; // rax@1 | |
1863 | ||
1864 | v2 = a1; | |
1865 | v3 = a2; | |
1866 | LOBYTE(a2) = 1; | |
1867 | sub_1416036D8(qword_14286B510, a2); | |
1868 | v4 = sub_141568DC4(qword_142DF38C0); | |
1869 | v5 = 0i64; | |
1870 | if ( v4 ) | |
1871 | v5 = sub_141128C60((__int64)v4, *(_WORD *)(*(_QWORD *)(v2 + 208) + 10i64), v3); | |
1872 | sub_141613B54(qword_14286B510, v5); | |
1873 | } | |
1874 | ||
1875 | ||
1876 | ||
1877 | ||
1878 | ||
1879 | template<typename T> | |
1880 | T Invoke(unsigned int a_uiNativeHash, unsigned int a_uiArgCount, ...) | |
1881 | { | |
1882 | T* Result; | |
1883 | ||
1884 | va_list l_VaList; | |
1885 | unsigned int l_uiIndex; | |
1886 | unsigned int l_uiReadCount = 0; | |
1887 | ||
1888 | va_start(l_VaList, a_uiArgCount); | |
1889 | for (l_uiIndex = 0; l_uiIndex < 16; l_uiIndex++) | |
1890 | { | |
1891 | if (l_uiIndex < a_uiArgCount) | |
1892 | g_pArgs[l_uiIndex] = va_arg(l_VaList, unsigned int); | |
1893 | else | |
1894 | g_pArgs[l_uiIndex] = 0; | |
1895 | } | |
1896 | va_end(l_VaList); | |
1897 | ||
1898 | //DbgPrint("Calling: 0x%08X\n", a_uiNativeHash); | |
1899 | ||
1900 | if (a_uiNativeHash != PLAYER_ID_HASH) | |
1901 | ((void(*)(struct NativeArg*))GetNativeFunction(a_uiNativeHash))(&g_NativeArg); | |
1902 | else | |
1903 | Original_Player_ID(&g_NativeArg); | |
1904 | ||
1905 | Result = (T*)&g_pArgs[l_uiReadCount]; | |
1906 | ||
1907 | l_uiReadCount += sizeof(T); | |
1908 | if ((sizeof(T) % 4) != 0) | |
1909 | l_uiReadCount += 4 - (sizeof(T) % 4); | |
1910 | ||
1911 | return *(T*)Result; | |
1912 | } | |
1913 | ||
1914 | void draw_menu(int a_iPosition, int a_iMenuItemCount, char ** a_pcMenu, char* a_pcTitle) | |
1915 | { | |
1916 | GRAPHICS::DRAW_RECT(0.90f, 0.2f, 0.15f, 0.05f, 0xFF, 0, 0, 0x90); | |
1917 | ||
1918 | GRAPHICS::DRAW_RECT(0.90f, 0.225f + ((0.035f* (a_iMenuItemCount > 16 ? 16 : a_iMenuItemCount))/2), 0.15f, 0.035f* (a_iMenuItemCount > 16 ? 16 : a_iMenuItemCount), 0xFF, 0, 0, 0x30); | |
1919 | //GRAPHICS::DRAW_RECT(0.90f, 0.50f, 0.15f, 0.55f, 0xFF, 0, 0, 0x30); | |
1920 | PrintToScreen(a_pcTitle, 0.90f, 0.18f, 255, 255, 255, 255, 0.8f, 0.8f, 1, 1); | |
1921 | ||
1922 | if (a_iMenuItemCount < 16) | |
1923 | { | |
1924 | GRAPHICS::DRAW_RECT(0.90f, 0.2425f + (float).035f*(a_iPosition), 0.15f, 0.035f, 0xFF, 0, 0, 0x80); | |
1925 | for (int l_iIndex = 0; l_iIndex < a_iMenuItemCount; l_iIndex++) | |
1926 | { | |
1927 | PrintToScreen(a_pcMenu[l_iIndex], 0.90f, (0.2225f + (l_iIndex * .035f)), 255, 255, 255, 255, 0.4f, 0.4f, 1, 0); | |
1928 | } | |
1929 | } | |
1930 | else | |
1931 | { | |
1932 | if (a_iPosition < 7) | |
1933 | { | |
1934 | GRAPHICS::DRAW_RECT(0.90f, 0.2425f + (float).035f*(a_iPosition), 0.15f, 0.035f, 0xFF, 0, 0, 0x80); | |
1935 | for (int l_iIndex = 0; l_iIndex < 16; l_iIndex++) | |
1936 | { | |
1937 | PrintToScreen(a_pcMenu[l_iIndex], 0.90f, (0.2225f + (l_iIndex * .035f)), 255, 255, 255, 255, 0.4f, 0.4f, 1, 0); | |
1938 | } | |
1939 | } | |
1940 | else | |
1941 | { | |
1942 | if (a_iPosition < a_iMenuItemCount - 8) | |
1943 | { | |
1944 | GRAPHICS::DRAW_RECT(0.90f, 0.2425f + (float).035f*(7), 0.15f, 0.035f, 0xFF, 0, 0, 0x80); | |
1945 | int l_iDrawIndex = 0; | |
1946 | for (int l_iIndex = a_iPosition - 7; l_iIndex < a_iPosition + 9; l_iIndex++) | |
1947 | { | |
1948 | PrintToScreen(a_pcMenu[l_iIndex], 0.90f, (0.2225f + (l_iDrawIndex* .035f)), 255, 255, 255, 255, 0.4f, 0.4f, 1, 0); | |
1949 | l_iDrawIndex++; | |
1950 | } | |
1951 | } | |
1952 | else | |
1953 | { | |
1954 | GRAPHICS::DRAW_RECT(0.90f, 0.2425f + (float).035f*(16 - (a_iMenuItemCount - a_iPosition)), 0.15f, 0.035f, 0xFF, 0, 0, 0x80); | |
1955 | int l_iDrawIndex = 0; | |
1956 | for (int l_iIndex = a_iMenuItemCount - 16; l_iIndex < a_iMenuItemCount; l_iIndex++) | |
1957 | { | |
1958 | PrintToScreen(a_pcMenu[l_iIndex], 0.90f, (0.2225f + (l_iDrawIndex* .035f)), 255, 255, 255, 255, 0.4f, 0.4f, 1, 0); | |
1959 | l_iDrawIndex++; | |
1960 | } | |
1961 | } | |
1962 | } | |
1963 | } | |
1964 | } | |
1965 | ||
1966 | void PrintToScreen(char *str, float x, float y, int r, int g, int b, int a, float scaleX, float scaleY, int centerText, int font) | |
1967 | { | |
1968 | UI::SET_TEXT_FONT(font); | |
1969 | UI::SET_TEXT_COLOUR(r, g, b, a); | |
1970 | UI::SET_TEXT_SCALE(scaleX, scaleY); | |
1971 | UI::SET_TEXT_OUTLINE(); | |
1972 | UI::SET_TEXT_CENTRE(centerText); | |
1973 | UI::_SET_TEXT_ENTRY("STRING"); | |
1974 | UI::_ADD_TEXT_COMPONENT_STRING(str); | |
1975 | UI::_DRAW_TEXT(x, y); | |
1976 | } | |
1977 | ||
1978 | void HeistHUD(char* text) | |
1979 | { | |
1980 | ||
1981 | } | |
1982 | void InfoMessage(char* text) | |
1983 | { | |
1984 | ||
1985 | } | |
1986 | ||
1987 | void MPMESSAGE(char* msg, char* desc) | |
1988 | { | |
1989 | featureBigMPMessge = true; | |
1990 | BigMPMessagemgs = msg; | |
1991 | BigMPMessagedesc = desc; | |
1992 | PLAY_SOUND_FRONTEND(-1, "RACE_PLACED", "HUD_AWARDS"); | |
1993 | } | |
1994 | ||
1995 | if (featureBigMPMessge) | |
1996 | { | |
1997 | if (!HAS_SCALEFORM_MOVIE_LOADED(SFBigMPMessage)) | |
1998 | SFBigMPMessage = REQUEST_SCALEFORM_MOVIE("MP_BIG_MESSAGE_FREEMODE"); | |
1999 | else | |
2000 | { | |
2001 | if (GET_GAME_TIMER() > featureTimeMPMessage) { | |
2002 | featureTimeMPMessage = GET_GAME_TIMER() + 20; | |
2003 | _PUSH_SCALEFORM_MOVIE_FUNCTION(SFBigMPMessage, "SHOW_SHARD_CREW_RANKUP_MP_MESSAGE"); //SHOW_SHARD_CENTERED_TOP_MP_MESSAGE | |
2004 | set_text_component(BigMPMessagemgs); | |
2005 | set_text_component(BigMPMessagedesc); | |
2006 | _POP_SCALEFORM_MOVIE_FUNCTION_VOID(); | |
2007 | DRAW_SCALEFORM_MOVIE_FULLSCREEN(SFBigMPMessage, 255, 255, 255, 255); | |
2008 | if (_BigMPMessagetime == 40) { | |
2009 | _PUSH_SCALEFORM_MOVIE_FUNCTION(SFBigMPMessage, "TRANSITION_UP"); | |
2010 | _POP_SCALEFORM_MOVIE_FUNCTION_VOID(); | |
2011 | SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED(&SFBigMPMessage); | |
2012 | featureBigMPMessge = false; | |
2013 | _BigMPMessagetime = 0; | |
2014 | } | |
2015 | else | |
2016 | _BigMPMessagetime++; | |
2017 | } | |
2018 | } | |
2019 | } | |
2020 | ||
2021 | case 5: MPMESSAGE("ROULETTE", "coding like a rockstar"); break; | |
2022 | ||
2023 | ||
2024 | ||
2025 | bool _scaleformFadeTimerEnabled = 0; | |
2026 | int SFBMPM; | |
2027 | DWORD _scaleformFadeTimerWaiter = 0; | |
2028 | if (_scaleformFadeTimerEnabled) | |
2029 | { | |
2030 | if (!HAS_SCALEFORM_MOVIE_LOADED(SFBMPM)) | |
2031 | SFBMPM = REQUEST_SCALEFORM_MOVIE("MP_BIG_MESSAGE_FREEMODE"); | |
2032 | else | |
2033 | { | |
2034 | ||
2035 | _scaleformFadeTimerWaiter = GET_GAME_TIMER() + 2000; | |
2036 | _PUSH_SCALEFORM_MOVIE_FUNCTION(SFBMPM, "SHOW_SHARD_CREW_RANKUP_MP_MESSAGE" /*titleStr, msgStr, rankNumber, emblemTXD, emblemTXN, alpha*/); //SHOW_SHARD_CENTERED_TOP_MP_MESSAGE | |
2037 | _BEGIN_TEXT_COMPONENT("STRING"); | |
2038 | ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("TheRouletteBoi"); | |
2039 | _END_TEXT_COMPONENT(); | |
2040 | _BEGIN_TEXT_COMPONENT("STRING"); | |
2041 | ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("ROULETTE"); | |
2042 | _END_TEXT_COMPONENT(); | |
2043 | _POP_SCALEFORM_MOVIE_FUNCTION_VOID(); | |
2044 | DRAW_SCALEFORM_MOVIE_FULLSCREEN(SFBMPM, 255, 255, 255, 255); | |
2045 | if (GET_GAME_TIMER() > _scaleformFadeTimerWaiter) | |
2046 | { | |
2047 | _PUSH_SCALEFORM_MOVIE_FUNCTION(SFBMPM, "TRANSITION_UP"); | |
2048 | _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(0.2000000/*duration*/); | |
2049 | _POP_SCALEFORM_MOVIE_FUNCTION_VOID(); | |
2050 | SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED(&SFBMPM); | |
2051 | _scaleformFadeTimerEnabled = false; | |
2052 | } | |
2053 | } | |
2054 | } | |
2055 | ||
2056 | ||
2057 | ||
2058 | case 11: SET_WARNING_MESSAGE("Panic Mode is enabled.", 3, "Press square and triange to disable Panic Mode.", false, -1, 0, 0, true); | |
2059 | //Panic Mode is enabled. | |
2060 | //While this is enabled, most malicous action taken against you by a malicious cheater, such as object attachment and cash attempts, will fail to execute. Please note: this does not prevent a malicous cheater from framing you. For security reasons, you wil not be able to move, visually witness any activity, or utilize the Pause Menu while this mode is active. | |
2061 | //Press square and triange to disable Panic Mode. | |
2062 | //http://steamcommunity.com/id/clarexobearrx3/screenshots/ | |
2063 | break; | |
2064 | ||
2065 | ||
2066 | Vector3 rot_to_direction(Vector3* rot) | |
2067 | { | |
2068 | float radiansZ = rot->z * 0.0174532924f; | |
2069 | float radiansX = rot->x * 0.0174532924f; | |
2070 | float num = ABSF((float)COS((double)radiansX)); | |
2071 | Vector3 dir; | |
2072 | dir.x = (float)((double)((float)(-(float)SIN((double)radiansZ))) * (double)num); | |
2073 | dir.y = (float)((double)((float)COS((double)radiansZ)) * (double)num); | |
2074 | dir.z = (float)SIN((double)radiansX); | |
2075 | return dir; | |
2076 | } | |
2077 | ||
2078 | Vector3 add(Vector3* vectorA, Vector3* vectorB) | |
2079 | { | |
2080 | Vector3 result; | |
2081 | result.x = vectorA->x; | |
2082 | result.y = vectorA->y; | |
2083 | result.z = vectorA->z; | |
2084 | ||
2085 | result.x += vectorB->x; | |
2086 | result.y += vectorB->y; | |
2087 | result.z += vectorB->z; | |
2088 | ||
2089 | return result; | |
2090 | } | |
2091 | Vector3 multiply(Vector3* vector, float x) | |
2092 | { | |
2093 | Vector3 result; | |
2094 | result.x = vector->x; | |
2095 | result.y = vector->y; | |
2096 | result.z = vector->z; | |
2097 | ||
2098 | result.x *= x; | |
2099 | result.y *= x; | |
2100 | result.z *= x; | |
2101 | ||
2102 | return result; | |
2103 | } | |
2104 | float get_distance(Vector3* pointA, Vector3* pointB) | |
2105 | { | |
2106 | float a_x = pointA->x; | |
2107 | float a_y = pointA->y; | |
2108 | float a_z = pointA->z; | |
2109 | ||
2110 | float b_x = pointB->x; | |
2111 | float b_y = pointB->y; | |
2112 | float b_z = pointB->z; | |
2113 | ||
2114 | double x_ba = (double)(b_x - a_x); | |
2115 | double y_ba = (double)(b_y - a_y); | |
2116 | double z_ba = (double)(b_z - a_z); | |
2117 | ||
2118 | double y_2 = y_ba * y_ba; | |
2119 | double x_2 = x_ba * x_ba; | |
2120 | double sum_2 = y_2 + x_2; | |
2121 | ||
2122 | return (float)sqrt(sum_2 + z_ba); | |
2123 | } | |
2124 | ||
2125 | float get_vector_length(Vector3* vector) | |
2126 | { | |
2127 | double x = (double)vector->x; | |
2128 | double y = (double)vector->y; | |
2129 | double z = (double)vector->z; | |
2130 | ||
2131 | return (float)sqrt(x * x + y * y + z * z); | |
2132 | } | |
2133 | ||
2134 | ||
2135 | ||
2136 | ||
2137 | void UpdateBusySpinner() | |
2138 | { | |
2139 | /*func_83(P); | |
2140 | if (_0xF6015178("SHOW_WARNING_MESSAGE")) | |
2141 | { | |
2142 | _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_BOOL(uParam0); | |
2143 | _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(uParam1); | |
2144 | _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(uParam2); | |
2145 | ||
2146 | _BEGIN_TEXT_COMPONENT("STRING"); | |
2147 | ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("Loading, Please wait."); | |
2148 | _END_TEXT_COMPONENT(); | |
2149 | ||
2150 | ||
2151 | _BEGIN_TEXT_COMPONENT("STRING"); | |
2152 | ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("LOADING DONE!"); | |
2153 | _END_TEXT_COMPONENT(); | |
2154 | ||
2155 | ||
2156 | _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(uParam5); | |
2157 | _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_STRING(uParam6); | |
2158 | _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_STRING(uParam7); | |
2159 | _POP_SCALEFORM_MOVIE_FUNCTION_VOID(); | |
2160 | }*/ | |
2161 | ||
2162 | if (!HAS_SCALEFORM_MOVIE_LOADED(SFMBS)) | |
2163 | SFMBS = REQUEST_SCALEFORM_MOVIE("busy_spinner"); | |
2164 | else | |
2165 | { | |
2166 | _PUSH_SCALEFORM_MOVIE_FUNCTION(SFMBS, "CLEAR_ALL"); | |
2167 | _POP_SCALEFORM_MOVIE_FUNCTION_VOID(); | |
2168 | _PUSH_SCALEFORM_MOVIE_FUNCTION(SFMBS, "SET_DATA_SLOT"); // CREATE_CONTAINER | |
2169 | _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(0); | |
2170 | _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(LOADING_HALF_CIRCLE_RIGHT); | |
2171 | _BEGIN_TEXT_COMPONENT("STRING"); | |
2172 | ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("Loading, Please wait."); | |
2173 | _END_TEXT_COMPONENT(); | |
2174 | _POP_SCALEFORM_MOVIE_FUNCTION_VOID(); | |
2175 | _PUSH_SCALEFORM_MOVIE_FUNCTION(SFMBS, "DRAW_INSTRUCTIONAL_BUTTONS"); | |
2176 | _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(-1); | |
2177 | _POP_SCALEFORM_MOVIE_FUNCTION_VOID(); | |
2178 | } | |
2179 | ||
2180 | ||
2181 | /*if (!HAS_SCALEFORM_MOVIE_LOADED(SFMBS)) | |
2182 | SFMBS = REQUEST_SCALEFORM_MOVIE("CUSTOM_WARNING_SCREEN"); | |
2183 | else | |
2184 | { | |
2185 | //"BANNED FOR EVER." | |
2186 | //"BITCH YOU'VE BEEN BANNED." | |
2187 | _PUSH_SCALEFORM_MOVIE_FUNCTION(SFMBS, "SHOW_CUSTOM_WARNING_SCREEN"); | |
2188 | _POP_SCALEFORM_MOVIE_FUNCTION_VOID(); | |
2189 | }*/ | |
2190 | ||
2191 | ||
2192 | DRAW_SCALEFORM_MOVIE_FULLSCREEN(SFMBS, 255, 255, 255, 255); | |
2193 | } | |
2194 | ||
2195 | ||
2196 | /* | |
2197 | WT_HEALTH //health | |
2198 | PS_SPEC_AB //special | |
2199 | LOB_CAT_9 //wanted levels | |
2200 | FMMC_NONE; //unavailable | |
2201 | FACE_HAIR; //Hair | |
2202 | FACE_BRD; //Beard | |
2203 | HLTH_REGEN2; //max health | |
2204 | LOB_CAT_9; //wanted levels | |
2205 | PIM_DHIGH0; off | |
2206 | PIM_DHIGH1; //on | |
2207 | MOD_MNU; | |
2208 | CELL_221; //enter number | |
2209 | HTX_ENTER; //enter | |
2210 | CM_SPECTATE spectate player (beta) | |
2211 | CM_SHOW_GAMER_CARD show profile | |
2212 | CMOD_MOD_22_D increase downforce. | |
2213 | cell_19 Players | |
2214 | cell_18 Map | |
2215 | cell_32 Qucik Save //for recovery menu | |
2216 | cell_35 Player List | |
2217 | CELL_MP_1001 invite to party | |
2218 | CELL_MP_1005 Player | |
2219 | CELL_MP_1007 View Profile | |
2220 | PM_MP_OPTIONS Options | |
2221 | PM_FRESES Join Friends | |
2222 | PM_CRESES Join Crew Members | |
2223 | PM_PLYRS Players | |
2224 | PM_SWAP_CHAR Swap Character | |
2225 | PM_FIND_SESS Find new Session | |
2226 | UGC_FL_UNEX The Rockstar game services are unavailable right now. Please try again later. | |
2227 | PM_MY_PLIST My Playlists | |
2228 | PM_R_PLIST Rockstar Playlists | |
2229 | PM_R_V_PLIST Rockstar Verified playlist | |
2230 | PM_DLOAD_PLIST My Bookmarked Playlists | |
2231 | PM_AVAIL_CHALL Challenges | |
2232 | PM_MULTI x | |
2233 | PM_CH_NM_AL Please choose a valid title for your Challenge. | |
2234 | PM_CLMN_WRNT1 No Playlists | |
2235 | PM_CREWS Crews | |
2236 | PM_INF_AJ2T1 Bookmarked | |
2237 | PM_INF_LEAT Leave | |
2238 | PM_FIND_SESS Find New Session | |
2239 | PM_INF_CHCT Choose Character | |
2240 | PM_INF_PGOT Play GTA Online | |
2241 | PM_INF_CRWT Crews | |
2242 | PM_INF_AWDT Awards | |
2243 | PM_INF_WEPT Weapons | |
2244 | PM_INF_UNLT Unlocks | |
2245 | PM_INF_PLLT Playlists | |
2246 | PM_INF_PLLT00 R* Tournaments | |
2247 | PM_INF_PLLT0 My Playlists | |
2248 | PM_CLMN_WRNT5 No Challenges | |
2249 | BM_INV_SENT Inviting Players | |
2250 | BM_NO_INV No invites sent | |
2251 | PIM_TINVE Inventory | |
2252 | PIM_THELP Brief | |
2253 | PIM_TOBJ Objective | |
2254 | PM_INVO_FM Invite Only Session | |
2255 | PM_GO Go | |
2256 | PM_NCREW_FM Crew Session | |
2257 | PM_CREW_FM Closed Crew Session | |
2258 | PM_FRIEND_FM Closed Friend Session | |
2259 | PM_SOLO_FM Solo Session | |
2260 | PM_ON On | |
2261 | PM_OFF Off | |
2262 | PM_SHUFFLE Shuffle Playlist | |
2263 | HUD_INVPROG Joining session in progress. | |
2264 | R2P_MENU_TINV PLAYER LIST | |
2265 | BLIP_0 Destination | |
2266 | BLIP_1 Destination | |
2267 | BLIP_2 Destination | |
2268 | BLIP_3 Police | |
2269 | BLIP_4 Objective | |
2270 | BLIP_5 Objective | |
2271 | BLIP_6 Player | |
2272 | BLIP_7 North | |
2273 | BLIP_8 Waypoint | |
2274 | HUD_LOADMAIN rockstart game sercives are temportily unavailable | |
2275 | HUD_KICKRES Kick from session for beeing idle too long | |
2276 | HUD_KICKRES1 You were kicked from this GTA Online session by others players | |
2277 | HUD_KICKRES2 you have been classed as a cheater | |
2278 | //CM_JOIN_GAME Accept Game Invite | |
2279 | //CM_JIP_GAME Join Game | |
2280 | //CM_JIP_GAME_DIS Join Game (Disabled) | |
2281 | //CM_SPECTATE Spectate Player (BETA) | |
2282 | //CM_SPECTATE_DISABLED Spectate Player (Disabled by Player) | |
2283 | //CM_JOIN_PARTY Join Party | |
2284 | //CM_SEND_FRIEND_INVITE Send Friend Request | |
2285 | //CM_SEND_CREW_INVITE Invite to | |
2286 | //CM_SEND_PARTY_INVITE Send Party Invite | |
2287 | //CM_KICK_PARTY Kick from Party | |
2288 | //CM_SEND_GAME_INVITE Send Game Invite | |
2289 | //CM_SEND_GAME_INVITE_DIS Send Game Invite (Disabled) | |
2290 | //CM_KICK_DIS Kick (Disabled) | |
2291 | //CM_UNKICK Unkick | |
2292 | //CM_REPORT Report | |
2293 | //CM_REPORT_DIS Report (Disabled) | |
2294 | //CM_COMMEND Commend | |
2295 | //CM_COMMEND_DIS Commend (Disabled) | |
2296 | //CM_MUTE Toggle Mute | |
2297 | //CM_SHOW_GAMER_CARD Show Profile | |
2298 | //CM_ADD_A_FRIEND Add A Friend | |
2299 | //CM_GAMER_REVIEW Player Review | |
2300 | //IB_JOINCREW Join Crew | |
2301 | //HUD_INPUT53 Back | |
2302 | //CC_PM_OPT OPTIONS | |
2303 | //CC_PM_DET DETAILS | |
2304 | //PM_SCR_CCY YOU | |
2305 | //CRW_MINE My Crews | |
2306 | //CRW_ROCKSTAR Suggested Crews | |
2307 | //CRW_FRIENDS Friends' Crews | |
2308 | //CRW_INVITES Invitations | |
2309 | //CRW_REQUESTS Requests | |
2310 | //CRW_LEADERBOARDS Leaderboard | |
2311 | //FM_COR_KICKOC You have been kicked from the Job. You are no loger on call. | |
2312 | //HUD_ENDKICK You were kicked from the session. | |
2313 | //HUD_ENDADMINKICK You Have been removed from this session by a Rockstar Games administrator. | |
2314 | //HUD_KICKROCK The session you were spectating is being assessed by Rockstar with a view to broadcasting that as an Online TV Channel. | |
2315 | //HUD_ROSBANNED You have been banned from Grand Theft Auto Online. | |
2316 | //HUD_CONNPROB alert | |
2317 | //HUD_QURETSP Return to Grand Theft Auto V. | |
2318 | //HUD_KICKCREWMSG You were kicked from your Crew. Global_1315377 | |
2319 | //MP_PROP_PUR_KICK2 You no longer have access tp the property as the owner has left the game. | |
2320 | //MP_PROP_PUR_KICK0 You no longer have access to the property as you have traded it in. | |
2321 | //MP_PROP_PUR_KICK1 You no loger have access to the property as the owner has traded it. | |
2322 | //FM_COR_KICKA You have been kicked from the Activity | |
2323 | //FM_COR_KICK You have been kicked from the Job. | |
2324 | //PLYKICKED was voted from the game. | |
2325 | //SCTV_FEED0 Show Feed | |
2326 | //SCTV_FEED1 Show List | |
2327 | //SCTV_HELI_OFF Online TV Heli Off | |
2328 | //SCTV_HELI_ON Online TV Heli On | |
2329 | //SCTV_TS_CTFG GTA - fighting for transport | |
2330 | //SCTV_TS_CTFR Raid - protecting their base of operations | |
2331 | //SCTV_TS_CTFC Contend - bringing it back to base | |
2332 | //SCTV_TS_CTFH Hold - holding on for dear life | |
2333 | //SCTV_TS_LTS2 Two Team LTS - in a two team enter one leaves situation | |
2334 | //SCTV_TS_LTS3 Three Team LTS - in a three way.. battle for survival | |
2335 | //SCTV_TS_LTS4 four Team LTS - unlikely to survive a four team fight | |
2336 | //SCTV_T_LTS LTS | |
2337 | //SCTV_T_VS versus | |
2338 | //SCLB_MIS_NN Mission | |
2339 | //SCTV_SSYOU has stopped spectating you. | |
2340 | //SCTV_SYOU is spectating you. | |
2341 | //DSV_TPLYS destroy the ~r~target vehicle. | |
2342 | //PTD_TPLYSH took down the Smuggler Helicopter. | |
2343 | //SCLB_PROFILE View Profile | |
2344 | //SCLB_NO_ROS The Rockstar game services are unavailable right now. Please try again later. | |
2345 | //SCLB_SIGN_OUT You have signed out of PlayStation Network and will be unable to view leaderboard data. | |
2346 | //SCLB_NOT_ONL Sign in to Playstation Network to view leaderboards data. | |
2347 | //FMMC_COR_SCLB5 Driver | |
2348 | //FMMC_COR_SCLB6 Co-Driver | |
2349 | //SCLB_C_RANK POSITION | |
2350 | //SCLB_RCE_NN Race | |
2351 | SCLB_GLOBAL GLOBAL | |
2352 | SCLB_FRIENDS FRIENDS | |
2353 | SCLB_CREW CREW | |
2354 | SHOP_CONTENT_1 beach bum | |
2355 | SHOP_CONTENT_2 business update | |
2356 | SHOP_CONTENT_3 festive | |
2357 | SHOP_CONTENT_4 valentine's | |
2358 | SHOP_CONTENT_5 high life update | |
2359 | SHOP_CONTENT_6 "im not a hipster" | |
2360 | SHOP_CONTENT_6b "im not a hipster" update | |
2361 | SHOP_CONTENT_7 heists | |
2362 | SHOP_CONTENT_8 independence day | |
2363 | SHOP_CONTENT_9 san andreas flight school | |
2364 | SHOP_CONTENT_10 last team standing | |
2365 | SHOP_CONTENT_12 ill-gotten gains update part 1 | |
2366 | SHOP_CONTENT_13 video edditor | |
2367 | SHOP_CONTENT_14 ill-gotten gains update part 2 | |
2368 | PIM_INVAT Invite to Apartment has been send to . | |
2369 | PIM_HINVAP Invite this player to your apartment. | |
2370 | PIM_HINVA Invite players to your Apartment. | |
2371 | PIM_INVAP Invite to Apartment. | |
2372 | PIM_TINVE Inventory | |
2373 | PIM_HHEIS Choose to Spectate other members of your Heist Crew. | |
2374 | PIM_HHEIB Your Heist Crew cannot currently be spectated. | |
2375 | PIM_HINVE Your Inventory contains carried oteams such as cash and clothing Accessories. | |
2376 | PIM_HPASIY Confirm turning on Passive Mode. | |
2377 | PIM_HPASIN Confrim turning off Passive Mode. | |
2378 | PIM_HHLPL Make your blip flash to other players for a short time. | |
2379 | PIM_HHLPR Make the selected player's blip flash to you for a short time.' | |
2380 | PIM_HPGS A list of all the players in your session. | |
2381 | PIM_HLJCE Cash earned from the last Job. | |
2382 | PIM_HHEISP Select to spectate this player. | |
2383 | PIM_TCHT Chat | |
2384 | PIM_TAPV Vehicle Access. | |
2385 | 0x1BA5E3C4 Rockstar wants to know what you | |
2386 | 0xB9C144DB Unable to Join. The session you have tried to join is using content created by another player. An inactive profile only has permissions for Rockstar content. | |
2387 | 0x41818A76 Your Sony Entertainment Network account has chat restrictions enabled, only Rockstar content will be available and voice chat is disabled. | |
2388 | 0x2A199171 Cheater classification release date ~1~/~1~/~1~. | |
2389 | 0x093ADE5F Rockstar Dev SCTV | |
2390 | 0x0BD9B728 You have been removed from this session by a Rockstar Games administrator. | |
2391 | 0x28DBEF47 Rockstar Game Services have corrected your GTA Dollars by -$~1~. | |
2392 | 0xCF6AEAC0 Rockstar Games SCADMIN Version | |
2393 | TICK_PH_INV joined job. | |
2394 | TICK_PH_INVA joined activity. | |
2395 | TICK_BC_ON has active their Broadcast app. | |
2396 | TICK_BC_OFF has deactivated their Broadcast app. | |
2397 | TICK_HEAD NULL | |
2398 | TICK_DIED died. | |
2399 | PIM_EMVTK kicked you from thier Personal Vehicle. | |
2400 | TICK_BC_ON has activated thier Brodcast app. | |
2401 | TICK_BC_OFF has deactivated thier Brodcast app. | |
2402 | PLYVEH_INS_DES1 Your insured Personal Vehicle has been destroyed The player who destroyed it has paid $ towards the clain premium. | |
2403 | PLYVEH_INS_DES has detroyed your insured Personal Vehicle They have paid $ towards the claim premium. | |
2404 | TICK_PH_INV joined Job. | |
2405 | 0xA1519D54 Return to Grand Theft Auto V | |
2406 | 0x478FDC87 GTA Online | |
2407 | 0x56F3BD49 Grand Theft Auto Online | |
2408 | 0x5E96ECC Are you sure you want to quit this session? | |
2409 | 0x14610888 Progress will be automatically saved. | |
2410 | 0x73A36AB4 Playing story | |
2411 | 0x83BA9913 Prologue | |
2412 | 0xABB00DEB Grand Theft Auto V | |
2413 | 0x6F927644 Bay City Ave | |
2414 | 0xFBD41663 Alert | |
2415 | 0xAB11B305 Quit | |
2416 | 0xC3881591 No | |
2417 | 0xC4A4A05C Yes | |
2418 | ||
2419 | ||
2420 | */ | |
2421 | ||
2422 | COMMEND_SPAM_TIMEOUT_DISABLED = 0x6133E077 | |
2423 | COMMEND_SPAM_TIMEOUT = 0xA76D3517 | |
2424 | MPPLY_LAST_COMMEND_RESTORE = 0x181F07A6 | |
2425 | MPPLY_LAST_COMMEND_PENALTY = 0x8CF94EB4 | |
2426 | MPPLY_COMMEND_STRENGTH = 0xADA7E7D3 | |
2427 | REPORT_SPAM_TIMEOUT_DISABLED = 0x33406312 | |
2428 | REPORT_SPAM_TIMEOUT = 0x332F884E | |
2429 | MPPLY_LAST_REPORT_RESTORE = 0x211774A4 | |
2430 | MPPLY_LAST_REPORT_PENALTY = 0xB87499EA | |
2431 | MPPLY_REPORT_STRENGTH = 0x850CF917 | |
2432 | COMMEND_TIMEOUT_DISABLED = 0x73DC7AA3 | |
2433 | COMMEND_TIMEOUT = 0xABE83C3B | |
2434 | REPORT_TIMEOUT_DISABLED = 0x7266E8B2 | |
2435 | REPORT_TIMEOUT = 0xA13B434D | |
2436 | CL_SEND_FRIEND_REQUEST = 0xAFEA09C6 | |
2437 | KICK_TIMEOUT = 0xB2111FE4 | |
2438 | KICK_TIMEOUT_DISABLED = 0xD892E535 | |
2439 | IDLEKICK_KICK = 0x949C8AAD | |
2440 | ENABLE_KICK = 0xE2E1805E | |
2441 | KICK_VOTES_NEEDED_RATIO = 0xEED6D618 | |
2442 | BADSPORT_THRESHOLD = 0x4C507C3D | |
2443 | BADSPORT_THRESHOLD_NOTCHEATER = 0x727F6777 | |
2444 | IDLEKICK_WARNING1 = 0xB3A4D684 | |
2445 | IDLEKICK_WARNING2 = 0xC16F7219 | |
2446 | IDLEKICK_WARNING3 = 0xE009AF49 | |
2447 | COMMENDREPORT_MAX_STRENGTH = 0xF227F666 | |
2448 | MP_GLOBAL = 0x38CEB237, 953070135 | |
2449 | BASE_GLOBALS = 0xB5EE873, 190769267 | |
2450 | CONTENT_MODIFIER_ = 0xE8895D8A, 3901316490 | |
2451 | MP_FM_RACES = 0xC32348A0, 3273869472 | |
2452 | MP_FM_RACES_CAR = 0x3D76C61B, 1031194139 | |
2453 | MP_FM_RACES_SEA = 0xCC580A3A, 3428321850 | |
2454 | MP_FM_RACES_AIR = 0xF4175CBB, 4095171771 | |
2455 | MP_FM_BASEJUMP = 0x30C5F8C6, 818280646 | |
2456 | MP_FM_RACES_CYCLE = 0xEA4446C2, 3930343106 | |
2457 | MP_FM_RACES_BIKE = 0xC795D7FC, 3348486140 | |
2458 | MP_FM_MISSIONS = 0x202DE323, 539878179 | |
2459 | MP_FM_CONTACT = 0xBDD1A4F5, 3184633077 | |
2460 | MP_FM_RANDOM = 0xAD9BAC56, 2912660566 | |
2461 | MP_FM_VERSUS = 0x56A36BC3, 1453550531 | |
2462 | MP_FM_LTS = 0xFCDE7FF3, 4242440179 | |
2463 | MP_FM_CAPTURE = 0xF508B799, 4110989209 | |
2464 | MP_FM_DM = 0x7030EBCC, 1882254284 | |
2465 | MP_FM_SURVIVAL = 0x2217A8F1, 571975921 | |
2466 | MP_FM_GANG_ATTACK = 0x67F82C09, 1744317449 | |
2467 | MP_CNC = 0x53599429, 1398379561 | |
2468 | MP_CNC_TEAM_COP = 0xEE611088, 3999338632 | |
2469 | MP_CNC_TEAM_VAGOS = 0xBB04D34F, 3137655631 | |
2470 | MP_CNC_TEAM_LOST = 0x3AEFBEA0, 988790432 | |
2471 | MP_FM = 0x43FE68BD, 1140746429 | |
2472 | DISABLE_SCTV_GTAO_TV = 0xB715B652, 3071653458 | |
2473 | DISABLE_SCTV_FRIENDS_SPECTATE = 0x74AFE8F8, 1957685496 | |
2474 | DisableSpectate = 0xCAB5C6A2, 3400910498 | |
2475 | DisableSpectate = 0x2A5A6D1F, 710569247 | |
2476 | mpply_crew_0_id = 0x1838E2E9, 406381289 | |
2477 | mpply_crew_1_id = 0x6388AA41, 1669900865 | |
2478 | mpply_crew_2_id = 0x33A7D8B, 54164875 | |
2479 | mpply_crew_3_id = 0xCDC93A60, 3452516960 | |
2480 | mpply_crew_4_id = 0xA202D7E4, 2718095332 | |
2481 | mpply_crew_local_xp_0 = 0xA9C0CB15, 2847984405 | |
2482 | mpply_crew_local_xp_1 = 0x9C0D2FAE, 2618109870 | |
2483 | mpply_crew_local_xp_2 = 0x4C579040, 1280806976 | |
2484 | mpply_crew_local_xp_3 = 0xBEA1F4D7, 3198285015 | |
2485 | mpply_crew_local_xp_4 = 0x70E5595B, 1894078811 | |
2486 | mpply_became_cheater_num = 0xA2A859D5, 2728942037 | |
2487 | mpply_friendly = 0xDAFB10F9, 3673886969 | |
2488 | mpply_offensive_language = 0x3CDB43E2, 1021002722 | |
2489 | mpply_griefing = 0x9C6A0C42, 2624195650 | |
2490 | mpply_helpful = 0x893E1390, 2302546832 | |
2491 | mpply_offensive_ugc = 0xF3DE4879, 4091431033 | |
2492 | mpply_offensive_tagplate = 0xE8FB6DD5, 3908791765 | |
2493 | mpply_exploits = 0x9F79BA0B, 2675554827 | |
2494 | mpply_game_exploits = 0xCBFD04A4, 3422356644 | |
2495 | mpply_vc_hate = 0xE7072CD, 242250445 | |
2496 | mpply_vc_annoyingme = 0x62EB8C5A, 1659604058 | |
2497 | ||
2498 | ||
2499 | //badsport and some cheat stuff hashes. need to be bruteforced | |
2500 | 0x6D7F0859 | |
2501 | 0xBC707798 | |
2502 | 0xC71E28C5 | |
2503 | ||
2504 | ||
2505 | ||
2506 | ||
2507 | //vehicle weapons code: | |
2508 | Vector3 Global_1312302_8; //coords from 1 | |
2509 | Vector3 Global_1312302_11; //coords from 2 | |
2510 | ||
2511 | Vector3 Global_1312302_2; //coords to 1 | |
2512 | Vector3 Global_1312302_5; //coords to 2 | |
2513 | ||
2514 | Vector3 Global_1312295_2; //spike coords | |
2515 | int Global_1312295_5; //spike pickup | |
2516 | ||
2517 | void func_3000() | |
2518 | { | |
2519 | int iVar0; | |
2520 | Vector3 Var1; | |
2521 | Vector3 Var2; | |
2522 | float fVar3; | |
2523 | float uVar4; | |
2524 | Vector3 vVar5; | |
2525 | Vector3 vVar6; | |
2526 | float uVar7; | |
2527 | Vector3 vVar8; | |
2528 | Vector3 vVar9; | |
2529 | ||
2530 | ||
2531 | if (IS_PLAYER_PLAYING(PLAYER_ID())) | |
2532 | { | |
2533 | if (IS_PED_IN_ANY_VEHICLE(PLAYER_PED_ID(), 0)) | |
2534 | { | |
2535 | _DISABLE_INPUT_GROUP(2); | |
2536 | iVar0 = GET_VEHICLE_PED_IS_IN(PLAYER_PED_ID(), 0); | |
2537 | GET_MODEL_DIMENSIONS(GET_ENTITY_MODEL(iVar0), &Var1, &Var2); | |
2538 | if (IS_CONTROL_JUST_PRESSED(2, INPUT_SCRIPT_LS) || IS_CONTROL_PRESSED(2, INPUT_SCRIPT_LS)) | |
2539 | { | |
2540 | if (IS_CONTROL_PRESSED(2, INPUT_SCRIPT_RS)) | |
2541 | { | |
2542 | Global_1312302_8 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, (Var1.x - 0.2f), (Var1.y - 0.5f), 0.0f); | |
2543 | Global_1312302_11 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, (Var2.x + 0.2f), (Var1.y - 0.5f), 0.0f); | |
2544 | if (!IS_ENTITY_IN_AIR(iVar0)) | |
2545 | { | |
2546 | _GET_GROUND_Z_COORD_WITH_OFFSETS(Global_1312302_8.x, Global_1312302_8.y, Global_1312302_8.z, &uVar4, &vVar5); | |
2547 | vVar6 = func_363(vVar5, Subtract(func_765(Global_1312302_11), Global_1312302_8)); | |
2548 | Global_1312302_2 = Subtract(Global_1312302_8, Modulate(vVar6, NewVector3(300.0f, 300.0f, 300.0f))); | |
2549 | Global_1312302_5 = Subtract(Global_1312302_11, Modulate(vVar6, NewVector3(300.0f, 300.0f, 300.0f))); | |
2550 | } | |
2551 | else | |
2552 | { | |
2553 | Global_1312302_2 = func_3001(Global_1312302_8, iVar0, -300.0f); | |
2554 | Global_1312302_5 = func_3001(Global_1312302_11, iVar0, -300.0f); | |
2555 | } | |
2556 | } | |
2557 | else | |
2558 | { | |
2559 | Global_1312302_8 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, (Var1.x - 0.2f), (Var2.y + 0.5f), 0.0f); | |
2560 | Global_1312302_11 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, (Var2.x + 0.2f), (Var2.y + 0.5f), 0.0f); | |
2561 | if (!IS_ENTITY_IN_AIR(iVar0)) | |
2562 | { | |
2563 | _GET_GROUND_Z_COORD_WITH_OFFSETS(Global_1312302_8.x, Global_1312302_8.y, Global_1312302_8.z, &uVar7, &vVar8); | |
2564 | vVar9 = func_363(vVar8, Subtract(func_765(Global_1312302_11), Global_1312302_8)); | |
2565 | Global_1312302_2 = Addition(Global_1312302_8, Modulate(vVar9, NewVector3(300.0f, 300.0f, 300.0f))); | |
2566 | Global_1312302_5 = Addition(Global_1312302_11, Modulate(vVar9, NewVector3(300.0f, 300.0f, 300.0f))); | |
2567 | ||
2568 | } | |
2569 | else | |
2570 | { | |
2571 | Global_1312302_2 = func_3001(Global_1312302_8, iVar0, 1133903872); | |
2572 | Global_1312302_5 = func_3001(Global_1312302_11, iVar0, 1133903872); | |
2573 | } | |
2574 | } | |
2575 | if ((GET_ENTITY_SPEED(iVar0) * GET_ENTITY_SPEED(iVar0)) > 400.0f) | |
2576 | { | |
2577 | fVar3 = ((GET_ENTITY_SPEED(iVar0) * GET_ENTITY_SPEED(iVar0)) + 100.0f); | |
2578 | } | |
2579 | else | |
2580 | { | |
2581 | fVar3 = 400.0f; | |
2582 | } | |
2583 | if (!func_987(Global_1312302_8, Global_1312302_2)) | |
2584 | { | |
2585 | _SHOOT_SINGLE_VEHICLE_BULLET_BETWEEN_COORDS( | |
2586 | Global_1312302_8.x, Global_1312302_8.y, Global_1312302_8.z, | |
2587 | Global_1312302_2.x, Global_1312302_2.y, Global_1312302_2.z, | |
2588 | 250, 1, GET_HASH_KEY("weapon_vehicle_rocket"), PLAYER_PED_ID(), 1, 1, fVar3, iVar0, 0); | |
2589 | } | |
2590 | if (!func_987(Global_1312302_11, Global_1312302_5)) | |
2591 | { | |
2592 | _SHOOT_SINGLE_VEHICLE_BULLET_BETWEEN_COORDS( | |
2593 | Global_1312302_11.x, Global_1312302_11.y, Global_1312302_11.z, | |
2594 | Global_1312302_5.x, Global_1312302_5.y, Global_1312302_5.z, | |
2595 | 250, 1, GET_HASH_KEY("weapon_vehicle_rocket"), PLAYER_PED_ID(), 1, 1, fVar3, iVar0, 0); | |
2596 | } | |
2597 | ||
2598 | //DISABLE_CONTROL_ACTION(0, INPUT_VEH_HORN); | |
2599 | } | |
2600 | } | |
2601 | } | |
2602 | } | |
2603 | ||
2604 | void func_3005() | |
2605 | { | |
2606 | int iVar0; | |
2607 | Vector3 Var1, uVar2; | |
2608 | ||
2609 | if (IS_PED_IN_ANY_VEHICLE(PLAYER_PED_ID(), 0)) | |
2610 | { | |
2611 | DISABLE_CONTROL_ACTION(0, 79); | |
2612 | iVar0 = GET_VEHICLE_PED_IS_IN(PLAYER_PED_ID(), 0); | |
2613 | GET_MODEL_DIMENSIONS(GET_ENTITY_MODEL(iVar0), &Var1, &uVar2); | |
2614 | if (IS_CONTROL_JUST_PRESSED(2, 200)) | |
2615 | { | |
2616 | Global_1312295_2 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, 0.0f, (Var1.y - 1.0f), 0.0f); | |
2617 | } | |
2618 | } | |
2619 | } | |
2620 | void func_3003() | |
2621 | { | |
2622 | func_3005(); | |
2623 | if (!DOES_ENTITY_EXIST(Global_1312295_5)) | |
2624 | { | |
2625 | Global_1312295_5 = CREATE_AMBIENT_PICKUP(GET_HASH_KEY("pickup_vehicle_custom_script"), | |
2626 | Global_1312295_2.x, Global_1312295_2.y, Global_1312295_2.z, | |
2627 | 0, 2, GET_HASH_KEY("prop_tyre_spike_01"), 1, 0); | |
2628 | _HIGHLIGHT_PLACEMENT_COORDS(Global_1312295_2.x, Global_1312295_2.y, Global_1312295_2.z, 0); | |
2629 | PLAY_SOUND_FROM_ENTITY(-1, "SPIKES", Global_1312295_5, "MP_RACE_SPIKES_SOUNDSET", 1, 50); | |
2630 | } | |
2631 | else if (DOES_ENTITY_EXIST(Global_1312295_5)) | |
2632 | { | |
2633 | DELETE_OBJECT(&(Global_1312295_5)); | |
2634 | } | |
2635 | } | |
2636 | ||
2637 | //loop: | |
2638 | if (featureWeaponVehRockets) | |
2639 | { | |
2640 | if (!IS_PAUSE_MENU_ACTIVE()) | |
2641 | { | |
2642 | func_3003(); | |
2643 | func_3000(); | |
2644 | } | |
2645 | ||
2646 | ||
2647 | ||
2648 | ||
2649 | ||
2650 | if (!DOES_PARTICLE_FX_LOOPED_EXIST(particalmH)) | |
2651 | { | |
2652 | printf("asset: %s, name: %s \n", result.asset, result.name); | |
2653 | _SET_PTFX_ASSET_NEXT_CALL(result.asset); | |
2654 | particalmH = _START_PARTICLE_FX_LOOPED_ON_ENTITY_BONE_2(result.name, PLAYER_PED_ID(), | |
2655 | 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SKEL_L_Finger01, 1.0f, 0, 0, 0); | |
2656 | ||
2657 | _SET_PTFX_ASSET_NEXT_CALL(result.asset); | |
2658 | particalmH = _START_PARTICLE_FX_LOOPED_ON_ENTITY_BONE_2(result.name, PLAYER_PED_ID(), | |
2659 | 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SKEL_R_Finger01, 1.0f, 0, 0, 0); | |
2660 | ||
2661 | SET_PARTICLE_FX_LOOPED_COLOUR(particalmH, titlebox.R / 255.0f, titlebox.G / 255.0f, titlebox.B / 255.0f, 0); | |
2662 | ||
2663 | } | |
2664 | if (DOES_PARTICLE_FX_LOOPED_EXIST(particalmH)) | |
2665 | { | |
2666 | //STOP_PARTICLE_FX_LOOPED(particalmH, 1); | |
2667 | REMOVE_PARTICLE_FX(particalmH, 1); | |
2668 | } | |
2669 | ||
2670 | ||
2671 | ||
2672 | ||
2673 | int myAtoi(char* str) { | |
2674 | int length = strlen(str); | |
2675 | int counter = 0; | |
2676 | int signcounter = 0; | |
2677 | unsigned int result = 0; | |
2678 | int result2 = 0; | |
2679 | bool negative = false; | |
2680 | char *temp = (char*)malloc(sizeof(char)); | |
2681 | for (int i = 0; i < length; i++) | |
2682 | { | |
2683 | if (counter == 0 && (str[i] != 0x20 && str[i] != 0x2B && str[i] != 0x2D) && (str[i] < 0x30 || str[i] > 0x39)) | |
2684 | break; | |
2685 | ||
2686 | else if (((counter > 0 || signcounter > 0) || (i > 0 && signcounter == 0 && str[i] != 0x20 && str[i] != 0x2B && str[i] != 0x2D)) && (str[i] < 0x30 || str[i] > 0x39)) | |
2687 | break;; | |
2688 | ||
2689 | ||
2690 | if (str[i] >= 0x30 && str[i] <= 0x39) | |
2691 | { | |
2692 | if (counter > 0) | |
2693 | temp = (char*)_realloc(temp, (counter + 1) * sizeof(char)); | |
2694 | ||
2695 | temp[counter] = str[i]; | |
2696 | counter++; | |
2697 | } | |
2698 | else if (str[i] == 0x2D) | |
2699 | { | |
2700 | negative = !negative; | |
2701 | signcounter++; | |
2702 | } | |
2703 | else if (str[i] == 0x2B) | |
2704 | signcounter++; | |
2705 | ||
2706 | if (signcounter > 1) | |
2707 | return 0; | |
2708 | ||
2709 | //length--; | |
2710 | } | |
2711 | ||
2712 | if (counter == 0) | |
2713 | return 0; | |
2714 | else if (counter > 10 && !negative) | |
2715 | return INT_MAX; | |
2716 | else if (counter > 10 && negative) | |
2717 | return INT_MIN; | |
2718 | ||
2719 | ||
2720 | for (int i = 0; i < counter; i++) | |
2721 | { | |
2722 | result += (temp[i] - 0x30) * ipow(10, counter - 1 - i); | |
2723 | ||
2724 | } | |
2725 | ||
2726 | if (result > 2147483647 && !negative) | |
2727 | result2 = INT_MAX; | |
2728 | ||
2729 | else if (result > 2147483648 && negative) | |
2730 | result2 = INT_MIN; | |
2731 | ||
2732 | else if (negative) | |
2733 | result2 = -result; | |
2734 | else | |
2735 | result2 = result; | |
2736 | ||
2737 | return result2; | |
2738 | } | |
2739 | ||
2740 | ||
2741 | ||
2742 | ||
2743 | ||
2744 | if (onPress && NETWORK_IS_PLAYER_ACTIVE((Player)Menu::currentop - 1)) | |
2745 | { | |
2746 | if (featureIsNetworkList) | |
2747 | { | |
2748 | iSelectedPlayer = (Player)Menu::currentop - 1; | |
2749 | if (SUB::NETWORK_PLAYERS_OPTIONS != -1) Menu::SetSub_delayed = SUB::NETWORK_PLAYERS_OPTIONS; | |
2750 | } | |
2751 | else | |
2752 | { | |
2753 | Player playerIter = GET_PLAYER_PED(Menu::currentop - 1); | |
2754 | if (RequestControlOfEnt(iSelectedPed)) { } | |
2755 | switch (networkListActions) | |
2756 | { | |
2757 | case 0: switch (featureAttachPedToPlayer) { | |
2758 | case 0: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, 0.2, 0, 0, 0, 0, 1, 1, 0, 1, 2, 1); break; | |
2759 | case 1: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, -0.3, 0, 0, 0, 0, 1, 1, 0, 1, 2, 1); break; | |
2760 | case 2: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, 0.5, 0, 0, 0, 180, 1, 1, 0, 1, 2, 1); break; | |
2761 | case 3: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, 0.3, 0.8, 0, 0, 180, 1, 1, 0, 1, 2, 1); break; | |
2762 | case 4: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, 0.3, 0.7, 86.0, 0, 180, 1, 1, 0, 1, 2, 1); break; | |
2763 | case 5: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0.0, 0.3, -0.3, 13, 180, 0.0, 1, 1, 0, 1, 2, 1); break; | |
2764 | case 6: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0.2, 0.3, 0.9, 0.0, 0.0, -120.0, 1, 1, 0, 1, 2, 1); break; | |
2765 | case 7: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, -0.09, -0.01, -0.3, 13.02, 84.0, 96.0, 1, 1, 0, 1, 2, 1); break; | |
2766 | case 8: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0.11, 0.48, 1.13, -179.98, 100.0, -91.0, 1, 1, 0, 1, 2, 1); break; | |
2767 | case 9: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, -0.02, 0.32, 0.69, -51.98, -14.0999, 180.0, 1, 1, 0, 1, 2, 1); break; | |
2768 | case 10: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, 0, 0.13, 0.56, -0.46, 0.0, 0.0, 84.0, 1, 1, 0, 1, 2, 1); break; | |
2769 | case 11: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, 0, -0.09, -0.07, -0.15, -7.0, -87.0, -90.0, 1, 1, 0, 1, 2, 1); break; | |
2770 | case 12: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, 0, 0.15, 0.14, 0.93, -168.0003, 73.0, -282.0, 1, 1, 0, 1, 2, 1); break; | |
2771 | case 13: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, 0, -0.11, 0.08, -0.29, 10.0, 92.0, -288.0, 1, 1, 0, 1, 2, 1); break; | |
2772 | case 14: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, 0, -0.09, 0.57, 0.55, 10.0, -305.0, 270.0, 1, 1, 0, 1, 2, 1); break; | |
2773 | case 15: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, 0, 0.0, 0.63, 0.73, 0.0, 0.0, 0.0, 1, 1, 0, 1, 2, 1); break; | |
2774 | } break; | |
2775 | case 1: TASK_COMBAT_PED(iSelectedPed, playerIter, 0, 16); break; | |
2776 | case 2: break; | |
2777 | case 3: for (int i = 0; i < 15; i++) { if (RequestControlOfEnt(s_ped[i])) TASK_COMBAT_PED(s_ped[i], playerIter, 0, 16); | |
2778 | } break; | |
2779 | case 4: for (int i = 0; i < 15; i++) { if (RequestControlOfEnt(s_ped[i])) | |
2780 | ATTACH_ENTITY_TO_ENTITY(s_ped[i], playerIter, GET_RANDOM_INT_IN_RANGE(0, 0xfcd9), GET_RANDOM_FLOAT_IN_RANGE(0, 3), GET_RANDOM_FLOAT_IN_RANGE(0, 3), GET_RANDOM_FLOAT_IN_RANGE(0, 3), 0, 0, 0, 1, 1, 1, 1, 2, 1); | |
2781 | }break; | |
2782 | case 5: entityObjectOps = playerIter; if (IS_PED_IN_ANY_VEHICLE(entityObjectOps, 1)) { entityObjectOps = GET_VEHICLE_PED_IS_IN(entityObjectOps, 1); } break; | |
2783 | case 6: whichBone = 1; featureAttToSomething = 3; netPlayerAttachment = playerIter; ATTACH_ENTITY_TO_ENTITY(entityObjectOps, netPlayerAttachment, -1, featureAttX, featureAttY, featureAttZ, featureAttPitch, featureAttRoll, featureAttYaw, 1, 1, 1, 1, 2, 1); if (SUB::ATTACHMENTOPTIONS != -1) Menu::SetSub_delayed = SUB::ATTACHMENTOPTIONS; break; | |
2784 | case 7: Vector3 tmp = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerIter, 0.0, 1.3, 0.0); networkSynchronisedScene(tmp.x, tmp.y, tmp.z, 0.0, 0.0, 0.0, GET_PLAYER_PED(iSelectedPlayer), "move_m@generic", "idle", 1); break; | |
2785 | case 8: bLoadFile = 1; fileLoadI = 4; break; | |
2786 | case 9: PlaceBounty(PLAYER_ID(), Menu::currentop - 1, featureBountyValue); break; | |
2787 | } | |
2788 | } | |
2789 | ||
2790 | return; // Either use return; to exit to the switch if you don't have code below that you want executed. | |
2791 | } | |
2792 | ||
2793 | ||
2794 | ||
2795 | ||
2796 | ||
2797 | ||
2798 | enum miscToggleActions { | |
2799 | MT_UNLIMITEDAMMO, | |
2800 | MT_LONG_LOCKON_RANGE, | |
2801 | MT_PLAYERSLIST_VEH_HANDLE, | |
2802 | MT_COPY_MODEL, | |
2803 | MT_CHAT_BYPASS, | |
2804 | MT_NITROUS_FX, | |
2805 | MT_ATTACH_VISE_VERSA, | |
2806 | }; | |
2807 | ||
2808 | switch (miscAction) | |
2809 | { | |
2810 | case 0: GiveAllWeapons(iSelectedPlayer, 1); ShowNotification("Gave Unlimited Ammo Weapons"); break; | |
2811 | case 1: featureHiddenLockonRange = !featureHiddenLockonRange; ShowNotification(featureHiddenLockonRange ? (char*)"Long Lockon Range ~g~ ON" : (char*)"Long Lockon Range ~r~ OFF"); break; | |
2812 | case 2: featureIsNetworkList = 0; networkListActions = 5; if (SUB::NETWORK_PLAYERS != -1) Menu::SetSub_delayed = SUB::NETWORK_PLAYERS; break; | |
2813 | case 3: featureCopyCopyModel = !featureCopyCopyModel; ShowNotification(featureCopyCopyModel ? (char*)"Copy Model ~g~ ON" : (char*)"Copy Model ~r~ OFF"); break; | |
2814 | case 4: featureChatBypass = !featureChatBypass; ShowNotification(featureChatBypass ? (char*)"Chat Bypass ~g~ ON" : (char*)"Chat Bypass ~r~ OFF"); break; | |
2815 | case 5: featureBoostNoCamFX = !featureBoostNoCamFX; ShowNotification(featureBoostNoCamFX ? (char*)"Cam FX ~g~ ON" : (char*)"Cam FX ~r~ OFF"); break; | |
2816 | case 6: featureAttachViseVersa = !featureAttachViseVersa; ShowNotification(featureAttachViseVersa ? (char*)"Attach Vise Versa ~g~ ON" : (char*)"Attach Vise Versa ~r~ OFF"); break; | |
2817 | } | |
2818 | ||
2819 | ||
2820 | ||
2821 | ||
2822 | ||
2823 | ||
2824 | ||
2825 | ||
2826 | void AddToggleM(char *text, miscToggleActions miscAction, bool isToggle = false, bool &pState = null, bool &option_code_bool = null, char *desc = NULL) | |
2827 | { | |
2828 | AddOption(text, null, nullFunc, -1, NULL, desc); | |
2829 | if (isToggle) | |
2830 | { | |
2831 | if (!pState) OptionStatus(0); | |
2832 | else if (pState) OptionStatus(1); | |
2833 | } | |
2834 | if (Menu::printingop == Menu::currentop) | |
2835 | { | |
2836 | if (IsOptionPressed()) { if (isToggle) { pState = !pState; } else if (&option_code_bool != &null) { option_code_bool = true; } } | |
2837 | toggleInstruction = 1; | |
2838 | if (IsOptionSJPressed()) | |
2839 | { | |
2840 | switch (miscAction) | |
2841 | { | |
2842 | case 0: GiveAllWeapons(iSelectedPlayer, 1); ShowNotification("Gave Unlimited Ammo Weapons"); break; | |
2843 | case 1: featureHiddenLockonRange = !featureHiddenLockonRange; ShowNotification(featureHiddenLockonRange ? (char*)"Long Lockon Range ~g~ ON" : (char*)"Long Lockon Range ~r~ OFF"); break; | |
2844 | case 2: featureIsNetworkList = 0; networkListActions = 5; if (SUB::NETWORK_PLAYERS != -1) Menu::SetSub_delayed = SUB::NETWORK_PLAYERS; break; | |
2845 | case 3: featureCopyCopyModel = !featureCopyCopyModel; ShowNotification(featureCopyCopyModel ? (char*)"Copy Model ~g~ ON" : (char*)"Copy Model ~r~ OFF"); break; | |
2846 | case 4: featureChatBypass = !featureChatBypass; ShowNotification(featureChatBypass ? (char*)"Chat Bypass ~g~ ON" : (char*)"Chat Bypass ~r~ OFF"); break; | |
2847 | case 5: featureBoostNoCamFX = !featureBoostNoCamFX; ShowNotification(featureBoostNoCamFX ? (char*)"Cam FX ~g~ ON" : (char*)"Cam FX ~r~ OFF"); break; | |
2848 | case 6: featureAttachViseVersa = !featureAttachViseVersa; ShowNotification(featureAttachViseVersa ? (char*)"Attach Vise Versa ~g~ ON" : (char*)"Attach Vise Versa ~r~ OFF"); break; | |
2849 | } | |
2850 | } | |
2851 | } | |
2852 | } | |
2853 | ||
2854 | ||
2855 | ||
2856 | ||
2857 | ||
2858 | ||
2859 | if (CFileExists(GET_CONFIG_PATH)) | |
2860 | { | |
2861 | file = CReadFile(GET_CONFIG_PATH, &file_size); | |
2862 | ||
2863 | featureDisplayInfo = GetPrivateProfileBool(APP_HAX_VALUES, "dispInfo", "0", file, file_size); | |
2864 | featureWorldPause = GetPrivateProfileBool(APP_HAX_VALUES, "pauseClock", "0", file, file_size); | |
2865 | //clockhour = GetPrivateProfileInt(APP_HAX_VALUES, "clockTime", GET_CLOCK_HOURS(), file, file_size); | |
2866 | weatherTypeIndex = GetPrivateProfileInt(APP_HAX_VALUES, "weather", 4, file, file_size); | |
2867 | GetPrivateProfileString(APP_HAX_VALUES, "nameChange", "DEFAULT", nameChangeEx, 24, file, file_size); if (strcmp("DEFAULT", nameChangeEx)) { psnchangeName = nameChangeEx; featurePSNChangeI = 1; } | |
2868 | ||
2869 | spoofRankValue = GetPrivateProfileInt(APP_HAX_VALUES, "spoofRankValue", 53, file, file_size); | |
2870 | spoofWalletValue = GetPrivateProfileInt(APP_HAX_VALUES, "spoofWalletValue", 0, file, file_size); | |
2871 | spoofKillsValue = GetPrivateProfileInt(APP_HAX_VALUES, "spoofKillsValue", 75, file, file_size); | |
2872 | spoofDeathsValue = GetPrivateProfileInt(APP_HAX_VALUES, "spoofDeathValue", 100, file, file_size); | |
2873 | ||
2874 | featureInvincibility = GetPrivateProfileBool(APP_HAX_VALUES, "pInvincible", "0", file, file_size); | |
2875 | featureSuperJump = GetPrivateProfileBool(APP_HAX_VALUES, "pSupJump", "0", file, file_size); | |
2876 | featureSuperRun = GetPrivateProfileBool(APP_HAX_VALUES, "pSupRun", "0", file, file_size); | |
2877 | featureNeverWanted = GetPrivateProfileBool(APP_HAX_VALUES, "pNoWant", "0", file, file_size); | |
2878 | featurSonicRun = GetPrivateProfileBool(APP_HAX_VALUES, "pSanicRun", "0", file, file_size); | |
2879 | ||
2880 | featureWeaponNoReload = GetPrivateProfileBool(APP_HAX_VALUES, "wInfAmmo", "0", file, file_size); | |
2881 | ||
2882 | featureVehicleInvincibility = GetPrivateProfileBool(APP_HAX_VALUES, "veInvincible", "0", file, file_size); | |
2883 | featureAutoRepair = GetPrivateProfileBool(APP_HAX_VALUES, "veAutoFix", "0", file, file_size); | |
2884 | featureNitrous = GetPrivateProfileBool(APP_HAX_VALUES, "veHornBoost", "0", file, file_size); | |
2885 | ||
2886 | featureVehWarpInSpawned = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnInVehic", "0", file, file_size); | |
2887 | featurePreUpgraded = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnPreMax", "0", file, file_size); | |
2888 | featureInvincibleVehicleOnSpawn = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnInvincible", "0", file, file_size); | |
2889 | featureAddBlipToSpawnVeh = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnWBlip", "0", file, file_size); | |
2890 | featureVehicleSpawnerDeletePrevious = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnDeletePre", "0", file, file_size); | |
2891 | featureVehicleSpawnerWitUpgrades = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnWMods", "0", file, file_size); | |
2892 | GetPrivateProfileString(APP_HAX_VALUES, "veSpawnPlateTxt", "Semjases", plateTxt, 14, file, file_size); vehicleSpawnerPlateText = plateTxt; | |
2893 | featureVehicleSpawnerPlateType = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnPlateType", 1, file, file_size); | |
2894 | featureVehicleSpawnerPriamyColor = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnPrimColo", 145, file, file_size); | |
2895 | featureVehicleSpawnerSecondaryColor = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnSecondColo", 10, file, file_size); | |
2896 | featureVehicleSpawnerPearlescentColor = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnPearl", 38, file, file_size); | |
2897 | featureVehicleSpawnerWheelColor = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnWheelCol", 145, file, file_size); | |
2898 | GetPrivateProfileString(APP_HAX_VALUES, "veSpawnCustPrimary", "#320642", r_vehprim, 14, file, file_size); rgb = HexToRGB(r_vehprim); vehSpawnCustomP.R = rgb.R, vehSpawnCustomP.G = rgb.G, vehSpawnCustomP.B = rgb.B; | |
2899 | GetPrivateProfileString(APP_HAX_VALUES, "veSpawnCustSecondary", "#23292E", r_vehsec, 14, file, file_size); rgb = HexToRGB(r_vehsec); vehSpawnCustomS.R = rgb.R, vehSpawnCustomS.G = rgb.G, vehSpawnCustomS.B = rgb.B; | |
2900 | featureVehicleSpawnerWheelType = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnWheelType", 7, file, file_size); | |
2901 | featureVehicleSpawnerWheelIndex = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnWheelIndex", 8, file, file_size); | |
2902 | ||
2903 | featureShowChat = GetPrivateProfileBool(APP_HAX_VALUES, "neChat", "1", file, file_size); | |
2904 | featureAllClientsESP = GetPrivateProfileBool(APP_HAX_VALUES, "neESP", "0", file, file_size); | |
2905 | featureAllESPType = GetPrivateProfileInt(APP_HAX_VALUES, "neESPType", 2, file, file_size); | |
2906 | ||
2907 | featureProtectionCTask = GetPrivateProfileBool(APP_HAX_VALUES, "disTask", "0", file, file_size); | |
2908 | featureProtectionNaughty = GetPrivateProfileBool(APP_HAX_VALUES, "expRemWp", "0", file, file_size); | |
2909 | featureProtectionTask = GetPrivateProfileBool(APP_HAX_VALUES, "tasks", "0", file, file_size); | |
2910 | featureProtectionPTFX = GetPrivateProfileBool(APP_HAX_VALUES, "fxProtx", "0", file, file_size); | |
2911 | featureProtectionVehicleControl = GetPrivateProfileBool(APP_HAX_VALUES, "veContr", "0", file, file_size); | |
2912 | featureProtectionWantedLvl = GetPrivateProfileBool(APP_HAX_VALUES, "Wantedlvl", "0", file, file_size); | |
2913 | featureProtectionScriptedGame = GetPrivateProfileBool(APP_HAX_VALUES, "nonHostKick", "0", file, file_size); | |
2914 | featureProtectionSound = GetPrivateProfileBool(APP_HAX_VALUES, "sounds", "0", file, file_size); | |
2915 | featureProtectionClones = GetPrivateProfileBool(APP_HAX_VALUES, "clones", "0", file, file_size); | |
2916 | featureProtectionFreeze = GetPrivateProfileBool(APP_HAX_VALUES, "freezeProtx", "0", file, file_size); | |
2917 | featureProtectionAttach = GetPrivateProfileBool(APP_HAX_VALUES, "attachment", "0", file, file_size); | |
2918 | featureProtectionFPS = GetPrivateProfileBool(APP_HAX_VALUES, "fpsProtx", "0", file, file_size); | |
2919 | ||
2920 | loop_RainbowBoxes = GetPrivateProfileBool(APP_COLOURS, "rainbow_mode", "0", file, file_size); | |
2921 | GetPrivateProfileString(APP_COLOURS, "mTitletext", "#FFFFFF", mTitletext, 14, file, file_size); rgb = HexToRGB(mTitletext); maintitletext.R = rgb.R, maintitletext.G = rgb.G, maintitletext.B = rgb.B; | |
2922 | GetPrivateProfileString(APP_COLOURS, "mTitlebox", "#7800B4", mTitlebox, 14, file, file_size); rgb = HexToRGB(mTitlebox); maintitlebox.R = rgb.R, maintitlebox.G = rgb.G, maintitlebox.B = rgb.B; | |
2923 | GetPrivateProfileString(APP_COLOURS, "titlebox", "#A020F0", r_titlebox, 14, file, file_size); rgb = HexToRGB(r_titlebox); titlebox.R = rgb.R, titlebox.G = rgb.G, titlebox.B = rgb.B; | |
2924 | GetPrivateProfileString(APP_COLOURS, "BG", "#141414", r_BG, 14, file, file_size); rgb = HexToRGB(r_BG); BG.R = rgb.R, BG.G = rgb.G, BG.B = rgb.B; | |
2925 | GetPrivateProfileString(APP_COLOURS, "titletext", "#FFFFFF", r_titletext, 14, file, file_size); rgb = HexToRGB(r_titletext); titletext.R = rgb.R, titletext.G = rgb.G, titletext.B = rgb.B; | |
2926 | GetPrivateProfileString(APP_COLOURS, "optiText", "#FFFFFF", r_optiontext, 14, file, file_size); rgb = HexToRGB(r_optiontext);optiontext.R = rgb.R, optiontext.G = rgb.G, optiontext.B = rgb.B; | |
2927 | GetPrivateProfileString(APP_COLOURS, "selText", "#FF66FF", r_selectedtext, 14, file, file_size); rgb = HexToRGB(r_selectedtext); selectedtext.R = rgb.R, selectedtext.G = rgb.G, selectedtext.B = rgb.B; | |
2928 | GetPrivateProfileString(APP_COLOURS, "selBox", "#FFFFFF", r_selectionhi, 14, file, file_size); rgb = HexToRGB(r_selectionhi); selectionhi.R = rgb.R, selectionhi.G = rgb.G, selectionhi.B = rgb.B; | |
2929 | ||
2930 | open_button_1 = GetPrivateProfileInt(APP_SETTINGS, "bind1", 201, file, file_size); | |
2931 | open_button_2 = GetPrivateProfileInt(APP_SETTINGS, "bind2", 204, file, file_size); | |
2932 | GetPrivateProfileString(APP_SETTINGS, "menuPosX", "0.69299", menux, 14, file, file_size); menuPos.x = myAtof(menux); | |
2933 | GetPrivateProfileString(APP_SETTINGS, "menuPosY", "0", menuy, 14, file, file_size); menuPos.y = myAtof(menuy); | |
2934 | featureExcludeFriends = GetPrivateProfileBool(APP_SETTINGS, "exludFriends", "0", file, file_size); | |
2935 | featureExcludeCrew = GetPrivateProfileBool(APP_SETTINGS, "exludCrew", "0", file, file_size); | |
2936 | featureExcludeTeam = GetPrivateProfileBool(APP_SETTINGS, "exludTeam", "0", file, file_size); | |
2937 | featureExcludeModder = GetPrivateProfileBool(APP_SETTINGS, "exludModr", "0", file, file_size); | |
2938 | featureKickModders = GetPrivateProfileBool(APP_SETTINGS, "kickModders", "0", file, file_size); | |
2939 | snaplineToClients = GetPrivateProfileBool(APP_SETTINGS, "snapline_clients", "0", file, file_size); | |
2940 | featureTeleportWithNearPlayers = GetPrivateProfileBool(APP_SETTINGS, "tele_w_near_players", "0", file, file_size); | |
2941 | featureActivationSmoke = GetPrivateProfileBool(APP_SETTINGS, "activeSmoke", "1", file, file_size); | |
2942 | ||
2943 | font_title = GetPrivateProfileInt(APP_FONTS, "title", 7, file, file_size); | |
2944 | font_options = GetPrivateProfileInt(APP_FONTS, "options", 4, file, file_size); | |
2945 | font_selection = GetPrivateProfileInt(APP_FONTS, "selection", 4, file, file_size); | |
2946 | GetPrivateProfileString(APP_FONTS, "size", "0.41", sFontScale, 14, file, file_size); fontScale = myAtof(sFontScale); | |
2947 | } | |
2948 | ||
2949 | ||
2950 | ||
2951 | ||
2952 | //364 kick from apartment/ 5 params | |
2953 | int Var0[5]; | |
2954 | Var0[0] = 364; | |
2955 | Var0[1] = iSelectedPlayer; | |
2956 | Var0[2] = apartmentIdd; //apartment id | |
2957 | Var0[3] = 0; //0 | |
2958 | Var0[4] = 1; //0 | |
2959 | TriggerScriptEvent(Var0, 5, PLAYER_ID()); | |
2960 | ||
2961 | //0-n | |
2962 | //1-n | |
2963 | //2 - eclips towers | |
2964 | //3-n | |
2965 | //4- ecplis towers | |
2966 | //5- 3 alta st apt 10 | |
2967 | //6- 3 alta st apt 57 | |
2968 | //7- del perro heights apt 20 | |
2969 | //8- 1162 power st, apt 3 | |
2970 | //9- 0605 spanish ave, apt 1 | |
2971 | //10- 0604 las laganas blvd, apt 4 | |
2972 | //11- 0184 milton rd, apt 13 | |
2973 | //12- the royale, apy 19 | |
2974 | //13- 0504 s mo milton dr | |
2975 | //14- 0115 bay city ave, apy 45 | |
2976 | //15- 0325 south rockford dr | |
2977 | //16- dream tower, apt 15 | |
2978 | //17- 2143 las lagunas blvd, apt 9 | |
2979 | //18- 1561 san vitas st, apt 2 | |
2980 | //19- 0112 s rockford dr, apt 13 | |
2981 | //20- 2057 verpucci blcd, apt 1 | |
2982 | //21- 0069 couger ave, apt 19 | |
2983 | //22- 1237 prosperity st, apt 21 | |
2984 | //23- 115 blvd perro, apt 18 | |
2985 | ||
2986 | ||
2987 | int vVar0[3]; | |
2988 | vVar0[0] = 2; | |
2989 | vVar0[1] = iSelectedPlayer; | |
2990 | vVar0[2] = valueee; | |
2991 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
2992 | //vVar0[2] | |
2993 | //35 Name has activated their Brodcast app | |
2994 | //35 Name has deactivated their Brodcast app | |
2995 | ||
2996 | ||
2997 | ||
2998 | ||
2999 | ||
3000 | const int objectspawneritemCount = 11, objectspawnerlineCount = 19, objectspawneritemCountLastLine = objectspawneritemCount; | |
3001 | ||
3002 | int objectspawnerActiveLineIndex; | |
3003 | bool featureJurisdiction; | |
3004 | ||
3005 | ||
3006 | ||
3007 | ||
3008 | ||
3009 | ||
3010 | switch (selectedOption()) | |
3011 | { | |
3012 | case 0: break; | |
3013 | default: | |
3014 | AllWorldObjects[featureWorldObjectsSlot] = ObjectCreater(objectModelHashes[objectspawnerActiveLineIndex][Menu::currentop - 1]); | |
3015 | break; | |
3016 | } | |
3017 | ||
3018 | ||
3019 | ||
3020 | ||
3021 | ||
3022 | SetupDraw(); | |
3023 | SET_TEXT_FONT(0); | |
3024 | SET_TEXT_SCALE(0.0f, 0.31f); | |
3025 | SET_TEXT_JUSTIFICATION(2); | |
3026 | SET_TEXT_WRAP(0.0f, 0.2677f + menuPos.x); | |
3027 | SET_TEXT_CENTRE(0); | |
3028 | SET_TEXT_COLOUR(optioncount.R, optioncount.G, optioncount.B, optioncount.A); | |
3029 | ||
3030 | BEGIN_TEXT_COMMAND_DISPLAY_TEXT("CM_ITEM_COUNT"); | |
3031 | ADD_TEXT_COMPONENT_INTEGER(featureuseDefault ? currentop : (featureJurisdiction ? skinchangerActiveLineIndex + 1 : objectspawnerActiveLineIndex + 1)); // ! currentop_w_breaks | |
3032 | ADD_TEXT_COMPONENT_INTEGER(featureuseDefault ? totalop : (featureJurisdiction ? skinchangerlineCount : objectspawnerlineCount)); // ! totalop - totalbreaks | |
3033 | END_TEXT_COMMAND_DISPLAY_TEXT(0.2677f + menuPos.x, 0.13f + menuPos.y); | |
3034 | ||
3035 | ||
3036 | ||
3037 | ||
3038 | void AddXaxis(char *text, int toUse) | |
3039 | { | |
3040 | Menu::printingop++; | |
3041 | SetupDraw(0); | |
3042 | SET_TEXT_FONT(font_options); | |
3043 | SET_TEXT_COLOUR(optiontext.R, optiontext.G, optiontext.B, optiontext.A); | |
3044 | if (Menu::printingop == Menu::currentop) | |
3045 | { | |
3046 | navInstruction = 1; | |
3047 | featureuseDefault = 0; | |
3048 | SET_TEXT_FONT(font_selection); | |
3049 | SET_TEXT_COLOUR(selectedtext.R, selectedtext.G, selectedtext.B, selectedtext.A); | |
3050 | /*if (IsOptionPressed()) | |
3051 | { | |
3052 | ||
3053 | }*/ | |
3054 | } | |
3055 | ||
3056 | DrawString(text, ((float)Menu::printingop * 0.0900f - 0.0300), 0.300f); | |
3057 | switch (toUse) | |
3058 | { | |
3059 | case 0: | |
3060 | if (skinchangerActiveLineIndex == (skinchangerlineCount - 1)) | |
3061 | if ((int)Menu::currentop >= skinchangeritemCountLastLine) | |
3062 | Menu::currentop = 1; | |
3063 | ||
3064 | break; | |
3065 | case 1: | |
3066 | if (objectspawnerActiveLineIndex == (objectspawnerlineCount - 1)) | |
3067 | if ((int)Menu::currentop >= objectspawneritemCountLastLine) | |
3068 | Menu::currentop = 1; | |
3069 | break; | |
3070 | } | |
3071 | ||
3072 | } | |
3073 | ||
3074 | ||
3075 | ||
3076 | static void DetectJurisdiction(int scrollIndex, bool isSkinChanger) | |
3077 | { | |
3078 | if (isSkinChanger) | |
3079 | { | |
3080 | switch (scrollIndex) | |
3081 | { | |
3082 | case 0: | |
3083 | if (skinchangerActiveLineIndex == 0) | |
3084 | skinchangerActiveLineIndex = skinchangerlineCount; | |
3085 | skinchangerActiveLineIndex--; | |
3086 | PlaySoundFrontend_default("YES"); | |
3087 | break; | |
3088 | case 1: | |
3089 | skinchangerActiveLineIndex++; | |
3090 | if (skinchangerActiveLineIndex == skinchangerlineCount) | |
3091 | skinchangerActiveLineIndex = 0; | |
3092 | PlaySoundFrontend_default("YES"); | |
3093 | break; | |
3094 | case 2: | |
3095 | currentop++; | |
3096 | int itemsMax = (skinchangerActiveLineIndex == (skinchangerlineCount - 1)) ? skinchangeritemCountLastLine : skinchangeritemCount; | |
3097 | if (currentop == itemsMax) | |
3098 | currentop = 1; | |
3099 | PlaySoundFrontend_default("NAV_UP_DOWN"); | |
3100 | break; | |
3101 | case 3: | |
3102 | if (currentop == 1) | |
3103 | currentop = (skinchangerActiveLineIndex == (skinchangerlineCount - 1)) ? skinchangeritemCountLastLine : skinchangeritemCount; | |
3104 | currentop--; | |
3105 | PlaySoundFrontend_default("NAV_UP_DOWN"); | |
3106 | break; | |
3107 | } | |
3108 | } | |
3109 | else | |
3110 | { | |
3111 | switch (scrollIndex) | |
3112 | { | |
3113 | case 0: | |
3114 | if (objectspawnerActiveLineIndex == 0) | |
3115 | objectspawnerActiveLineIndex = objectspawnerlineCount; | |
3116 | objectspawnerActiveLineIndex--; | |
3117 | PlaySoundFrontend_default("YES"); | |
3118 | break; | |
3119 | case 1: | |
3120 | objectspawnerActiveLineIndex++; | |
3121 | if (objectspawnerActiveLineIndex == objectspawnerlineCount) | |
3122 | objectspawnerActiveLineIndex = 0; | |
3123 | PlaySoundFrontend_default("YES"); | |
3124 | break; | |
3125 | case 2: | |
3126 | currentop++; | |
3127 | int itemsMax2 = (objectspawnerActiveLineIndex == (objectspawnerlineCount - 1)) ? objectspawneritemCountLastLine : objectspawneritemCount; | |
3128 | if (currentop == itemsMax2) | |
3129 | currentop = 1; | |
3130 | PlaySoundFrontend_default("NAV_UP_DOWN"); | |
3131 | break; | |
3132 | case 3: | |
3133 | if (currentop == 1) | |
3134 | currentop = (objectspawnerActiveLineIndex == (objectspawnerlineCount - 1)) ? objectspawneritemCountLastLine : objectspawneritemCount; | |
3135 | currentop--; | |
3136 | PlaySoundFrontend_default("NAV_UP_DOWN"); | |
3137 | break; | |
3138 | } | |
3139 | } | |
3140 | } | |
3141 | ||
3142 | ||
3143 | ||
3144 | if (menu_up_pressed(1)) | |
3145 | { | |
3146 | if (featureuseDefault) | |
3147 | if (currentop == 1) Bottom(); else Up(); | |
3148 | else | |
3149 | DetectJurisdiction(0, featureJurisdiction); | |
3150 | } | |
3151 | ||
3152 | // Scroll down | |
3153 | if (menu_down_pressed(1)) | |
3154 | { | |
3155 | if (featureuseDefault) | |
3156 | if (currentop == totalop) Top(); else Down(); | |
3157 | else | |
3158 | DetectJurisdiction(1, featureJurisdiction); | |
3159 | } | |
3160 | ||
3161 | if (!featureuseDefault) | |
3162 | { | |
3163 | //Scroll right | |
3164 | if (IS_DISABLED_CONTROL_JUST_PRESSED(2, INPUT_SCRIPT_PAD_RIGHT)) | |
3165 | { | |
3166 | DetectJurisdiction(2, featureJurisdiction); | |
3167 | } | |
3168 | ||
3169 | //Scroll left | |
3170 | if (IS_DISABLED_CONTROL_JUST_PRESSED(2, INPUT_SCRIPT_PAD_LEFT)) | |
3171 | { | |
3172 | DetectJurisdiction(3, featureJurisdiction); | |
3173 | } | |
3174 | } | |
3175 | ||
3176 | ||
3177 | ||
3178 | ||
3179 | int Var0[2]; | |
3180 | Var0[0] = 52; | |
3181 | Var0[1] = iSelectedPlayer; | |
3182 | TriggerScriptEvent(Var0, 2, iSelectedPlayer); | |
3183 | ||
3184 | ||
3185 | int Var0[4]; | |
3186 | Var0[0] = 47; | |
3187 | Var0[1] = iSelectedPlayer; | |
3188 | Var0[2] = 1; | |
3189 | Var0[3] = valueee; //player | |
3190 | TriggerScriptEvent(Var0, 4, iSelectedPlayer); | |
3191 | ||
3192 | ||
3193 | int vVar0[3]; | |
3194 | vVar0[0] = 39; | |
3195 | vVar0[1] = iSelectedPlayer; | |
3196 | vVar0[2] = valueee; | |
3197 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3198 | ||
3199 | int Var0[4]; | |
3200 | Var0[0] = 49; | |
3201 | Var0[1] = iSelectedPlayer; | |
3202 | Var0[2] = valueee; | |
3203 | Var0[3] = valueee2; | |
3204 | TriggerScriptEvent(Var0, 4, iSelectedPlayer); | |
3205 | ||
3206 | int Var0[10]; | |
3207 | Var0[0] = 37; | |
3208 | Var0[1] = iSelectedPlayer; | |
3209 | Var0[2] = valueee2; //player2 | |
3210 | //Var0[3] = uParam2; | |
3211 | //Var0[4] = uParam0; | |
3212 | //Var0[5] = uParam3; | |
3213 | Var0[9] = 1; | |
3214 | Var0[6] = valueee; | |
3215 | //Var0[7] = uParam5; | |
3216 | Var0[8] = -1; | |
3217 | TriggerScriptEvent(Var0, 10, iSelectedPlayer); | |
3218 | ||
3219 | ||
3220 | int Var0[5]; | |
3221 | Var0[0] = 38; | |
3222 | Var0[1] = iSelectedPlayer; | |
3223 | Var0[2] = valueee; | |
3224 | Var0[3] = GET_TIME_DIFFERENCE(GET_NETWORK_TIME(), _GET_POSIX_TIME()); | |
3225 | Var0[4] = valueee2; | |
3226 | TriggerScriptEvent(Var0, 5, iSelectedPlayer); | |
3227 | ||
3228 | //invite | |
3229 | int Var0[2]; | |
3230 | Var0[0] = 32; | |
3231 | Var0[1] = iSelectedPlayer; | |
3232 | TriggerScriptEvent(Var0, 2, iSelectedPlayer); | |
3233 | ||
3234 | int Var0[5]; | |
3235 | Var0[0] = 50; | |
3236 | Var0[1] = iSelectedPlayer; | |
3237 | Var0[2] = valueee; | |
3238 | Var0[3] = valueee2; | |
3239 | Var0[4] = 0.0f;//vector coords | |
3240 | TriggerScriptEvent(Var0, 7, iSelectedPlayer); | |
3241 | ||
3242 | int Var0[2]; | |
3243 | Var0[0] = 51; | |
3244 | Var0[1] = iSelectedPlayer; | |
3245 | TriggerScriptEvent(Var0, 2, iSelectedPlayer); | |
3246 | ||
3247 | int Var0[2]; | |
3248 | Var0[0] = 33; | |
3249 | Var0[1] = iSelectedPlayer; | |
3250 | TriggerScriptEvent(Var0, 2, iSelectedPlayer); | |
3251 | ||
3252 | ||
3253 | int Var0[4]; | |
3254 | Var0[0] = 48; | |
3255 | Var0[1] = iSelectedPlayer; | |
3256 | Var0[2] = valueee; | |
3257 | Var0[3] = valueee2; | |
3258 | TriggerScriptEvent(Var0, 4, iSelectedPlayer); | |
3259 | ||
3260 | int Var1[2]; | |
3261 | Var1[0] = 200; | |
3262 | Var1[1] = iSelectedPlayer; | |
3263 | TriggerScriptEvent(Var1, 2, iSelectedPlayer); | |
3264 | ||
3265 | ||
3266 | int Var0[15]; | |
3267 | Var0[0] = 181; | |
3268 | Var0[1] = iSelectedPlayer; | |
3269 | Var0[2] = GlobalVariable::Read(1838493); | |
3270 | Var0[3] = GlobalVariable::Read(1838493 + 1); | |
3271 | Var0[4] = 0; | |
3272 | Var0[5] = GlobalVariable::Read(1838493 + 2); | |
3273 | Var0[8] = GlobalVariable::Read(1838493 + 5); | |
3274 | Var0[14] = GlobalVariable::Read(2399048 + 1 + 1481 + 13); | |
3275 | TriggerScriptEvent(Var0, 15, iSelectedPlayer); | |
3276 | ||
3277 | ||
3278 | int vVar0[3]; | |
3279 | vVar0[0] = 298; | |
3280 | vVar0[1] = iSelectedPlayer; | |
3281 | vVar0[2] = handle.netHandle; | |
3282 | TriggerScriptEvent(vVar0, 15, iSelectedPlayer); | |
3283 | ||
3284 | int vVar0[3]; | |
3285 | vVar0[0] = 353; | |
3286 | vVar0[1] = iSelectedPlayer; | |
3287 | vVar0[2] = valueee; | |
3288 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3289 | ||
3290 | ||
3291 | ||
3292 | int Var0[7]; | |
3293 | Var0[0] = 301; | |
3294 | Var0[1] = iSelectedPlayer; | |
3295 | Var0[2] = 24.2819f; | |
3296 | Var0[5] = 24.2819f; | |
3297 | Var0[6] = 24.2819f; | |
3298 | TriggerScriptEvent(Var0, 7, iSelectedPlayer); | |
3299 | ||
3300 | ||
3301 | ||
3302 | int Var0[17]; | |
3303 | Var0[2] = 3; | |
3304 | //Var0[2].imm_10 = 3; | |
3305 | Var0[0] = 7; | |
3306 | Var0[1] = iSelectedPlayer; | |
3307 | Var0[16] = valueee; | |
3308 | TriggerScriptEvent(Var0, 17, iSelectedPlayer); | |
3309 | ||
3310 | ||
3311 | int vVar0[3]; | |
3312 | vVar0[0] = 287; | |
3313 | vVar0[1] = iSelectedPlayer; | |
3314 | vVar0[2] = GlobalVariable::Read(2387551); //vector coords | |
3315 | TriggerScriptEvent(vVar0, 5, iSelectedPlayer); | |
3316 | ||
3317 | ||
3318 | int vVar0[3]; | |
3319 | //vVar0.imm_2.imm_14 = 10; | |
3320 | vVar0[0] = 297; | |
3321 | vVar0[1] = iSelectedPlayer; | |
3322 | vVar0[3] = handle.netHandle; | |
3323 | //vVar0.imm_2.imm_13 = 1; | |
3324 | //vVar0.imm_2.imm_14[0 <2>] = uParam0; | |
3325 | //vVar0.imm_2.imm_14[0 <2>].imm_1 = uParam1; | |
3326 | TriggerScriptEvent(vVar0, 37, iSelectedPlayer) | |
3327 | ||
3328 | ||
3329 | int vVar0[3]; | |
3330 | vVar0[1] = iSelectedPlayer; | |
3331 | vVar0[0] = 298; | |
3332 | vVar0[2] = handle.netHandle; | |
3333 | TriggerScriptEvent(vVar0, 15, iSelectedPlayer); | |
3334 | ||
3335 | int Var0[11]; | |
3336 | Var0[0] = 304; | |
3337 | Var0[1] = iSelectedPlayer; | |
3338 | Var0[2] = 0; | |
3339 | Var0[3] = 1; | |
3340 | Var0[4] = 0; | |
3341 | Var0[5] = 0; | |
3342 | Var0[6] = 0; | |
3343 | Var0[7] = 0; | |
3344 | Var0[8] = 0; | |
3345 | Var0[9] = 0; | |
3346 | Var0[10] = 0; | |
3347 | TriggerScriptEvent(Var0, 11, iSelectedPlayer); | |
3348 | ||
3349 | ||
3350 | int Var0[2]; | |
3351 | Var0[0] = 228; | |
3352 | Var0[1] = iSelectedPlayer; | |
3353 | TriggerScriptEvent(Var0, 2, iSelectedPlayer); | |
3354 | ||
3355 | ||
3356 | int vVar0[3]; | |
3357 | vVar0[0] = 158; | |
3358 | vVar0[1] = iSelectedPlayer; | |
3359 | int uVar0; | |
3360 | SET_BIT(&uVar0, iSelectedPlayer); | |
3361 | vVar0[2] = valueee; //valueee | |
3362 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3363 | ||
3364 | ||
3365 | int vVar0[3]; | |
3366 | int iVar2; | |
3367 | int iVar3; | |
3368 | int iVar4; | |
3369 | vVar0[0] = 308; | |
3370 | vVar0[1] = iSelectedPlayer; | |
3371 | NETWORK_GET_LOCAL_HANDLE(&handle.netHandle, 13); | |
3372 | vVar0[2] = handle.netHandle; | |
3373 | //iVar4 = 0; | |
3374 | //set_bit(&iVar4, 0); | |
3375 | //vVar0.imm_2.imm_13 = iVar4; | |
3376 | //vVar0.imm_2.imm_19 = 1; | |
3377 | //vVar0.imm_2.imm_20 = 1; | |
3378 | //vVar0.imm_2.imm_14 = func_818(player_id()); | |
3379 | //StringCopy(&vVar0.imm_2.imm_15, "", 16); | |
3380 | TriggerScriptEvent(vVar0, 23, iSelectedPlayer); | |
3381 | ||
3382 | ||
3383 | //joined a job | |
3384 | _debuging Var00; | |
3385 | //int Var0[19]; | |
3386 | Var00.var = 162; | |
3387 | Var00.var1 = iSelectedPlayer; | |
3388 | Var00.var2 = GlobalVariable::GetString(2378444 + 2); //string param | |
3389 | Var00.var18 = GlobalVariable::Read(2378444 + 18); | |
3390 | int uVar0; | |
3391 | SET_BIT(&uVar0, iSelectedPlayer); | |
3392 | TRIGGER_SCRIPT_EVENT2(1, &Var00, 19, uVar0); | |
3393 | ||
3394 | ||
3395 | int vVar0[3]; | |
3396 | vVar0[0] = 352; | |
3397 | vVar0[1] = iSelectedPlayer; | |
3398 | vVar0[2] = valueee; | |
3399 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3400 | ||
3401 | ||
3402 | int Var0[2]; | |
3403 | Var0[0] = 350; | |
3404 | Var0[1] = iSelectedPlayer; | |
3405 | TriggerScriptEvent(Var0, 2, iSelectedPlayer); | |
3406 | ||
3407 | ||
3408 | int Var0[7]; | |
3409 | Vector3 t, t2; | |
3410 | t.x = 100.0; | |
3411 | t.y = 50.0; | |
3412 | t.z = 20.0; | |
3413 | t2.x = 0.0f; | |
3414 | t2.y = 0.0f; | |
3415 | t2.z = 180.0f; | |
3416 | Var0[0] = 349; | |
3417 | Var0[1] = iSelectedPlayer; | |
3418 | Var0[2] = valueee; | |
3419 | //Var0[3] = (int)t; //cords | |
3420 | //Var0[6] = (int)t2; //offset | |
3421 | TriggerScriptEvent(Var0, 9, iSelectedPlayer); | |
3422 | ||
3423 | ||
3424 | int Var0[2]; | |
3425 | Var0[0] = 348; | |
3426 | Var0[1] = iSelectedPlayer; | |
3427 | TriggerScriptEvent(Var0, 2, iSelectedPlayer); | |
3428 | ||
3429 | ||
3430 | int Var0[2]; | |
3431 | Var0[0] = 351; | |
3432 | Var0[1] = iSelectedPlayer; | |
3433 | TriggerScriptEvent(Var0, 2, iSelectedPlayer); | |
3434 | ||
3435 | ||
3436 | int Var0[2]; | |
3437 | Var0[0] = 346; | |
3438 | Var0[1] = iSelectedPlayer; | |
3439 | TriggerScriptEvent(Var0, 2, iSelectedPlayer); | |
3440 | ||
3441 | int Var0[6]; | |
3442 | Var0[0] = 347; | |
3443 | Var0[1] = iSelectedPlayer; | |
3444 | Var0[2] = GlobalVariable::Read(2415231); | |
3445 | Var0[3] = GlobalVariable::Read(2415232); | |
3446 | Var0[4] = GET_STREAM_PLAY_TIME(); | |
3447 | Var0[5] = valueee; //player | |
3448 | TriggerScriptEvent(Var0, 6, iSelectedPlayer); | |
3449 | ||
3450 | ||
3451 | ||
3452 | typedef struct | |
3453 | { | |
3454 | /*int vVar0[3]; | |
3455 | vVar0[0] = 298; | |
3456 | vVar0[1] = iSelectedPlayer; | |
3457 | vVar0[2] = handle;*/ | |
3458 | int arg; | |
3459 | int player; | |
3460 | networkHandleMgr netHandle; | |
3461 | } _noonon; | |
3462 | typedef struct | |
3463 | { | |
3464 | /*int vVar0[3]; | |
3465 | vVar0[0] = 287; | |
3466 | vVar0[1] = iSelectedPlayer; | |
3467 | vVar0[2] = { vParam0 }; | |
3468 | */ | |
3469 | int arg; | |
3470 | int player; | |
3471 | Vector3 coords; | |
3472 | } _ceinema; | |
3473 | typedef struct | |
3474 | { | |
3475 | int p0; | |
3476 | int p1; | |
3477 | int p2; | |
3478 | float p3; | |
3479 | int p4; | |
3480 | int p5; | |
3481 | int p6; | |
3482 | int p7; | |
3483 | int p8; | |
3484 | int p9; | |
3485 | int p10; | |
3486 | int p11; | |
3487 | int p12; | |
3488 | int p13; | |
3489 | } unknown; | |
3490 | typedef struct | |
3491 | { | |
3492 | Vector3 p0; | |
3493 | int p1; | |
3494 | int p2; | |
3495 | float p3; | |
3496 | int p4; | |
3497 | int p5; | |
3498 | int p6; | |
3499 | int p7; | |
3500 | int p8; | |
3501 | int p9; | |
3502 | int p10; | |
3503 | int p11; | |
3504 | int p12; | |
3505 | int p13; | |
3506 | int p14; | |
3507 | int p15; | |
3508 | int p16; | |
3509 | int p17; | |
3510 | int p18; | |
3511 | int p19; | |
3512 | int p20; | |
3513 | int p21; | |
3514 | int p22; | |
3515 | int p23; | |
3516 | int p24; | |
3517 | int p25; | |
3518 | int p26; | |
3519 | int p27; | |
3520 | int p28; | |
3521 | int p29; | |
3522 | int p30; | |
3523 | int p31; | |
3524 | int p32; | |
3525 | int p33; | |
3526 | int p34; | |
3527 | int p35; | |
3528 | int p36; | |
3529 | int p37; | |
3530 | int p38; | |
3531 | int p39; | |
3532 | int p40; | |
3533 | int p41; | |
3534 | int p42; | |
3535 | int p43; | |
3536 | } l_struct; | |
3537 | typedef struct | |
3538 | { | |
3539 | /*Var0[0] = 301; | |
3540 | Var0[1] = iSelectedPlayer; | |
3541 | Var0[2] = { vParam0 }; //coords | |
3542 | Var0[5] = uParam1; //vector3 | |
3543 | Var0[6] = uParam2; //struct | |
3544 | */ | |
3545 | int arg; | |
3546 | int player; | |
3547 | Vector3 coords; | |
3548 | int unk; | |
3549 | int unk2; | |
3550 | Vector3 rot; | |
3551 | l_struct _struct; | |
3552 | } thisStructMain; | |
3553 | ||
3554 | ||
3555 | ||
3556 | //217 | |
3557 | //set globals to increase value | |
3558 | /* int max_value = 50000; | |
3559 | int Global_262145_f_4814 = GlobalVariable::Get(Global_262145 + 4814); | |
3560 | printf("Global_262145_f_4814: %i\n", Global_262145_f_4814); | |
3561 | ||
3562 | int Global_2097152 = GlobalVariable::Get(2097152 + (iSelectedPlayer * 7586) + 5327 + 678); | |
3563 | printf("Global_2097152: %i\n", Global_2097152); | |
3564 | ||
3565 | GlobalVariable::Write(Global_262145 + 4814, max_value + Global_2097152); | |
3566 | ||
3567 | GlobalVariable::Write(2097152 + (iSelectedPlayer * 7586) + 5327 + 678, Global_2097152 + max_value); | |
3568 | */ | |
3569 | ||
3570 | int max_value = 50000; | |
3571 | int Global_262145_f_4814 = GlobalVariable::Get(Global_262145 + 4814); | |
3572 | printf("Global_262145_f_4814: %i\n", Global_262145_f_4814); | |
3573 | ||
3574 | int Global_2097152 = GlobalVariable::Get(2097152 + (iSelectedPlayer* 7586) + 5327 + 678); | |
3575 | printf("Global_2097152: %i\n", Global_2097152); | |
3576 | ||
3577 | ||
3578 | GlobalVariable::Write(Global_262145 + 4814, max_value/*max_value + Global_2097152*/); | |
3579 | ||
3580 | ||
3581 | GlobalVariable::Write(Global_1581767 + (iSelectedPlayer* 306) + 178 + 4, max_value); | |
3582 | int global_02 = GlobalVariable::Get(Global_1581767 + (iSelectedPlayer* 306) + 178 + 3) + max_value; | |
3583 | ||
3584 | GlobalVariable::Write(Global_1581767 + (iSelectedPlayer*306) + 178 + 3, global_02); | |
3585 | ||
3586 | //GlobalVariable::Write(2097152 + (iSelectedPlayer* 7586) + 5327 + 678, Global_2097152 + max_value); | |
3587 | ||
3588 | int vVar0[3]; | |
3589 | vVar0[0] = 219; | |
3590 | vVar0[1] = iSelectedPlayer; | |
3591 | vVar0[2] = 9999; | |
3592 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3593 | ||
3594 | ||
3595 | int Var0[2]; | |
3596 | Var0[0] = 311; | |
3597 | Var0[1] = iSelectedPlayer; | |
3598 | TriggerScriptEvent(Var0, 2, iSelectedPlayer); | |
3599 | ||
3600 | //55 | |
3601 | int Var0[7]; | |
3602 | Var0[0] = 55; | |
3603 | Var0[1] = iSelectedPlayer; | |
3604 | Var0[4] = 0; | |
3605 | Var0[5] = 0; | |
3606 | Var0[2] = (float)0.0f; | |
3607 | Var0[3] = 0; | |
3608 | Var0[6] = 1; | |
3609 | TriggerScriptEvent(Var0, 7, iSelectedPlayer); | |
3610 | ||
3611 | ||
3612 | ||
3613 | int Var1[2]; | |
3614 | Var1[0] = 200; | |
3615 | Var1[1] = iSelectedPlayer; | |
3616 | TriggerScriptEvent(Var1, 2, iSelectedPlayer); | |
3617 | ||
3618 | ||
3619 | int Var0[4]; | |
3620 | Var0[0] = 237; | |
3621 | Var0[1] = iSelectedPlayer; | |
3622 | Var0[2] = 1; //0 | |
3623 | Var0[3] = 0; //99999 | |
3624 | //iParam3 = iParam3; | |
3625 | //(uParam4[0 *80])->f_6 = (uParam4[0 *80])->f_6; | |
3626 | TriggerScriptEvent(Var0, 10, iSelectedPlayer); | |
3627 | ||
3628 | //vehicle | |
3629 | int vVar0[3]; | |
3630 | vVar0[0] = 353; | |
3631 | vVar0[1] = iSelectedPlayer; | |
3632 | vVar0[2] = myVeh; //entity | |
3633 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3634 | ||
3635 | ||
3636 | //prostitut | |
3637 | int Var0[2]; | |
3638 | Var0[0] = 228; | |
3639 | Var0[1] = iSelectedPlayer; | |
3640 | TriggerScriptEvent(Var0, 2, iSelectedPlayer); | |
3641 | ||
3642 | // | |
3643 | int Var0[2]; | |
3644 | Var0[0] = 192; | |
3645 | Var0[1] = iSelectedPlayer; | |
3646 | GlobalVariable::Write(Global_2394218 + 2808, 1); | |
3647 | TriggerScriptEvent(Var0, 2, iSelectedPlayer); | |
3648 | ||
3649 | ||
3650 | int vVar0[3]; | |
3651 | vVar0[0] = 158; | |
3652 | vVar0[1] = iSelectedPlayer; | |
3653 | vVar0[2] = 999; | |
3654 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3655 | ||
3656 | ||
3657 | ||
3658 | ||
3659 | //main transation | |
3660 | networkHandleMgr handle; | |
3661 | NETWORK_HANDLE_FROM_PLAYER(iSelectedPlayer, &handle.netHandle, 13); | |
3662 | _noonon netMain; | |
3663 | netMain.arg = 298; | |
3664 | netMain.player = iSelectedPlayer; | |
3665 | netMain.netHandle = handle; | |
3666 | TriggerScriptEvent(vVar0, 15, iSelectedPlayer); | |
3667 | ||
3668 | ||
3669 | ||
3670 | //cinema | |
3671 | _ceinema tv; | |
3672 | tv.arg = 287; | |
3673 | tv.player = iSelectedPlayer; | |
3674 | tv.coords = GET_ENTITY_COORDS(playerPed, 1); | |
3675 | TriggerScriptEvent(&tv, 5, iSelectedPlayer); | |
3676 | ||
3677 | ||
3678 | ||
3679 | unknown unk_t; | |
3680 | unk_t.p3 = 1125515264; | |
3681 | unk_t.p4 = 1; | |
3682 | unk_t.p5 = 1; | |
3683 | unk_t.p7 = 1082130432; | |
3684 | unk_t.p8 = 1; | |
3685 | unk_t.p11 = 1; | |
3686 | unk_t.p3 = 50.0f; | |
3687 | unk_t.p4 = 0; | |
3688 | unk_t.p5 = 0; | |
3689 | unk_t.p8 = 1; //1 or 0 | |
3690 | unk_t.p9 = 1; //1 or 0 | |
3691 | unk_t.p10 = 1; | |
3692 | unk_t.p11 = 1; //true or false | |
3693 | unk_t.p12 = 1; | |
3694 | ||
3695 | ||
3696 | l_struct m_lstruct; | |
3697 | m_lstruct.p6 = 1082130432; | |
3698 | m_lstruct.p7 = 1176255488; | |
3699 | m_lstruct.p8 = 1; | |
3700 | m_lstruct.p10 = 1; | |
3701 | m_lstruct.p13 = 1; | |
3702 | m_lstruct.p15 = 1; | |
3703 | m_lstruct.p16 = 1; | |
3704 | m_lstruct.p31 = 1; | |
3705 | m_lstruct.p43 = 1123024896; | |
3706 | m_lstruct.p9 = 1; | |
3707 | m_lstruct.p3 = 7.0f; | |
3708 | m_lstruct.p10 = unk_t.p4; //all unk_t should be pointer to struct like: unk_t-> | |
3709 | m_lstruct.p4 = unk_t.p0; | |
3710 | m_lstruct.p13 = unk_t.p1; | |
3711 | m_lstruct.p5 = unk_t.p3; | |
3712 | m_lstruct.p15 = unk_t.p5; | |
3713 | m_lstruct.p11 = unk_t.p6; | |
3714 | m_lstruct.p6 = unk_t.p7; | |
3715 | m_lstruct.p16 = unk_t.p8; | |
3716 | m_lstruct.p17 = unk_t.p9; | |
3717 | m_lstruct.p0 = NewVector3(0.0f, 0.0f, 0.0f); //rot | |
3718 | m_lstruct.p12 = 1; | |
3719 | m_lstruct.p34 = GlobalVariable::Read(2097152 + (iSelectedPlayer * 7586) + (1865 * 100) + 42); //hash | iSelectedPlayer should be 0 | |
3720 | m_lstruct.p31 = unk_t.p11; | |
3721 | m_lstruct.p30 = 1; | |
3722 | m_lstruct.p42 = unk_t.p12; | |
3723 | ||
3724 | thisStructMain _t_main; | |
3725 | _t_main.arg = 301; | |
3726 | _t_main.player = 0; | |
3727 | _t_main.coords = GET_ENTITY_COORDS(playerPed, 1); | |
3728 | _t_main.unk = 0; | |
3729 | _t_main.unk2 = 0; | |
3730 | _t_main.rot = NewVector3(0.0f, 0.0f, 0.0f); | |
3731 | _t_main._struct = m_lstruct; | |
3732 | TriggerScriptEvent(Var0, 7, iSelectedPlayer); | |
3733 | ||
3734 | ||
3735 | //patched | |
3736 | if (individualPlayer[i].featurePutBadSport) | |
3737 | { | |
3738 | int Var0[4]; | |
3739 | Var0[0] = 312; | |
3740 | Var0[1] = i; | |
3741 | Var0[2] = INT_MAX; //amount | |
3742 | Var0[3] = 0; //Global_2404083 | |
3743 | TriggerScriptEvent(Var0, 4, i); | |
3744 | } | |
3745 | ||
3746 | ||
3747 | //money | |
3748 | int vVar0[3]; | |
3749 | vVar0[0] = 219; | |
3750 | vVar0[1] = iSelectedPlayer; | |
3751 | vVar0[2] = 12345; | |
3752 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3753 | ||
3754 | ||
3755 | //mental state | |
3756 | int Param0[9]; | |
3757 | Param0[0] = 0; | |
3758 | Param0[1] = iSelectedPlayer; | |
3759 | Param0[2] = 135; | |
3760 | TriggerScriptEvent(Param0, 9, iSelectedPlayer); | |
3761 | ||
3762 | //off radar | |
3763 | int vVar0[3]; | |
3764 | vVar0[0] = 358; | |
3765 | vVar0[1] = iSelectedPlayer; | |
3766 | vVar0[2] = 59; | |
3767 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3768 | ||
3769 | ||
3770 | ||
3771 | //func_3619(func_6(1, 1), 1, iParam0, 1); | |
3772 | ||
3773 | //offradar | |
3774 | int Var0[6]; | |
3775 | Var0[0] = 288; | |
3776 | Var0[1] = iSelectedPlayer; | |
3777 | Var0[3] = 1; | |
3778 | Var0[5] = 1; | |
3779 | Var0[2] = iSelectedPlayer; | |
3780 | ||
3781 | //Global_2399048 + 2415 + (Var0 + 3) = 0; | |
3782 | //Global_2399048 + 2415 + 39 + (1 * 2), 1, 0); | |
3783 | //Global_2399048 + 2415 + 232 = network_get_host_of_script("Freemode", -1, 0); | |
3784 | ||
3785 | GlobalVariable::Write(Global_2410912 + 4054 + 1, 0); | |
3786 | GlobalVariable::Write(Global_2410912 + 4054 + 2, 59); //time | |
3787 | TriggerScriptEvent(Var0, 6, iSelectedPlayer); | |
3788 | ||
3789 | ||
3790 | //offradar | |
3791 | int Var02[4]; | |
3792 | Var02[0] = 289; | |
3793 | Var02[1] = iSelectedPlayer; | |
3794 | Var02[3] = 1; | |
3795 | Var02[2] = GlobalVariable::Read(Global_2410912 + 4054); | |
3796 | GlobalVariable::Write(2399048 + 2415 + 235 + (1 * 4), 1); | |
3797 | GlobalVariable::Write(2399048 + 2415 + 235 + (1 * 4) + 1, 59); //time | |
3798 | ||
3799 | //GlobalVariable::Write(2399048 + 2415 + 39 + (1 * 2), 0); | |
3800 | GlobalVariable::Write(Global_2410912 + 4054 + 2, 0); | |
3801 | TriggerScriptEvent(Var02, 6, iSelectedPlayer); | |
3802 | ||
3803 | ||
3804 | ||
3805 | //offradar | |
3806 | int Var03[6]; | |
3807 | Var03[0] = 291; | |
3808 | Var03[1] = iSelectedPlayer; | |
3809 | Var03[3] = 1; | |
3810 | Var03[5] = 1; | |
3811 | Var03[4] = 1; | |
3812 | Var03[2] = 1; | |
3813 | TriggerScriptEvent(Var03, 6, iSelectedPlayer); | |
3814 | ||
3815 | //badsport | |
3816 | int vVar0[3]; | |
3817 | vVar0[0] = 2; | |
3818 | vVar0[1] = iSelectedPlayer; | |
3819 | vVar0[2] = valueee; | |
3820 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3821 | ||
3822 | ||
3823 | ||
3824 | ||
3825 | //commend | |
3826 | int Var0[6]; | |
3827 | Var0[0] = 288; | |
3828 | Var0[1] = iSelectedPlayer; | |
3829 | Var0[3] = 1; | |
3830 | Var0[5] = 1; | |
3831 | Var0[2] = 100; //value | |
3832 | //Global_2399048.f_2415[Var0.[3]] = 0; | |
3833 | //func_599(&(Global_2399048.f_2415.f_39[iParam1 /*2*/]), 1, 0); | |
3834 | //Global_2399048.f_2415.f_232 = network_get_host_of_script("Freemode", -1, 0); | |
3835 | ||
3836 | //Global_2410912.f_4054.f_1 = 0; | |
3837 | //func_599(&(Global_2410912.f_4054.f_2), 0, 0); | |
3838 | TriggerScriptEvent(Var0, 6, iSelectedPlayer); | |
3839 | ||
3840 | ||
3841 | //commend2 | |
3842 | //288 | |
3843 | //259 | |
3844 | //279 - unk | |
3845 | ||
3846 | int vVar0[3]; | |
3847 | vVar0[0] = 2; | |
3848 | vVar0[1] = iSelectedPlayer; | |
3849 | vVar0[2] = 37; //helpful commend | 26 | 54 | |
3850 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3851 | ||
3852 | ||
3853 | ||
3854 | ||
3855 | ||
3856 | //delete or lock personal vehicle | |
3857 | int vVar0[3]; | |
3858 | vVar0[0] = 56; | |
3859 | vVar0[1] = 0; | |
3860 | vVar0[2] = 0; | |
3861 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3862 | ||
3863 | //unknown | |
3864 | int vVar0[3]; | |
3865 | vVar0[0] = 302; | |
3866 | vVar0[1] = iSelectedPlayer; | |
3867 | vVar0[2] = 0; | |
3868 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3869 | ||
3870 | //remove wanted level | |
3871 | int vVar0[2]; | |
3872 | vVar0[0] = 356; | |
3873 | vVar0[1] = iSelectedPlayer; | |
3874 | TriggerScriptEvent(vVar0, 2, iSelectedPlayer); | |
3875 | ||
3876 | //roller coster | |
3877 | int args[2]; | |
3878 | args[0] = 346; | |
3879 | args[1] = 0; //unknown | |
3880 | TriggerScriptEvent(args, 2, iSelectedPlayer); | |
3881 | ||
3882 | //betting money | |
3883 | int Var1[2]; | |
3884 | Var1[0] = 200; | |
3885 | Var1[1] = iSelectedPlayer; | |
3886 | TriggerScriptEvent(Var1, 2, iSelectedPlayer); | |
3887 | ||
3888 | //switch mission blips | |
3889 | int vVar0[3]; | |
3890 | vVar0[0] = 365; | |
3891 | vVar0[1] = iSelectedPlayer; | |
3892 | vVar0[2] = 1; | |
3893 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3894 | ||
3895 | ||
3896 | //358 off the radar | |
3897 | int vVar0[3]; | |
3898 | vVar0[0] = 358; | |
3899 | vVar0[1] = PLAYER_ID(); | |
3900 | vVar0[2] = 50; //time | |
3901 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3902 | ||
3903 | //41 death match notifaction/from me | |
3904 | int Var0[6]; | |
3905 | Var0[0] = 41; | |
3906 | Var0[1] = PLAYER_ID(); | |
3907 | Var0[3] = 1; //last or current vehicle active | |
3908 | Var0[5] = 1; //some kind of return stat value | |
3909 | TriggerScriptEvent(Var0, 6, iSelectedPlayer); | |
3910 | ||
3911 | ||
3912 | ||
3913 | //288/289 bullshark | |
3914 | int Var0[6]; | |
3915 | Var0[0] = 288; | |
3916 | Var0[1] = iSelectedPlayer; | |
3917 | Var0[3] = 1; | |
3918 | Var0[5] = 1; | |
3919 | Var0[2] = iSelectedPlayer; //player 2 | |
3920 | TriggerScriptEvent(Var0, 6, iSelectedPlayer); | |
3921 | ||
3922 | ||
3923 | //close interaction menu/paused 259 | |
3924 | int vVar0[3]; | |
3925 | vVar0[0] = 259; | |
3926 | vVar0[1] = iSelectedPlayer; | |
3927 | vVar0[2] = 0; | |
3928 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
3929 | ||
3930 | //false leave | |
3931 | int var0[3]; | |
3932 | var0[0] = 203; | |
3933 | var0[1] = iSelectedPlayer; | |
3934 | var0[2] = 100000; | |
3935 | TriggerScriptEvent(&ride, 3, iSelectedPlayer); | |
3936 | ||
3937 | ||
3938 | int var0[3]; | |
3939 | var0[0] = 27; | |
3940 | var0[1] = iSelectedPlayer; | |
3941 | var0[2] = 1; | |
3942 | TriggerScriptEvent(&ride, 3, iSelectedPlayer); | |
3943 | //arg/ 3 params | |
3944 | //1 fake leave | |
3945 | //27 notifacation sound | |
3946 | //30 bullshark started | |
3947 | //31 bullshark end | |
3948 | //56 request personal vehicle | |
3949 | //64 anon bounty | |
3950 | //67 empty notifaction | |
3951 | //151 fake leave | |
3952 | //161 remove blips | |
3953 | //162 RDR_LEAKS join Job. | |
3954 | //163 remove blips | |
3955 | //173 armour truck | |
3956 | //174 enable blips back | |
3957 | //300 insurance message | |
3958 | //312 hospital bill | |
3959 | //318 fake leave | |
3960 | //322 fake leave | |
3961 | //325 fave leave | |
3962 | ||
3963 | ||
3964 | typedef struct | |
3965 | { | |
3966 | int arg; | |
3967 | int player; | |
3968 | char *weather; | |
3969 | } onlineWeather; | |
3970 | ||
3971 | onlineWeather weather; | |
3972 | weather.arg = 16; | |
3973 | weather.player = iSelectedPlayer; | |
3974 | weather.weather = "BLIZZARD"; | |
3975 | TriggerScriptEvent(&weather, 3, iSelectedPlayer); | |
3976 | ||
3977 | ||
3978 | ||
3979 | //unlock all test | |
3980 | int Var0[9]; | |
3981 | ||
3982 | GlobalVariable::Write(1573885, 0); | |
3983 | Var0[0] = 199; | |
3984 | Var0[1] = PLAYER_ID(); | |
3985 | //Vector3 coords = GlobalVariable::Read(Global_2394218 + 2529); | |
3986 | //Var0[2] = coords; | |
3987 | Var0[6] = 0; | |
3988 | Var0[8] = IS_BIT_SET(GlobalVariable::Get(Global_1581767 + (PLAYER_ID() * 306) + 114), 0); | |
3989 | Var0[7] = GlobalVariable::Get(Global_1581767 + (PLAYER_ID() * 306) + 76 + 27); | |
3990 | //func_551(); | |
3991 | //func_555(vParam0.z); | |
3992 | //GlobalVariable::WriteVector3(Global_2394218 + 2529, coords); | |
3993 | char *prt = GlobalVariable::GetString(Global_2394218 + 2444 + 51); | |
3994 | strncpy(prt, 0, 64); | |
3995 | char *prt2 = GlobalVariable::GetString(Global_2394218 + 2444 + 67); | |
3996 | strncpy(prt2, 0, 64); | |
3997 | int iVar1 = GlobalVariable::Get(Global_2390201 + (PLAYER_ID() * 223) + 121 + 1); | |
3998 | int iVar2 = GlobalVariable::Get((Global_2390201 + (PLAYER_ID() * 223) + 121 + 1 + GlobalVariable::Get(Global_2390201 + (PLAYER_ID() * 223) + 121 + 1 + 1))); | |
3999 | ||
4000 | Var0[5] = ROUND(((TO_FLOAT(iVar1) / TO_FLOAT(iVar2)) * 100.0f)); | |
4001 | ||
4002 | if (Var0[5] <= 0) | |
4003 | { | |
4004 | Var0[5] = GET_RANDOM_INT_IN_RANGE(5, 100); | |
4005 | } | |
4006 | ||
4007 | //func_554(1); | |
4008 | TriggerScriptEvent(Var0, 9, PLAYER_ID()); | |
4009 | ||
4010 | ||
4011 | //unlock all 2 | |
4012 | int Var0[2]; | |
4013 | Var0[0] = 309; | |
4014 | Var0[1] = PLAYER_ID(); | |
4015 | TriggerScriptEvent(Var0, 2, PLAYER_ID()); | |
4016 | ||
4017 | ||
4018 | //unlock all 3 | |
4019 | int vVar0[3]; | |
4020 | vVar0[0] = 167; | |
4021 | vVar0[1] = PLAYER_ID(); | |
4022 | vVar0[2] = GlobalVariable::Get(2388295 + (PLAYER_ID() * 40) + 3 + 17); | |
4023 | TriggerScriptEvent(vVar0, 3, PLAYER_ID()); | |
4024 | ||
4025 | ||
4026 | ||
4027 | //earn from pickup | |
4028 | int Var0[4]; | |
4029 | Var0[0] = 44; | |
4030 | Var0[1] = iSelectedPlayer; | |
4031 | Var0[2] = iSelectedPlayer; //player 2 | |
4032 | Var0[3] = 100; //value | |
4033 | TriggerScriptEvent(Var0, 4, iSelectedPlayer); | |
4034 | ||
4035 | ||
4036 | ||
4037 | ||
4038 | //something | |
4039 | int vVar0[3]; | |
4040 | vVar0[0] = 43; | |
4041 | vVar0[1] = iSelectedPlayer; | |
4042 | vVar0[2] = iSelectedPlayer; //player 2 | |
4043 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
4044 | ||
4045 | ||
4046 | //somthing else | |
4047 | int Var0[19]; | |
4048 | //struct<20> Var1; | |
4049 | Var0[0] = 59; | |
4050 | Var0[1] = iSelectedPlayer; | |
4051 | int zeroo = 0; | |
4052 | int uVar56 = 0; | |
4053 | SET_BIT(&uVar56, zeroo); | |
4054 | ||
4055 | Var0[16] = uVar56; | |
4056 | Var0[2] = iSelectedPlayer; //player 2 | |
4057 | Var0[18] = GlobalVariable::Get(1572928 + 4 + (iSelectedPlayer * 3) + 1); | |
4058 | Var0[17] = 1; | |
4059 | Var0[3] = GlobalVariable::Get(2097152 + (zeroo * 7586) + 7168); | |
4060 | /*StringCopy(&Var1, get_player_name(player_id()), 32); | |
4061 | if (func_5666(iParam1, 0, 1)) | |
4062 | { | |
4063 | StringCopy(&(Var1.f_8), get_player_name(iParam1), 32); | |
4064 | } | |
4065 | Var1[16] = uParam3; | |
4066 | Var1[17] = iParam5; | |
4067 | Var1[18] = Global_1581767[player_id() * 306].f_178.f_6; | |
4068 | Var1[19] = iParam4; | |
4069 | _0x0B9A3512(&Param2); | |
4070 | _0x628F489B(&Var1);*/ | |
4071 | TriggerScriptEvent(Var0, 20, iSelectedPlayer); | |
4072 | ||
4073 | ||
4074 | //something idk | |
4075 | int Var0[2]; | |
4076 | Var0[0] = 204; | |
4077 | Var0[1] = iSelectedPlayer; | |
4078 | TriggerScriptEvent(Var0, 2, iSelectedPlayer); | |
4079 | ||
4080 | ||
4081 | //am_vehicle_spawn | |
4082 | int Var0[5]; | |
4083 | Var0[0] = 296; | |
4084 | Var0[1] = PLAYER_ID(); | |
4085 | Var0[2] = PLAYER_ID(); | |
4086 | Var0[3] = 5; //0 - through 5 | |
4087 | Var0[4] = VEHICLE_ADDER; | |
4088 | TriggerScriptEvent(Var0, 5, PLAYER_ID()); | |
4089 | ||
4090 | //am_vehicle_spawn | |
4091 | int Var0[5]; | |
4092 | Var0[0] = 295; | |
4093 | Var0[1] = PLAYER_ID(); | |
4094 | Var0[2] = PLAYER_ID(); | |
4095 | Var0[3] = 1; //0 - through 5 | |
4096 | Var0[4] = VEHICLE_ADDER; | |
4097 | TriggerScriptEvent(Var0, 5, PLAYER_ID()); | |
4098 | ||
4099 | ||
4100 | //undocumented events | |
4101 | //192 / crew awards unlock | |
4102 | //210 / promote or demote a crew member | |
4103 | //182 / crew left | |
4104 | //203 / kick from crew | |
4105 | //213 / set some crew var to true | |
4106 | ||
4107 | ||
4108 | ||
4109 | ||
4110 | if (featureForgeGun) | |
4111 | { | |
4112 | DISABLE_PLAYER_FIRING(PLAYER_ID(), 1); | |
4113 | if (IS_CONTROL_JUST_PRESSED(2, INPUT_FRONTEND_RT) && GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(PLAYER_ID(), &forge_entity) && DOES_ENTITY_EXIST(forge_entity)) { forge_target_locked = !forge_target_locked; if (IS_ENTITY_A_PED(forge_entity) && IS_PED_IN_ANY_VEHICLE(forge_entity, 1)) { forge_entity = GET_VEHICLE_PED_IS_IN(forge_entity, 0); } } | |
4114 | if (forge_target_locked) | |
4115 | { | |
4116 | if (RequestControlOfEnt(forge_entity)) | |
4117 | { | |
4118 | Vector3 min, max; | |
4119 | GET_MODEL_DIMENSIONS(GET_ENTITY_MODEL(forge_entity), &min, &max); | |
4120 | Vector3 camvf = get_coords_from_cam(featureForgeGunRange + max.y); | |
4121 | SET_ENTITY_COORDS_NO_OFFSET(forge_entity, camvf.x, camvf.y, camvf.z, 1, 1, 1); | |
4122 | if (IS_ENTITY_A_VEHICLE(forge_entity)) { SET_ENTITY_HEADING(forge_entity, GET_ENTITY_HEADING(PLAYER_PED_ID()) + 90.0f); } | |
4123 | } | |
4124 | } | |
4125 | else | |
4126 | { | |
4127 | if (DOES_ENTITY_EXIST(forge_entity)) | |
4128 | FREEZE_ENTITY_POSITION(forge_entity, 1); | |
4129 | } | |
4130 | } | |
4131 | ||
4132 | ||
4133 | ||
4134 | case 10: | |
4135 | ||
4136 | //featureClearAttachmentsNet = 1; | |
4137 | if (detachObjectsFromPlayerCurrentlyRunning == 0) | |
4138 | { | |
4139 | detachObjectsFromPlayerCurrentlyRunning = 1; | |
4140 | detachObjectsFromPlayerAddr = playerPedIter; | |
4141 | detachObjectsFromPlayerCurrentIndex = 0; | |
4142 | clearAttachmentsCallback(0); | |
4143 | } | |
4144 | break; | |
4145 | ||
4146 | ||
4147 | ||
4148 | ||
4149 | void nullFuncH(int handle) { return; } | |
4150 | void(*saveFunc)(int); | |
4151 | Entity featureClearEentity = 0, detachObjectsFromPlayerAddr = 0; | |
4152 | int featureClearAttamentTimeout = 0, detachObjectsFromPlayerCurrentIndex = 0; | |
4153 | bool featureClearAttachmentsNet = 0, detachObjectsFromPlayerCurrentlyRunning = 0; | |
4154 | ||
4155 | ||
4156 | void markEntityForDeletion(int ent, void(*handle)(int) = nullFuncH) | |
4157 | { | |
4158 | featureClearAttamentTimeout = 0; | |
4159 | featureClearEentity = ent; | |
4160 | featureClearAttachmentsNet = 1; | |
4161 | saveFunc = handle; | |
4162 | } | |
4163 | void clearAttachmentsCallback(Entity previousEntity) | |
4164 | { | |
4165 | CEntityPool *Entities = (CEntityPool*)*(unsigned int*)_entityPoolAddress; | |
4166 | if (detachObjectsFromPlayerCurrentIndex >= Entities->maxPoolSize) | |
4167 | { | |
4168 | detachObjectsFromPlayerCurrentlyRunning = 0; | |
4169 | return; | |
4170 | } | |
4171 | ||
4172 | poolEntity *ent = &Entities->getEntity(detachObjectsFromPlayerCurrentIndex); | |
4173 | while (true) | |
4174 | { | |
4175 | if (ent->isValid()) | |
4176 | { | |
4177 | int index = EntityToIndex(ent->addr); | |
4178 | if (GET_ENTITY_ATTACHED_TO(index) == detachObjectsFromPlayerAddr) | |
4179 | { | |
4180 | break; | |
4181 | } | |
4182 | } | |
4183 | detachObjectsFromPlayerCurrentIndex++; | |
4184 | if (detachObjectsFromPlayerCurrentIndex >= Entities->maxPoolSize) | |
4185 | { | |
4186 | detachObjectsFromPlayerCurrentlyRunning = 0; | |
4187 | return; | |
4188 | } | |
4189 | ent = &Entities->getEntity(detachObjectsFromPlayerCurrentIndex); | |
4190 | } | |
4191 | int entityIndex = EntityToIndex(ent->addr); | |
4192 | markEntityForDeletion(entityIndex, clearAttachmentsCallback); | |
4193 | detachObjectsFromPlayerCurrentIndex++; | |
4194 | } | |
4195 | ||
4196 | ||
4197 | ||
4198 | ||
4199 | ||
4200 | //use this to get the args that are getting past by other players to you, works similar to hooking the actual event function | |
4201 | void func_4() | |
4202 | { | |
4203 | //event num: 291, event num: 0, event num: 289 /off the radar | |
4204 | //arg struct 259 /join session | |
4205 | //event num: 244 /smoke bong | |
4206 | int iVar0; | |
4207 | int iVar1; | |
4208 | int iVar2[3]; | |
4209 | ||
4210 | int m_args[2]; | |
4211 | int m_args2[3]; | |
4212 | int m_args3[10]; | |
4213 | int m_args4[12]; | |
4214 | int m_args5[3]; | |
4215 | int m_args6[28]; | |
4216 | int m_args7[2]; | |
4217 | int m_args8[21]; | |
4218 | int m_args9[14]; | |
4219 | ||
4220 | iVar0 = 0; | |
4221 | while (iVar0 < GET_NUMBER_OF_EVENTS(1)) | |
4222 | { | |
4223 | iVar1 = GET_EVENT_AT_INDEX(1, iVar0); | |
4224 | ||
4225 | if (iVar1 == 166) //freemode | |
4226 | { | |
4227 | GET_EVENT_DATA(1, iVar0, iVar2, 3); | |
4228 | printf("arg: %i, arg2: %i, arg3: %i\n", iVar2[0], iVar2[1], iVar2[2]); | |
4229 | if (iVar2[0] == 312) | |
4230 | { | |
4231 | printf("badsport \n"); | |
4232 | } | |
4233 | } | |
4234 | if (iVar1 == 164) //main transition | |
4235 | { | |
4236 | GET_EVENT_DATA(1, iVar0, m_args, 3); | |
4237 | printf("main transition event args: 0x%X, arg2: 0x%X\n", m_args[0], m_args[1]); | |
4238 | } | |
4239 | if (iVar1 == 163)//main transition | |
4240 | { | |
4241 | GET_EVENT_DATA(1, iVar0, m_args2, 3); | |
4242 | printf("main transition2 event args: %i, arg2: 0x%X\n", m_args2[0], m_args2[1]); | |
4243 | } | |
4244 | if (iVar1 == 177) //freemode stats | |
4245 | { | |
4246 | GET_EVENT_DATA(1, iVar0, m_args3, 10); | |
4247 | printf("freemode stats: args: %i, arg2: %i, arg3: 0x%X, arg4: %i, arg5: 0x%X, arg6: %i, arg7: 0x%X, arg8: %i, arg9: 0x%X\n", m_args3[0], m_args3[1], m_args3[2], m_args3[3], m_args3[4], m_args3[5], m_args3[6], m_args3[7], m_args3[8], m_args3[9]); | |
4248 | } | |
4249 | if (iVar1 == 154) //main_presistent | admin kick | |
4250 | { | |
4251 | //func_1091 | |
4252 | GET_EVENT_DATA(1, iVar0, m_args5, 1); | |
4253 | printf("admin: arg: %i, arg2: %X, arg3: %i\n", m_args5[0], m_args5[1], m_args5[2]); | |
4254 | } | |
4255 | if (iVar1 == 192) //main_presistent | disable multiplayer | |
4256 | { | |
4257 | GET_EVENT_DATA(1, iVar0, m_args6, 28); | |
4258 | printf("dis multi: arg: %i, arg2: %i, arg3: %i, arg4: %i, arg5: %i\n", m_args6[0], m_args6[1], m_args6[2], m_args6[3], m_args6[4]); | |
4259 | } | |
4260 | if (iVar1 == 175) //main_presistent | session error | |
4261 | { | |
4262 | GET_EVENT_DATA(1, iVar0, m_args7, 2); | |
4263 | printf("session error: arg: %i, arg2: %i\n", m_args7[0], m_args7[1]); | |
4264 | } | |
4265 | if (iVar1 == 175) //main_presistent | new session | |
4266 | { | |
4267 | GET_EVENT_DATA(1, iVar0, m_args8, 21); | |
4268 | printf("new session: arg: %i, arg2: %i, arg3: %i, arg4: %i\n", m_args8[0], m_args8[1], m_args8[2], m_args8[3]); | |
4269 | } | |
4270 | if (iVar1 == 215) //main_presistent | dev kick | |
4271 | { | |
4272 | GET_EVENT_DATA(1, iVar0, m_args9, 14); | |
4273 | printf("dev kick: arg: %i, arg2: %i, arg3: %i, arg4: %i\n", m_args9[0], m_args9[1], m_args9[2], m_args9[3]); | |
4274 | } | |
4275 | if (iVar1 == 150) //freemode unlocks | |
4276 | { | |
4277 | //Var0.f_3 | |
4278 | //m_args4[3] = 88; //stat set int with global - Global_2428195 | |
4279 | //m_args4[4] = 34; //stat set bool with global - Global_2428460 | |
4280 | //m_args4[5] = 1; //stat set float with global - Global_1330608 | |
4281 | //m_args4[6] = 2949; //stat set int with global - Global_2417731 | |
4282 | //m_args4[7] = 228; //stat set bool with global - Global_2427264 | |
4283 | //m_args4[8] = 228; //stat set float with global - Global_2426579 | |
4284 | GET_EVENT_DATA(1, iVar0, m_args4, 12); | |
4285 | printf("freemode unlocks: args: 0x%X, arg2: 0x%X, arg3: %i, arg4: %i, arg5: 0x%X, arg6: %X, arg7: 0x%X, arg8: 0x%X, arg9: 0x%X\n", m_args4[0], m_args4[1], m_args4[2], m_args4[3], m_args4[4], m_args4[5], m_args4[6], m_args4[7], m_args4[8], m_args4[9]); | |
4286 | } | |
4287 | ||
4288 | iVar0++; | |
4289 | } | |
4290 | } | |
4291 | ||
4292 | ||
4293 | ||
4294 | ||
4295 | typedef struct | |
4296 | { | |
4297 | int arg; | |
4298 | int player; | |
4299 | int unknown; | |
4300 | int intStatAwards; // stat index of Global_2428195[index here][charater here] | |
4301 | int boolStatActivities; // stat index of Global_2428460[index here][charater here] | |
4302 | int floatStatTempAward; // stat index of Global_1330608[index here][charater here] | |
4303 | int intStatCareer; // stat index of Global_2417731[index here][charater here] | |
4304 | int boolStatWeapons; // stat index of Global_2427264[index here][charater here] | |
4305 | int floatStatVehicles; // stat index of Global_2426579[index here][charater here] | |
4306 | int intStatSet; // stat set int value | |
4307 | float floatStatSet; // stat set float value | |
4308 | bool boolStatSet; // stat set bool value | |
4309 | ||
4310 | /*//variables below are not used in this struct, they are just here for documentation, These stats below are not used by trigger script event native | |
4311 | ||
4312 | //used by scripts but not used by trigger script event native | |
4313 | int stringStatGerneral; // stat index of Global_2427949[index here][charater here] | |
4314 | ||
4315 | //used by scripts but not used by trigger script event native | |
4316 | int gxtLabelStatMission; // stat index of Global_1330501[index here][charater here] | this could possible wrong, but gxt label stat seems about correct becuase of the order they come in | |
4317 | ||
4318 | //used in script but I'm not sure if it's used by trigger script event native | |
4319 | int dateStatAward; // stat index of Global_2428010[index here][charater here] | |
4320 | ||
4321 | //used in script but I'm not sure if it's used by trigger script event native | |
4322 | int PosStat; // stat index of Global_2428116[index here][charater here] | |
4323 | ||
4324 | //used in script but I'm not sure if it's used by trigger script event native | |
4325 | int useridStat; // stat index of Global_1330505[index here][charater here] | |
4326 | ||
4327 | //used in script but I'm not sure if it's used by trigger script event native | |
4328 | int intStatmpplyMiscAwards; // stat index of Global_1330616[index here] | |
4329 | ||
4330 | //used by scripts but not used by trigger script event native | |
4331 | int floatStatmpply; // stat index of Global_1330622[index here] | |
4332 | ||
4333 | //used in script but I'm not sure if it's used by trigger script event native | |
4334 | int boolStatmpply; // stat index of Global_1330624[index here] | |
4335 | ||
4336 | //used by scripts but not used by trigger script event native | |
4337 | int unknownTypeStatmpply; // stat index of Global_1330636[index here] | |
4338 | */ | |
4339 | } mp_client_stats; | |
4340 | ||
4341 | ||
4342 | ||
4343 | mp_client_stats stat; | |
4344 | stat.arg = 150; | |
4345 | stat.player = iSelectedPlayer; | |
4346 | stat.unknown = iSelectedPlayer; | |
4347 | stat.intStatAwards = 88; | |
4348 | stat.boolStatActivities = 34; | |
4349 | stat.floatStatTempAward = 1; | |
4350 | stat.intStatCareer = 2949; | |
4351 | stat.boolStatWeapons = 288; | |
4352 | stat.floatStatVehicles = 288; | |
4353 | stat.intStatSet = 0; | |
4354 | stat.floatStatSet = 0; | |
4355 | stat.boolStatSet = 0; | |
4356 | ||
4357 | ||
4358 | //now set stat becuase that's what scrips do | |
4359 | //set 500 super heavy armour to player | |
4360 | stat.intStatCareer = 1867; //Global_2417731[1867 /*3*/][0] = joaat("mp0_mp_char_armour_5_count"); | |
4361 | stat.intStatSet = 500; | |
4362 | ||
4363 | //set player rp | rank 120 | |
4364 | //stat.intStatCareer = 626; //Global_2417731[626 /*3*/][0] = joaat("mp0_char_xp_fm"); | |
4365 | //stat.intStatSet = 2017150; //rp for rank 120 | |
4366 | ||
4367 | ||
4368 | //set admin rp to them | rank 120 | |
4369 | //stat.intStatCareer = 1868; //Global_2417731[1868 /*3*/][0] = joaat("mp0_char_set_rp_gift_admin"); | |
4370 | //stat.intStatSet = 2017150; //rp for rank 120 | |
4371 | ||
4372 | ||
4373 | TriggerScriptEvent(&stat, 12, iSelectedPlayer); | |
4374 | ||
4375 | ||
4376 | ||
4377 | ||
4378 | ||
4379 | ||
4380 | 0x1C6C530 NETWORK_INCREMENT_STAT_EVENT | |
4381 | 0x12D137C NETWORK_INCREMENT_STAT_FUNC | |
4382 | ||
4383 | //GAME_EXPORT int 0x12D141C(int32_t a1, int32_t a2, int32_t a3); | |
4384 | ||
4385 | //0x12D141C(0xdafb10f9, dword, dword); //hash = mpply_friendly | |
4386 | ||
4387 | /* | |
4388 | 0x12D141C follow this address back to 0xC3FA0 | |
4389 | 0xC3FA0 contains the stat data | |
4390 | ||
4391 | 0xC3FA0(int32_t *a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6, unsigned int a7, unsigned int a8); | |
4392 | 0xC3FA0(&unk_29DF5DC, (int32_t )&v5, (int32_t )&v4, (int32_t )&v3, (int32_t )"COMMEND_SPAM_TIMEOUT", (int32_t )"COMMEND_SPAM_TIMEOUT_DISABLED", 0x4B0, 0xDAFB10F9); //mpply_friendly | |
4393 | ||
4394 | ||
4395 | GAME_EXPORT int _0x324CB0(int *a1, int a2); | |
4396 | ||
4397 | //0x325EF0(Hash hash, unsigned int value, unsigned int value2); | |
4398 | GAME_EXPORT int _0x325EF0(int32_t *a1); | |
4399 | ||
4400 | GAME_EXPORT int 0x12D8D2C(0xB5EE873, 0x3C0AF527, int value); | |
4401 | ||
4402 | GAME_EXPORT int 0x12DEC4C(someVtable, unsinged int, Hash, int value); | |
4403 | ||
4404 | GAME_EXPORT unsigned int 0xAE8E98(int32_t a1); | |
4405 | ||
4406 | 0xB5EE873 = BASE_GLOBALS | |
4407 | ||
4408 | unsigned int _0xA076C0(int strc) | |
4409 | ||
4410 | ||
4411 | //GAME_EXPORT int _0x12D141C(unsigned int v2, unsigned int v4, unsigned int v5) | |
4412 | GAME_EXPORT void _0x324CB0(int *a1, char *a2) | |
4413 | //int value = 0; | |
4414 | //_0x324CB0(&value, "MPPLY_LAST_REPORT_RESTORE"); | |
4415 | GAME_EXPORT int *_0x12DEC4C(int32_t a1, int32_t value, int array_index) //returns an array | |
4416 | //_0x12DEC4C(0x38CEB237, 0, 3); //0x38CEB237 = mp_global | |
4417 | GAME_EXPORT void _0x12B4710(unsigned int hash_table_address, unsigned int hash, unsigned int data) | |
4418 | // unsigned int dword_1CFB0B8 = 0x1CFB0B8; | |
4419 | //_0x12B4710(dword_1CFB0B8, 0x1C95C751, 0x10); //0xF227F666 COMMENDREPORT_MAX_STRENGTH | |
4420 | GAME_EXPORT _0x12CF8F0(char *a1, char *a2, int value) //returns an array looks like | |
4421 | //_0x12CF8F0("MP_GLOBAL", "KICK_TIMEOUT", 0); | |
4422 | //_0x12CF8F0("MP_GLOBAL", "KICK_TIMEOUT_DISABLED", 2); | |
4423 | GAME_EXPORT char _0xC3C8C(const char *a1, int32_t a2, int32_t a3) | |
4424 | GAME_EXPORT char *_0x12F89B8(const char *a1) | |
4425 | GAME_EXPORT void _0xA23BD0(int32_t *a1, int32_t a2, int a3) | |
4426 | ||
4427 | unsigned int CNetGamePlayer() | |
4428 | { | |
4429 | unsigned int s = 0x00000000; | |
4430 | unsigned int v23 = *(unsigned int*)(s + 0x4C); | |
4431 | return _0xA076C0(v23); | |
4432 | } | |
4433 | ||
4434 | ||
4435 | ||
4436 | ||
4437 | ||
4438 | ||
4439 | ||
4440 | ||
4441 | ||
4442 | ||
4443 | ||
4444 | int g_global = GlobalVariable::Get(1310891 + (PLAYER_ID() * 6) + 1); | |
4445 | int vVar0[3]; | |
4446 | vVar0[0] = 168; | |
4447 | vVar0[1] = iSelectedPlayer; | |
4448 | vVar0[2] = g_global; | |
4449 | TriggerScriptEvent(vVar0, 3, iSelectedPlayer); | |
4450 | ||
4451 | int Var2[4]; | |
4452 | Var2[0] = 157; | |
4453 | Var2[1] = iSelectedPlayer; | |
4454 | int bit = 0; | |
4455 | SET_BIT(&bit, PLAYER_ID()); | |
4456 | Var2[2] = bit; //bitset | |
4457 | Var2[3] = g_global; | |
4458 | TriggerScriptEvent(Var2, 4, iSelectedPlayer); | |
4459 | ||
4460 | ||
4461 | int FadeTime = 700; | |
4462 | RGBA ColorList[4] = { | |
4463 | { 255, 0, 0, 255 }, | |
4464 | { 0, 255, 0, 255 }, | |
4465 | { 0, 0, 255, 255 }, | |
4466 | { 255, 255, 0, 255 }, | |
4467 | }; | |
4468 | float fadeAmount; | |
4469 | int colorIndex; | |
4470 | RGBA startColor = ColorList[0], endColor = ColorList[1]; | |
4471 | RGBA currentColor; | |
4472 | ||
4473 | double Lerp(double d1, double d2, double d) | |
4474 | { | |
4475 | return d1 + (d2 - d1) * d; | |
4476 | } | |
4477 | RGBA FadeTo(RGBA color1, RGBA color2, double d) | |
4478 | { | |
4479 | RGBA col; | |
4480 | double r = Lerp(color1.R, color2.R, d); | |
4481 | double g = Lerp(color1.G, color2.G, d); | |
4482 | double b = Lerp(color1.B, color2.B, d); | |
4483 | col.R = r; | |
4484 | col.G = g; | |
4485 | col.B = b; | |
4486 | return col; | |
4487 | } | |
4488 | ||
4489 | if (fadeAmount < 1.0f) | |
4490 | { | |
4491 | fadeAmount += GET_FRAME_TIME() * (1000.0f / FadeTime); | |
4492 | ||
4493 | if (fadeAmount < 0.0f) | |
4494 | fadeAmount = 0.0f; | |
4495 | ||
4496 | else if (fadeAmount > 1.0f) | |
4497 | fadeAmount = 1.0f; | |
4498 | ||
4499 | currentColor = FadeTo(startColor, endColor, fadeAmount); | |
4500 | } | |
4501 | else | |
4502 | { | |
4503 | colorIndex++; | |
4504 | ||
4505 | colorIndex %= sizeof(ColorList); | |
4506 | ||
4507 | startColor = currentColor; | |
4508 | ||
4509 | endColor = ColorList[colorIndex]; | |
4510 | ||
4511 | fadeAmount = 0.0f; | |
4512 | } | |
4513 | ||
4514 | if (IS_PED_IN_ANY_VEHICLE(myVeh, 1)) | |
4515 | SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(myVeh, currentColor.R, currentColor.G, currentColor.B); | |
4516 | ||
4517 | ||
4518 | ||
4519 | ||
4520 | ||
4521 | ||
4522 | ||
4523 | ||
4524 | ||
4525 | ||
4526 | ||
4527 | ||
4528 | ||
4529 | ||
4530 | //18 players in session | |
4531 | _NETWORK_SESSION_SET_MAX_PLAYERS(0, 18); //Player | |
4532 | _NETWORK_SESSION_SET_MAX_PLAYERS(4, 18); //Spectator | |
4533 | _NETWORK_SESSION_SET_MAX_PLAYERS(8, 18); //SCTV | |
4534 | _NETWORK_SCTV_SLOTS(18); | |
4535 | *(int *)(0x3E42EC) = BLR; //_NETWORK_SESSION_SET_MAX_PLAYERS | |
4536 | ||
4537 | ||
4538 | ||
4539 | ||
4540 | ||
4541 | ||
4542 | ||
4543 | ||
4544 | ||
4545 | ||
4546 | ||
4547 | ||
4548 | ||
4549 | ||
4550 | ||
4551 | int getProofs(Entity entity, int bit) | |
4552 | { | |
4553 | int address = getScriptHandleBaseAddress(entity); | |
4554 | printf("address: 0x%X\n", address); | |
4555 | ||
4556 | int fire = 5; | |
4557 | int melee = 7; | |
4558 | int bullet = 4; | |
4559 | int explosion = 11; | |
4560 | int collision = 6; | |
4561 | int onlyDamageByPlayer = 9; | |
4562 | int invincible = 8; | |
4563 | ||
4564 | //other unknown params? | |
4565 | int ten = 10; | |
4566 | int fourteen = 14; | |
4567 | int fifthteen = 15; | |
4568 | int canEntityBeDamaged = 18; | |
4569 | int twentyfour = 24; | |
4570 | ||
4571 | /* | |
4572 | nothing: | |
4573 | toggle: 1 = byte 0x30000800 | |
4574 | toggle: 0 = byte 0x30000800 | |
4575 | ||
4576 | player invincible | |
4577 | toggle: 1 = byte 0x30800800 | |
4578 | toggle: 0 = byte 0x30000800 | |
4579 | ||
4580 | bullet proof: | |
4581 | toggle: 1 = byte 0x38000800 | |
4582 | toggle: 0 = byte 0x30000800 | |
4583 | ||
4584 | fire proof: | |
4585 | toggle: 1 = byte 0x34000800 | |
4586 | toggle: 0 = byte 0x30000800 | |
4587 | ||
4588 | explosion proof: | |
4589 | toggle: 1 = byte 0x30200800 | |
4590 | toggle: 0 = byte 0x30000800 | |
4591 | ||
4592 | collision proof: | |
4593 | toggle: 1 = byte 0x32000800 | |
4594 | toggle: 0 = byte 0x30000800 | |
4595 | ||
4596 | melee proof: | |
4597 | toggle: 1 = byte 0x31000800 | |
4598 | toggle: 0 = byte 0x30000800 | |
4599 | ||
4600 | p6 proof: | |
4601 | toggle: 1 = byte 0x30020800 | |
4602 | toggle: 0 = byte 0x30000800 | |
4603 | ||
4604 | p7 proof: //next byte | |
4605 | toggle: 1 = byte 0x30000800 | |
4606 | toggle: 0 = byte 0x30000800 | |
4607 | ||
4608 | p8 proof: | |
4609 | toggle: 1 = byte 0x30010800 | |
4610 | toggle: 0 = byte 0x30000800 | |
4611 | ||
4612 | only damaged by player: | |
4613 | toggle: 1 = byte 0x30400800 | |
4614 | toggle: 0 = byte 0x30000800 | |
4615 | ||
4616 | can entity be damaged: | |
4617 | toggle: 1 = byte 0x30800800 | |
4618 | toggle: 0 = byte 0x30000800 | |
4619 | ||
4620 | apartment | |
4621 | toggle: 1 = byte 0x30800800 | |
4622 | toggle: 0 = byte 0x30000800 | |
4623 | ||
4624 | while ringing apartment door | |
4625 | toggle: 1 = byte 0x30800800 | |
4626 | toggle: 0 = byte 0x30000800 | |
4627 | ||
4628 | garge | |
4629 | toggle: 1 = byte 0x30000800 | |
4630 | toggle: 0 = byte 0x30000800 | |
4631 | ||
4632 | getting out of apartment | |
4633 | toggle: 1 = byte 0x30800000 | |
4634 | toggle: 0 = byte 0x30000800 | |
4635 | ||
4636 | console trainer | |
4637 | toggle: 1 = byte 0x30800800 | |
4638 | toggle: 0 = byte 0x30000800 | |
4639 | ||
4640 | api intense | |
4641 | toggle: 1 = byte 0x30800800 | |
4642 | toggle: 0 = byte 0x30000800 | |
4643 | ||
4644 | dark hores menu | |
4645 | toggle: 1 = byte 0x3FA30800 //a lot of god modes enableds like proofs and others | |
4646 | toggle: 0 = byte 0x30000800 | |
4647 | ||
4648 | while driving | |
4649 | toggle: 1 = byte 0x30000000 | |
4650 | toggle: 0 = byte 0x30000800 | |
4651 | ||
4652 | swiming in water | |
4653 | toggle: 1 = byte 0xF0000800 | |
4654 | toggle: 0 = byte 0x30000800 | |
4655 | ||
4656 | in air | |
4657 | toggle: 1 = byte 0x30000000 | |
4658 | toggle: 0 = byte 0x30000800 | |
4659 | ||
4660 | respawning | |
4661 | toggle: 1 = byte 0x30800000 | |
4662 | toggle: 0 = byte 0x30000800 | |
4663 | ||
4664 | getting into heli | |
4665 | toggle: 1 = byte 0x30000004 //or maybe 0x30000804 | |
4666 | toggle: 0 = byte 0x30000800 | |
4667 | ||
4668 | getting into lazer jet | |
4669 | toggle: 1 = byte 0x30000004 | |
4670 | toggle: 0 = byte 0x30000800 | |
4671 | ||
4672 | climbing a latter | |
4673 | toggle: 1 = byte 0x30000A04 | |
4674 | toggle: 0 = byte 0x30000800 | |
4675 | ||
4676 | in deathmath | |
4677 | toggle: 1 = byte 0x30000100 | |
4678 | toggle: 0 = byte 0x30000800 | |
4679 | ||
4680 | after deathmath | |
4681 | toggle: 1 = byte 0x30000900 | |
4682 | toggle: 0 = byte 0x30000900 | |
4683 | ||
4684 | ||
4685 | ||
4686 | invincible: | |
4687 | int32_t v4 = 0x800000; | |
4688 | int32_t result2 = byte & -0x800001 | v4; | |
4689 | ||
4690 | ||
4691 | proofs: | |
4692 | int v4_2; | |
4693 | result = | |
4694 | 0x8000000 * a2 & 0x8000000 | //bullet proof | |
4695 | byte & -0xf230001 | //god mode??? | |
4696 | 0x4000000 * a3 & 0x4000000 | //fire proof | |
4697 | 0x200000 * a4 & 0x200000 | //exploion proof | |
4698 | 0x2000000 * a5 & 0x2000000 | //collision proof | |
4699 | 0x1000000 * a6 & 0x1000000 | //melle proof | |
4700 | 0x20000 * a7 & 0x20000 | //unk6 | |
4701 | 0x10000 * v4_2 & 0x10000; //unk8 | |
4702 | ||
4703 | ||
4704 | onlyDamageByPlayer: | |
4705 | bool a2 = 0; | |
4706 | int32_t result = 0x400000 * a2 & 0x400000 | byte & -0x400001; | |
4707 | ||
4708 | ||
4709 | can entity be damaged: | |
4710 | *v5 = 0x40000 * v4 & 0x800000 | *v5 & -0x800001; | |
4711 | */ | |
4712 | } | |
4713 | ||
4714 | ||
4715 | ||
4716 | ||
4717 | ||
4718 | ||
4719 | ||
4720 | ||
4721 | ||
4722 | ||
4723 | ||
4724 | ||
4725 | ||
4726 | ||
4727 | ||
4728 | ||
4729 | ||
4730 | ||
4731 | ||
4732 | ||
4733 | ||
4734 | if (NETWORK_IS_HOST()) | |
4735 | { | |
4736 | NETWORK_SESSION_KICK_PLAYER(iSelectedPlayer); | |
4737 | } | |
4738 | ||
4739 | ||
4740 | //activate admin kick on self | |
4741 | GlobalVariable::Write(1315298, 30); | |
4742 | GlobalVariable::Write(60515, 0); | |
4743 | GlobalVariable::Write(1312335, 1); | |
4744 | GlobalVariable::Write(1312455, 6); //admin kick | |
4745 | ||
4746 | ||
4747 | ||
4748 | ||
4749 | ||
4750 | ||
4751 | ||
4752 | ||
4753 | ||
4754 | ||
4755 | ||
4756 | ||
4757 | ||
4758 | ||
4759 | ||
4760 | ||
4761 | ||
4762 | ||
4763 | ||
4764 | /* | |
4765 | //(*(int*)0x1CC4A34) + 0x2A4) cnetplayer from first player probs the host | |
4766 | //a1 = 2, 4, 5, 8, | |
4767 | GameclockHost(5, (*(int*)0x1CC4A34) + 0x2A4); | |
4768 | ||
4769 | //NOTICE THEY DONT CHANGE ON YOUR SCREEN | |
4770 | int strcut = *(int *)(0x1CC4A54); | |
4771 | int net_script = *(int *)(strcut); | |
4772 | ||
4773 | //non host | |
4774 | int prt = *(int *)(0x1CC4A54); | |
4775 | unsigned int *a1 = _0xA546A8(prt); | |
4776 | GameClockFn(a1, 5, (*(int*)0x1CC4A34) + 0x2A4); | |
4777 | *(int *)(a1 + 0x2C) = hour; | |
4778 | *(int *)(a1 + 0x20) = weather; //could be wrong | |
4779 | ||
4780 | //GameClockFn(a1, 5, CNetGamePlayerFn(iSelectedPlayer, 1)); | |
4781 | ||
4782 | ||
4783 | ||
4784 | ||
4785 | /* | |
4786 | r0=00000000012C2A40 r8=0000000000000003 r16=0000000000000000 r24=0000000001C28AA0 | |
4787 | r1=00000000D003FEB0 r9=0000000002150000 r17=00000000D0040430 r25=0000000000000001 | |
4788 | r2=0000000001C85330 r10=0000000000000000 r18=0000000035F35344 r26=0000000000000000 | |
4789 | r3=00000000401DC6E0 r11=000000003279AFF4 r19=0000000001CC2FA8 r27=0000000035F2BFFF | |
4790 | r4=0000000000000005 r12=00000000D003FB10 r20=000000003228FAB4 r28=0000000035F35344 | |
4791 | r5=000000000222E250 r13=0000000010007060 r21=0000000035F00000 r29=000000000222E250 | |
4792 | r6=0000000000000003 r14=0000000000000000 r22=0000000001E70370 r30=0000000000000005 | |
4793 | r7=000000001FFFFFFF r15=0000000000000000 r23=00000000321A7080 r31=00000000401DC6E0 | |
4794 | ||
4795 | xer=0000000020000000 ctr=00000000012C2A00 lr=00000000012C2A50 fpscr=AE302500 | |
4796 | ||
4797 | cr=44000042 cr0=GT cr1=GT cr2= cr3= cr4= cr5= cr6=GT cr7=EQ | |
4798 | ||
4799 | pc=00000000012C2898 | |
4800 | ||
4801 | Executing | |
4802 | ||
4803 | ||
4804 | ||
4805 | 401DC6E0 0000005E 00030000 401C2AF4 0222DC80 000D63E8 ...^....@.*.."....c. | |
4806 | 401DC6F4 00004000 00000000 00002C38 4375B5EE 0000006D ..@.......,8Cu.....m | |
4807 | 401DC708 019262B0 00000000 FFFFFFFF 00740000 00000008 ..b..........t...... | |
4808 | 401DC71C 01892C38 C875557D 66726565 6D6F6465 00000005 ..,8.uU}freemode.... | |
4809 | 401DC730 95B61B42 00001000 0222DC80 00000000 00010000 ...B.....".......... | |
4810 | 401DC744 003D8112 00000000 FFFFFFFF C875557D 00000000 .=...........uU}.... | |
4811 | 401DC758 00000000 00000000 00000000 00000000 00000000 .................... | |
4812 | 401DC76C 00000000 00000000 00000000 00000000 00000000 .................... | |
4813 | 401DC780 00000000 00000000 00000000 00000000 00000000 .................... | |
4814 | 401DC794 00000000 00000000 00000000 00000000 00000000 .................... | |
4815 | 401DC7A8 00000000 00000000 00000000 00000000 00000000 .................... | |
4816 | 401DC7BC 00000000 00000000 00000000 00000000 00000000 .................... | |
4817 | 401DC7D0 00000000 00000000 00000000 00000000 00000000 .................... | |
4818 | 401DC7E4 00000000 00000000 00000000 00000000 00000000 .................... | |
4819 | 401DC7F8 00000000 00000000 0000005F 00030000 401C2B98 ..........._....@.+. | |
4820 | 401DC80C 0222DC80 000D63E8 00004000 00000000 00002C38 ."....c...@.......,8 | |
4821 | 401DC820 BF397BCC 00000065 019262B0 00000000 FFFFFFFF .9{....e..b......... | |
4822 | 401DC834 00000000 00000009 01892C38 C875557D 66726565 ..........,8.uU}free | |
4823 | 401DC848 6D6F6465 00FFFFFF C875557D 00000004 00000000 mode.....uU}........ | |
4824 | 401DC85C FFFFFFFF 00000000 003D8112 00000000 FFFFFFFF .........=.......... | |
4825 | 401DC870 C875557D 00000000 00000000 00000000 00000000 .uU}................ | |
4826 | 401DC884 00000000 00000000 00000000 00000000 00000000 .................... | |
4827 | 401DC898 00000000 00000000 00000000 00000000 00000000 .................... | |
4828 | 401DC8AC 00000000 00000000 00000000 00000000 00000000 .................... | |
4829 | 401DC8C0 00000000 00000000 00000000 00000000 00000000 .................... | |
4830 | 401DC8D4 00000000 00000000 00000000 00000000 00000000 .................... | |
4831 | 401DC8E8 00000000 00000000 00000000 00000000 00000000 .................... | |
4832 | 401DC8FC 00000000 00000000 00000000 00000000 00000000 .................... | |
4833 | 401DC910 00000000 00000000 00000000 00000000 00000060 ...................` | |
4834 | 401DC924 00030000 401C2C3C 0222DC80 000D63E8 00004000 ....@.,<."....c...@. | |
4835 | 401DC938 00000000 0000EC00 376F3515 00000000 019262B0 ........7o5.......b. | |
4836 | 401DC94C 00000000 FFFFFFFF 00F10006 0000000A 01892C38 ..................,8 | |
4837 | 401DC960 C875557D 66726565 6D6F6465 00000000 00000000 .uU}freemode........ | |
4838 | 401DC974 00000000 00000000 00000000 00000000 003D8112 .................=.. | |
4839 | 401DC988 00000000 FFFFFFFF C875557D 00000000 00000000 .........uU}........ | |
4840 | 401DC99C 00000000 00000000 00000000 00000000 00000000 | |
4841 | ||
4842 | ||
4843 | ||
4844 | ||
4845 | ||
4846 | ||
4847 | ||
4848 | ||
4849 | ||
4850 | ||
4851 | 0222E250 0192F460 00000000 00000000 00000000 FFFFFFFF ...`................ | |
4852 | 0222E264 00000000 00000000 FFFFFFFF 00000000 FFFFFFFF .................... | |
4853 | 0222E278 03FF0000 00000000 00000000 000C9F70 FFFFFFFF ...............p.... | |
4854 | 0222E28C 00000000 0222EA10 00000000 00000000 00000000 .....".............. | |
4855 | 0222E2A0 00000000 00000000 00000000 00000000 00000000 .................... | |
4856 | 0222E2B4 FFFFFFFF 00000000 20000000 00000000 00000000 ........ ........... | |
4857 | 0222E2C8 00000000 FFFFFFFF 00000000 00000000 00000000 .................... | |
4858 | 0222E2DC 00000000 00000000 0000000A 00000012 00000000 .................... | |
4859 | 0222E2F0 00000000 00000000 00000000 00000000 00F99D27 ...................' | |
4860 | 0222E304 D003E390 00000000 02230000 00000000 00000000 .........#.......... | |
4861 | 0222E318 00000000 00000000 00000000 00000000 00000000 .................... | |
4862 | 0222E32C 00000000 00000000 00000000 00000000 00000000 .................... | |
4863 | 0222E340 00000000 00000000 00000000 00000000 00000000 .................... | |
4864 | 0222E354 00000000 00000000 00000000 00000000 00000000 .................... | |
4865 | 0222E368 00000000 0022E250 00000000 00000000 0222DA1C .....".P.........".. | |
4866 | 0222E37C 0222E250 0222DA28 0222E250 0222DA34 00000000 .".P.".(.".P.".4.... | |
4867 | 0222E390 0222DA40 00000000 00000000 400222D0 00000000 .".@........@."..... | |
4868 | 0222E3A4 00000000 00000000 00000000 00000000 00000000 .................... | |
4869 | 0222E3B8 00000000 00000000 00000000 000000FF 00000000 | |
4870 | * | |
4871 | ||
4872 | ||
4873 | ||
4874 | int s = 0x0000000 | |
4875 | int p2 = (int )(s + 0xD04); | |
4876 | GameWeatherFn(int unk, int strut, 0); | |
4877 | //1, 0, 4E = extrasunny | |
4878 | //1, 1, 4E clear | |
4879 | //1, 2, 4E clouds | |
4880 | //1, 3, 4E = smog | |
4881 | //1, 4, 4E = foggy | |
4882 | //1, 5, 4E = overcast | |
4883 | //1, 6, 4E = rain | |
4884 | //1, 7, 4E = thunder | |
4885 | //1, 8, 4E clearing | |
4886 | //1, 9, 4E = netutral | |
4887 | //1, A, 4E snow | |
4888 | //1, B, 4E blizzard | |
4889 | //1, C, 4E snowlight | |
4890 | //1, D, 4E xmas | |
4891 | //0, 0, 4E reset | |
4892 | ||
4893 | ||
4894 | ||
4895 | //sub_0x003D402C(); | |
4896 | //sub_0x0046EE68(value_0x040D130D0, value_0x046EE68, value_0x0470810); | |
4897 | //sub_0x0109592C(); | |
4898 | //sub_0x010959D0(); | |
4899 | ||
4900 | ||
4901 | ||
4902 | //these args could be found in the data to hook to find the weather they changed it to | |
4903 | //sub_1095B24(time_cycle_struct/*0x2148E84*, value_0x97, value_0x4A38); | |
4904 | ||
4905 | //sub_12F3C00(cNetPlayer, cNetPlayer, value_0x1340940); | |
4906 | ||
4907 | //weahther event caller | |
4908 | //sub_12C2ECC(0x1, 0xD, 0x4E); | |
4909 | ||
4910 | //joining a new session | |
4911 | //sub_109570C(time_cycle_struct/*0x2148E84*, value_1, value_0x497C8, value_0x1388, "ECYCLE/W_EXTRASUNNY.XML."); | |
4912 | ||
4913 | //for all session. | |
4914 | //sub_109536C(dword_2148E84_not_prt, weather_value, value_1_or_0); | |
4915 | ||
4916 | ||
4917 | ||
4918 | ||
4919 | /* | |
4920 | r0=00000000010953E0 r8=0000000002240000 r16=0000000000000000 r24=0000000001C28AA0 | |
4921 | r1=00000000D003FC60 r9=0000000002C91001 r17=00000000D0040430 r25=0000000000000001 | |
4922 | r2=0000000001C85330 r10=0000000000000000 r18=0000000035F35344 r26=0000000000000000 | |
4923 | r3=0000000000000001 r11=000000003225B1F4 r19=0000000001CC2FA8 r27=0000000035F2BFFF | |
4924 | r4=0000000000000005 r12=00000000D003FB10 r20=000000003228FAB4 r28=0000000035F35344 | |
4925 | r5=00000000000000AC r13=0000000010007060 r21=0000000035F00000 r29=0000000000000005 | |
4926 | r6=0000000000000000 r14=0000000000000000 r22=0000000001E70370 r30=0000000000000001 | |
4927 | r7=0000000000000000 r15=0000000000000000 r23=00000000321A7080 r31=0000000002148E84 | |
4928 | ||
4929 | xer=0000000020000000 ctr=00000000008FD3B0 lr=0000000001095434 fpscr=BE302500 | |
4930 | ||
4931 | cr=24000022 cr0=EQ cr1=GT cr2= cr3= cr4= cr5= cr6=EQ cr7=EQ | |
4932 | ||
4933 | pc=00000000012C2ECC | |
4934 | ||
4935 | Executing | |
4936 | ||
4937 | */ | |
4938 | ||
4939 | ||
4940 | ||
4941 | GAME_EXPORT bool networkIsHost(); | |
4942 | GAME_EXPORT void networkKickPlayer_host(int32_t host_prt, int32_t value); | |
4943 | GAME_EXPORT void request_something_from_host(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5); | |
4944 | GAME_EXPORT int32_t sub_12F6D7C() | |
4945 | GAME_EXPORT int 32_t sub_176404C(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6, int32_t a7) | |
4946 | ||
4947 | int32_t sub_13E0C38(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6, int32_t a7, int32_t a8, int32_t a9, int32_t a10) | |
4948 | { | |
4949 | int32_t result = sub_150AA80(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); | |
4950 | if (*(int32_t *)result == 0) | |
4951 | { | |
4952 | return result; | |
4953 | } | |
4954 | if (*(int32_t *)(result + 8) == 0 || *(int32_t *)(result + 12) == 0) | |
4955 | { | |
4956 | return 0; | |
4957 | } | |
4958 | int32_t result2 = 0; | |
4959 | if (sub_16276C4((int32_t)&result2, *(int32_t *)(result + 4)) == 0) | |
4960 | { | |
4961 | return 0; | |
4962 | } | |
4963 | if (result2 != *(int32_t *)0x2258B90) | |
4964 | { | |
4965 | return result2; | |
4966 | } | |
4967 | if (networkIsHost() == 0 || *(int32_t *)(result + 8) == 0) | |
4968 | { | |
4969 | return 0; | |
4970 | } | |
4971 | int32_t result4; | |
4972 | int32_t v1 = &result4; | |
4973 | sub_A8B814(v1); | |
4974 | sub_A8B8DC(v1, *(int32_t *)result); | |
4975 | int32_t v2 = 0; | |
4976 | if (sub_16271AC((int32_t)&v2, v1) != 0) | |
4977 | { | |
4978 | int32_t v3; | |
4979 | if ((v3 & 64) == 0 & *(int32_t *)0x2258B90 == v2) | |
4980 | { | |
4981 | int32_t result3; | |
4982 | int32_t v4; | |
4983 | int32_t v5; | |
4984 | int32_t v6; | |
4985 | if (v5 + 8 <= ((v3 & 128) == 0 ? v6 : v4)) | |
4986 | { | |
4987 | int32_t v7; | |
4988 | int32_t v8; | |
4989 | sub_A8B588((int32_t)&v7, 8, v5 + v8); | |
4990 | sub_A8BAD8(v1, 8); | |
4991 | int32_t v9 = sub_A8BA28(v1); | |
4992 | if (v9 == *(int32_t *)(result + 4)) | |
4993 | { | |
4994 | int32_t v10 = *(int32_t *)(result + 8); | |
4995 | result3 = networkKickPlayer_host(*(int32_t *)0x1CF72C4, v10, v7 % 256); | |
4996 | } | |
4997 | else | |
4998 | { | |
4999 | result3 = v9; | |
5000 | } | |
5001 | } | |
5002 | else | |
5003 | { | |
5004 | result3 = result4; | |
5005 | } | |
5006 | return result3; | |
5007 | } | |
5008 | } | |
5009 | return result4; | |
5010 | } | |
5011 | //mgrKickPlayer class | |
5012 | //MsgBlacklist class | |
5013 | //MsgBlacklist12AutoIdDesc__E | |
5014 | int32_t sub_176404C(int32_t a1) //request kick | |
5015 | { | |
5016 | //0x1888B90 rage::AutoIdDescriptorE | |
5017 | //0x22693F8 rage::msgPartyLeaveGame::AutoIdDesc__ | |
5018 | //0x1FFE474 rage::netMessage::AutoIdDesc__ | |
5019 | //0x18F25D0 class rage::AutoIdDescriptor<netMessage> | |
5020 | //0x19318C0 msgRequestKickFromHost::AutoIdDesc__ | |
5021 | //TEXT 0x19318C8 = msgRequestKickFromHost | |
5022 | ||
5023 | int32_t v1 = sub_1803770(a1); | |
5024 | sub_D04088(v1, 1, 0x19318C8, 0x1FFE474, 1); | |
5025 | *(int32_t *)v1 = 0x18F25D0; | |
5026 | if (*(char *)0x2269418 == 0) | |
5027 | { | |
5028 | sub_D03258(0x22693F8); | |
5029 | *(char *)0x2269418 = 1; | |
5030 | } | |
5031 | sub_D04260(0x22693F8, v1); | |
5032 | *(int32_t *)v1 = 0x19318C0; | |
5033 | return 0x19318C0; | |
5034 | } | |
5035 | int32_t sub_1624C94(int32_t a1) //black list | |
5036 | { | |
5037 | int32_t v1 = sub_1803770(a1); | |
5038 | *(int32_t *)v1 = 0x18F25D0; | |
5039 | if (*(char *)0x2269418 == 0) | |
5040 | { | |
5041 | sub_D03258(0x22693F8); | |
5042 | *(char *)0x2269418 = 1; | |
5043 | } | |
5044 | sub_D03298(0x22693F8, v1); | |
5045 | *(int32_t *)v1 = 0x1888B90; | |
5046 | return 0x1888B90; | |
5047 | } | |
5048 | int32_t sub_162A01C(int32_t a1) //kick msg | |
5049 | { | |
5050 | int32_t v1 = sub_1803770(a1); | |
5051 | int32_t v2 = v1; | |
5052 | if (v1 == 0) | |
5053 | { | |
5054 | return 0; | |
5055 | } | |
5056 | *(int32_t *)v1 = 0x18F25D0; | |
5057 | if (*(char *)0x2269418 == 0) | |
5058 | { | |
5059 | sub_D03258(0x22693F8); | |
5060 | *(char *)0x2269418 = 1; | |
5061 | } | |
5062 | sub_D03298(0x22693F8, v2); | |
5063 | *(int32_t *)v2 = 0x1888B90; | |
5064 | return sub_10230(v2, 0x1888B90); | |
5065 | } | |
5066 | int32_t sub_1357CA0(int32_t a1, int32_t a2, int32_t a3) | |
5067 | { | |
5068 | int32_t v1 = loc_150AA84(a1, a2, a3); | |
5069 | int32_t v2; | |
5070 | int32_t v3 = &v2; | |
5071 | v2 = 0; | |
5072 | int32_t result; | |
5073 | if (sub_A91D04(a2, 0x1850D34, v3, 32) == 0) | |
5074 | { | |
5075 | result = false; | |
5076 | } | |
5077 | else | |
5078 | { | |
5079 | int32_t v4 = sub_AE580C(v3, 0); | |
5080 | *(int32_t *)(v1 + 4) = v4; | |
5081 | if (v4 == 0xDD245B9C) //hash of "vehicle" | |
5082 | { | |
5083 | sub_A91D04(a2, 0x1851F70, v1 + 12, 64); | |
5084 | } | |
5085 | result = 1; | |
5086 | } | |
5087 | return result; | |
5088 | } | |
5089 | int32_t sub_1358EB8(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6, int32_t a7) | |
5090 | { | |
5091 | int32_t v1 = sub_150AA84(a1, a2, a3, a4, a5, a6, a7); | |
5092 | switch (*(int32_t *)(v1 + 4)) | |
5093 | { | |
5094 | case 0xDD245B9C: //hash of "vehicle" | |
5095 | { | |
5096 | int32_t v2 = *(int32_t *)(*(int32_t *)0x1CEFCF8 + 4); | |
5097 | if (v2 != 0) | |
5098 | { | |
5099 | if ((*(int32_t *)(v2 + 3556) & 0x40000000) != 0) | |
5100 | { | |
5101 | if (*(int32_t *)(v2 + 3740) != 0) | |
5102 | { | |
5103 | return 0; | |
5104 | } | |
5105 | } | |
5106 | sub_103FCA4(v1 + 12); | |
5107 | } | |
5108 | return 0; | |
5109 | } | |
5110 | case 0xC2F12A5B: // hash collosion but works "cxazuog" //hash of "" // related to EXPLOSION_EVENT | |
5111 | { | |
5112 | int32_t v3 = sub_1117978(); | |
5113 | if (v3 == 0) | |
5114 | { | |
5115 | return 0; | |
5116 | } | |
5117 | int32_t v4; | |
5118 | int32_t v5 = &v4; | |
5119 | sub_5704A8(v5, v3, 0); | |
5120 | int32_t v6 = sub_AEBB54(*(int32_t *)0x1CBAEAC, 276, 16); | |
5121 | sub_570AC4(v6, v5, 16, 0); | |
5122 | int32_t v7; | |
5123 | int32_t v8 = &v7; | |
5124 | sub_622E4(v8, 3, v6, 0, 79, 0, 0); | |
5125 | int32_t v9 = sub_585C8(*(int32_t *)(v3 + 3020) + 788, v8); | |
5126 | if (v9 != 0) | |
5127 | { | |
5128 | char * v10 = (char *)(v9 + 12); | |
5129 | *v10 = *v10 % 128; | |
5130 | } | |
5131 | sub_62368(v8); | |
5132 | int32_t v11; | |
5133 | if (v11 != 0) | |
5134 | { | |
5135 | sub_150AD08((int32_t)&v11); | |
5136 | } | |
5137 | return 0; | |
5138 | } | |
5139 | case 0x84643284: //hash of "kick" | |
5140 | { | |
5141 | if (networkIsHost() == 0) | |
5142 | { | |
5143 | int32_t v12 = sub_12F6D7C(); | |
5144 | if (v12 != 0) | |
5145 | { | |
5146 | int32_t v13; | |
5147 | int32_t v14 = &v13; | |
5148 | sub_A8B814(v14); | |
5149 | int32_t v15; | |
5150 | int32_t v16 = &v15; | |
5151 | sub_A8B908(v14, v16, 982); | |
5152 | bool v17 = false; | |
5153 | if (sub_1626844(*(int32_t *)0x2258B90, v14) != 0) | |
5154 | { | |
5155 | bool v18 = false; | |
5156 | int32_t v19; | |
5157 | int32_t v20; | |
5158 | int32_t v21; | |
5159 | if (v20 + 8 <= v19 && (v21 & 128) == 0) | |
5160 | { | |
5161 | if ((v21 & 64) == 0) | |
5162 | { | |
5163 | int32_t v22; | |
5164 | sub_A8B5FC(v13, 4, 8, v20 + v22, v22); | |
5165 | } | |
5166 | sub_A8BBBC(v14, 8); | |
5167 | v18 = true; | |
5168 | } | |
5169 | v17 = v18; | |
5170 | } | |
5171 | sub_A8B978(v14); | |
5172 | if (v17) | |
5173 | { | |
5174 | request_something_from_host(v12, v16, 0, 0, 0); | |
5175 | } | |
5176 | } | |
5177 | } | |
5178 | else | |
5179 | { | |
5180 | if (*(int32_t *)(*(int32_t *)0x1CF72BC + 140) != 0) | |
5181 | { | |
5182 | //value = 0 you been kicked from this GTA Online sesison by other players | |
5183 | //value = 1 connection was lost due to an unknown network error | |
5184 | //value = 2 says player left. (cool kinda kick, player can join back) | |
5185 | //value = 3 connection was lost due to an unknown network error | |
5186 | //value = 4 You Have been removed from this session by a Rockstar Games administrator. | |
5187 | //value = 5 connection was lost due to an unknown network error | |
5188 | //value = 6 connection was lost due to an unknown network error | |
5189 | //value = 7 connection was lost due to an unknown network error | |
5190 | //vlaue = 8 You were kicked from this GTA Online sesison by other players | |
5191 | networkKickPlayer_host(*(int32_t *)0x1CF72C4, 4); | |
5192 | } | |
5193 | } | |
5194 | return 0; | |
5195 | } | |
5196 | case 0x4349E22B: //hash of "relax" // related to RAGDOLL_REQUEST_EVENT | |
5197 | { | |
5198 | int32_t v23 = sub_1117978(); | |
5199 | if (v23 != 0) | |
5200 | { | |
5201 | int32_t v24 = sub_AEBB54(*(int32_t *)0x1CBAEAC, 196, 16); | |
5202 | sub_7075A0(v24, 1000, 0x2710, 0x149f0, 0); // v24 = CTaskMoveStandStill | |
5203 | int32_t v25; | |
5204 | int32_t v26 = &v25; | |
5205 | sub_67924(v26, 0x2710, v24, 0, 1000); | |
5206 | sub_10194B0(v23, v26); // v23 = CPed, v26 = 37 | |
5207 | sub_67990(v26); | |
5208 | } | |
5209 | return 0; | |
5210 | } | |
5211 | } | |
5212 | return 0; | |
5213 | } | |
5214 | ||
5215 | ||
5216 | ||
5217 | ||
5218 | ||
5219 | int32_t sub_A17A58(int32_t a1, int32_t a2, int32_t a3, uint32_t a4, int32_t a5, int32_t a6) | |
5220 | { | |
5221 | int32_t v1 = 0; | |
5222 | uint32_t v2 = 32 - a3; | |
5223 | uint32_t v3 = v2 % 32; | |
5224 | uint32_t v4 = (v2 & 32) != 0 ? 0 : -1 << v3; | |
5225 | uint32_t v5 = a4 % 8; | |
5226 | uint32_t v6 = (v2 & 32) != 0 ? 0 : a2 << v3; | |
5227 | char * v7 = (char *)v1; | |
5228 | unsigned char v8 = *v7; | |
5229 | uint32_t v9 = 8 - v5; | |
5230 | uint32_t v10 = v6 << v9; | |
5231 | int32_t v11 = v1 + 1; | |
5232 | char * v12 = (char *)v11; | |
5233 | uint32_t v13 = v4 << v9; | |
5234 | *v7 = (char)((int32_t)v8 & (v4 / 0x1000000 >> v5 ^ 255) | v6 / 0x1000000 >> v5); | |
5235 | int32_t v14 = sub_A8B68C(v9, v13, a3, v10, v11, v4); | |
5236 | unsigned char v15 = *v12; // 0xa8b65c | |
5237 | *v12 = (char)((int32_t)v15 & (v13 / 0x1000000 ^ 255) | v10 / 0x1000000); | |
5238 | return v14 + 8; | |
5239 | } | |
5240 | int32_t networkKickPlayer_host(int32_t a1, int32_t * a2, int32_t a3, int32_t a4) | |
5241 | { | |
5242 | int32_t v1 = (int32_t)a2; | |
5243 | int32_t v2 = loc_150AA6C(a1, v1, a3, a4); | |
5244 | if (a2 == NULL | sub_96D614(*(int32_t *)(v2 + 64)) == 0) | |
5245 | { | |
5246 | return 0; | |
5247 | } | |
5248 | int32_t v3 = a3 < 3; | |
5249 | int32_t v4; | |
5250 | int32_t v5; | |
5251 | int32_t v6; | |
5252 | int32_t result; | |
5253 | if (sub_9F8FD8(v1) != 0) | |
5254 | { | |
5255 | sub_1358AAC(v2, a3); | |
5256 | v4 = 0; | |
5257 | switch (a3) | |
5258 | { | |
5259 | case 0: | |
5260 | { | |
5261 | v4 = 1; | |
5262 | break; | |
5263 | } | |
5264 | case 4: | |
5265 | { | |
5266 | v4 = 1; | |
5267 | break; | |
5268 | } | |
5269 | } | |
5270 | if (v3 == 0) | |
5271 | { | |
5272 | v5 = sub_6BBC08(v1); | |
5273 | sub_135282C(v3, v5, v4); | |
5274 | } | |
5275 | v6 = sub_6BBC08(v1); | |
5276 | result = sub_970F28(*(int32_t *)(v2 + 64), v6, 1, 0, 0); | |
5277 | return result; | |
5278 | } | |
5279 | if (a3 == 2) | |
5280 | { | |
5281 | if (v3 == 0) | |
5282 | { | |
5283 | v5 = sub_6BBC08(v1); | |
5284 | sub_135282C(v3, v5, 0); | |
5285 | } | |
5286 | v6 = sub_6BBC08(v1); | |
5287 | result = sub_970F28(*(int32_t *)(v2 + 64), v6, 1, 0, 0); | |
5288 | return result; | |
5289 | } | |
5290 | int32_t v7; | |
5291 | sub_D26100((int32_t)&v7); | |
5292 | sub_9716D8(*(int32_t *)(v2 + 64)); | |
5293 | sub_9F8688(v1); | |
5294 | int32_t v8 = sub_96EF94(*(int32_t *)(v2 + 64), sub_9f87BC(v1)); | |
5295 | if (v8 != 0) | |
5296 | { | |
5297 | sub_1358D14(sub_96D0D0(v8)); | |
5298 | } | |
5299 | v4 = 0; | |
5300 | switch (a3) | |
5301 | { | |
5302 | case 0: | |
5303 | { | |
5304 | v4 = 1; | |
5305 | break; | |
5306 | } | |
5307 | case 4: | |
5308 | { | |
5309 | v4 = 1; | |
5310 | break; | |
5311 | } | |
5312 | } | |
5313 | if (v3 == 0) | |
5314 | { | |
5315 | v5 = sub_6BBC08(v1); | |
5316 | sub_135282C(v3, v5, v4); | |
5317 | } | |
5318 | v6 = sub_6BBC08(v1); | |
5319 | result = sub_970F28(*(int32_t *)(v2 + 64), v6, 1, 0, 0); | |
5320 | return result; | |
5321 | } | |
5322 | int32_t sub_1356F48(int32_t a1, int32_t a2, int32_t a3, int32_t a4) | |
5323 | { | |
5324 | int32_t v1 = loc_150AA80(a1, a2, a3, a4); | |
5325 | if (sub_12D804C(1) == 0) | |
5326 | { | |
5327 | return 0; | |
5328 | } | |
5329 | int32_t v2 = sub_D3D6EC(a3); | |
5330 | if (v2 == 0) | |
5331 | { | |
5332 | return v2 != 0; | |
5333 | } | |
5334 | int32_t v3 = sub_12EF35C(); | |
5335 | int32_t v4; | |
5336 | int32_t v5 = &v4; | |
5337 | int32_t v6 = 0x1931800; | |
5338 | sub_D21058(v5); | |
5339 | int32_t v7; | |
5340 | int32_t v8 = &v7; | |
5341 | sub_D247A8(v8); | |
5342 | sub_14F6178(v5, a3, 9); | |
5343 | int32_t v9 = 18; | |
5344 | int32_t v10 = 0; | |
5345 | while (true) | |
5346 | { | |
5347 | int32_t v11 = v10; | |
5348 | *(char *)(v11 + 136) = *(char *)(a3 + 16 + v10); | |
5349 | *(char *)(v11 + 137) = *(char *)(17 + a3 + v10); | |
5350 | int32_t v12 = v9 - 1; | |
5351 | v9 = v12; | |
5352 | if (v12 == 0) | |
5353 | { | |
5354 | int32_t v13; | |
5355 | sub_D04070((int32_t)&v13, a3 + 52); | |
5356 | sub_14F6178(v8, v3, 46); | |
5357 | int32_t v14; | |
5358 | sub_D3D738(v5, (int32_t)&v14, 768, 0); | |
5359 | int32_t result = sub_13518A4((int32_t)&v6, v1, a2); | |
5360 | return result; | |
5361 | } | |
5362 | v10 += 2; | |
5363 | } | |
5364 | } | |
5365 | int32_t sub_13519D0(int32_t a1, int32_t a2) | |
5366 | { | |
5367 | int32_t v1 = loc_150AA80(a1, a2); | |
5368 | int32_t result = sub_12E4FAC(v1); | |
5369 | if (result != 0) | |
5370 | { | |
5371 | return result; | |
5372 | } | |
5373 | if (sub_D2D690(0) == 0) | |
5374 | { | |
5375 | return 0; | |
5376 | } | |
5377 | int32_t v2 = sub_D2EA08(result); | |
5378 | if (sub_D2D338(v2) == 0) | |
5379 | { | |
5380 | return 0; | |
5381 | } | |
5382 | int32_t v3; | |
5383 | int32_t v4 = &v3; | |
5384 | int32_t v5; | |
5385 | int32_t v6 = &v5; | |
5386 | sub_A8F724(v4, v6, 1024, 1); | |
5387 | if (sub_A8F950(v4, 0, 0) == 0 || sub_13300F0(v1, v4) == 0 || sub_A8FBDC(v4) == 0) | |
5388 | { | |
5389 | return 0; | |
5390 | } | |
5391 | if ((a2 & 8) != 0) | |
5392 | { | |
5393 | sub_D44010(result, v6); | |
5394 | } | |
5395 | if ((a2 & 16) != 0) | |
5396 | { | |
5397 | if (sub_D3A440(result) != 0) | |
5398 | { | |
5399 | sub_D44230(result, v6); | |
5400 | } | |
5401 | } | |
5402 | if ((a2 & 4) == 0) | |
5403 | { | |
5404 | return 0; | |
5405 | } | |
5406 | int32_t v7; | |
5407 | int32_t v8 = &v7; | |
5408 | sub_D247A8(v8); | |
5409 | if (sub_D2D610(result, v8) == 0) | |
5410 | { | |
5411 | return 0; | |
5412 | } | |
5413 | int32_t v9; | |
5414 | int32_t v10 = &v9; | |
5415 | sub_D40558(v10, 0x1878AA4, v6); | |
5416 | int32_t v11; | |
5417 | int32_t v12 = &v11; | |
5418 | int32_t v13; | |
5419 | int32_t v14 = &v13; | |
5420 | sub_A8F788(v12, v14, 1024, 1); | |
5421 | int32_t result2; | |
5422 | if (sub_D405A0(v10, v12) != 0) | |
5423 | { | |
5424 | result2 = sub_D43FF0(result, v8, 1, v14, 0); | |
5425 | } | |
5426 | else | |
5427 | { | |
5428 | result2 = 0; | |
5429 | } | |
5430 | return result2; | |
5431 | } | |
5432 | int32_t sub_13518A4(int32_t a1, int32_t a2, int32_t a3) | |
5433 | { | |
5434 | int32_t v1 = loc_150AA7C(a1, a2, a3); | |
5435 | int32_t result = sub_12E4fAC(v1); | |
5436 | if (result != 0) | |
5437 | { | |
5438 | return result; | |
5439 | } | |
5440 | if (sub_D2D690(0) == 0) | |
5441 | { | |
5442 | return 0; | |
5443 | } | |
5444 | int32_t v2 = sub_D2EA08(result); | |
5445 | if (sub_D2D338(v2) == 0) | |
5446 | { | |
5447 | return 0; | |
5448 | } | |
5449 | int32_t v3; | |
5450 | int32_t v4 = &v3; | |
5451 | int32_t v5; | |
5452 | int32_t v6 = &v5; | |
5453 | sub_A8F724(v4, v6, 1024, 1); | |
5454 | if (sub_A8F950(v4, 0, 0) == 0) | |
5455 | { | |
5456 | return 0; | |
5457 | } | |
5458 | int32_t result2; | |
5459 | if (sub_13300F0(v1, v4) != 0) | |
5460 | { | |
5461 | int32_t v7 = sub_A8FBDC(v4); | |
5462 | if (v7 != 0 && a2 != 0 && a3 > 0) | |
5463 | { | |
5464 | int32_t v8; | |
5465 | int32_t v9 = &v8; | |
5466 | sub_D40558(v9, 0x1878AA4, v6); | |
5467 | int32_t v10; | |
5468 | int32_t v11 = &v10; | |
5469 | int32_t v12; | |
5470 | int32_t v13 = &v12; | |
5471 | sub_A8F788(v11, v13, 1024, 1); | |
5472 | if (sub_D405A0(v9, v11) != 0) | |
5473 | { | |
5474 | result2 = sub_D43FD0(result, a2, a3, v13, 0); | |
5475 | } | |
5476 | else | |
5477 | { | |
5478 | result2 = 0; | |
5479 | } | |
5480 | return result2; | |
5481 | } | |
5482 | result2 = v7; | |
5483 | } | |
5484 | else | |
5485 | { | |
5486 | result2 = 0; | |
5487 | } | |
5488 | return result2; | |
5489 | } | |
5490 | int32_t sub_D44010(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6) | |
5491 | { | |
5492 | int32_t v1 = loc_150AA70(a1, a2, a3, a4, a5, a6); | |
5493 | int32_t v2 = 0; | |
5494 | int32_t v3; | |
5495 | int32_t v4 = &v3; | |
5496 | bool result2 = false; | |
5497 | int32_t v5 = v4; | |
5498 | sub_AE8C70(v4, 0, 48); | |
5499 | int32_t v6 = -1; | |
5500 | *(char *)(v5 + 44) = (char)result2; | |
5501 | int32_t v7 = v5; | |
5502 | *(char *)(v7 + 45) = (char)result2; | |
5503 | *(int32_t *)v5 = v6; | |
5504 | sub_AE8C70(v7, 0, 48); | |
5505 | *(int32_t *)v5 = v6; | |
5506 | *(char *)(v5 + 44) = (char)result2; | |
5507 | v2++; | |
5508 | *(char *)(v5 + 45) = (char)result2; | |
5509 | *(int32_t *)(v5 + 48) = (int32_t)result2; | |
5510 | int32_t v8 = v5 + 52; | |
5511 | v5 = v8; | |
5512 | while (v2 < 100) | |
5513 | { | |
5514 | sub_AE8C70(v8, 0, 48); | |
5515 | v6 = -1; | |
5516 | *(char *)(v5 + 44) = (char)result2; | |
5517 | v7 = v5; | |
5518 | *(char *)(v7 + 45) = (char)result2; | |
5519 | *(int32_t *)v5 = v6; | |
5520 | sub_AE8C70(v7, 0, 48); | |
5521 | *(int32_t *)v5 = v6; | |
5522 | *(char *)(v5 + 44) = (char)result2; | |
5523 | v2++; | |
5524 | *(char *)(v5 + 45) = (char)result2; | |
5525 | *(int32_t *)(v5 + 48) = (int32_t)result2; | |
5526 | v8 = v5 + 52; | |
5527 | v5 = v8; | |
5528 | } | |
5529 | int32_t v9 = 100; | |
5530 | int32_t v10 = sub_D43B5C(v1, v4, (int32_t)&v9); | |
5531 | int32_t result = result2; | |
5532 | if (v10 == 0) | |
5533 | { | |
5534 | return result; | |
5535 | } | |
5536 | int32_t v11; | |
5537 | int32_t v12 = &v11; | |
5538 | v5 = v12; | |
5539 | sub_AE8C70(v12, 0, 48); | |
5540 | *(char *)(v5 + 44) = (char)result2; | |
5541 | result++; | |
5542 | *(char *)(v5 + 45) = (char)result2; | |
5543 | *(int32_t *)v5 = -1; | |
5544 | int32_t v13 = v5 + 48; | |
5545 | v5 = v13; | |
5546 | while (result < 100) | |
5547 | { | |
5548 | sub_AE8C70(v13, 0, 48); | |
5549 | *(char *)(v5 + 44) = (char)result2; | |
5550 | result++; | |
5551 | *(char *)(v5 + 45) = (char)result2; | |
5552 | *(int32_t *)v5 = -1; | |
5553 | v13 = v5 + 48; | |
5554 | v5 = v13; | |
5555 | } | |
5556 | int32_t v14 = result2; | |
5557 | v6 = v14; | |
5558 | int32_t v15 = v9; | |
5559 | v5 = v14; | |
5560 | int32_t v16; | |
5561 | int32_t v17; | |
5562 | int32_t v18; | |
5563 | int32_t v19; | |
5564 | int32_t v20; | |
5565 | int32_t v21; | |
5566 | int32_t v22; | |
5567 | int32_t v23; | |
5568 | int32_t v24; | |
5569 | if (v15 <= 0) | |
5570 | { | |
5571 | if (v14 == 0) | |
5572 | { | |
5573 | return 1; | |
5574 | } | |
5575 | v22 = a2; | |
5576 | v21 = 0x1851618; | |
5577 | sub_150BB04((int32_t)&v24, (int32_t)&v21, 64); | |
5578 | v16 = &v19; | |
5579 | sub_150BB04(v16, (int32_t)&v22, 1024); | |
5580 | v17 = &v23; | |
5581 | v18 = &v20; | |
5582 | sub_A8F788(v17, v18, 1024, 1); | |
5583 | if (sub_D405A0(v16, v17) == 0) | |
5584 | { | |
5585 | return result2; | |
5586 | } | |
5587 | if (sub_D3F6AC(v1, v12, v5, v18, 0) != 0) | |
5588 | { | |
5589 | result2 = true; | |
5590 | } | |
5591 | return result2; | |
5592 | } | |
5593 | result = v4; | |
5594 | int32_t v25; | |
5595 | int32_t v26 = &v25; | |
5596 | v2 = v26; | |
5597 | int32_t v27 = v14; | |
5598 | int32_t v28 = v14; | |
5599 | int32_t v29; | |
5600 | while (true) | |
5601 | { | |
5602 | v29 = v27; | |
5603 | int32_t v30 = v15; | |
5604 | int32_t v31 = v4; | |
5605 | int32_t v32 = v26; | |
5606 | int32_t v33 = v28; | |
5607 | if ((*(int32_t *)v26 & 2) != 0) | |
5608 | { | |
5609 | sub_AE8C70(1176, 0, 48); | |
5610 | *(char *)1220 = (char)result2; | |
5611 | *(char *)1221 = (char)result2; | |
5612 | *(int32_t *)1176 = -1; | |
5613 | sub_14F6178(1176, result, 46); | |
5614 | int32_t v34 = v5 + 1; | |
5615 | v5 = v34; | |
5616 | v29 = v34; | |
5617 | v30 = v9; | |
5618 | v31 = result; | |
5619 | v32 = v2; | |
5620 | v33 = v6; | |
5621 | } | |
5622 | int32_t v35 = v33 + 1; | |
5623 | v6 = v35; | |
5624 | int32_t v36 = v32 + 52; | |
5625 | v2 = v36; | |
5626 | int32_t v37 = v31 + 52; | |
5627 | result = v37; | |
5628 | if (v35 >= v30) | |
5629 | { | |
5630 | break; | |
5631 | } | |
5632 | v27 = v29; | |
5633 | v28 = v35; | |
5634 | v15 = v30; | |
5635 | v4 = v37; | |
5636 | v26 = v36; | |
5637 | } | |
5638 | if (v29 == 0) | |
5639 | { | |
5640 | return 1; | |
5641 | } | |
5642 | v22 = a2; | |
5643 | v21 = 0x1851618; | |
5644 | sub_150BB04((int32_t)&v24, (int32_t)&v21, 64); | |
5645 | v16 = &v19; | |
5646 | sub_150BB04(v16, (int32_t)&v22, 1024); | |
5647 | v17 = &v23; | |
5648 | v18 = &v20; | |
5649 | sub_A8F788(v17, v18, 1024, 1); | |
5650 | if (sub_D405A0(v16, v17) != 0) | |
5651 | { | |
5652 | if (sub_D3F6AC(v1, v12, v5, v18, 0) != 0) | |
5653 | { | |
5654 | result2 = true; | |
5655 | } | |
5656 | } | |
5657 | return result2; | |
5658 | } | |
5659 | //sub_D3F6AC(0, "NAME_PADDING", 1, json_context, 0); | |
5660 | int32_t sub_D3F6AC(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5) | |
5661 | { | |
5662 | int32_t v1 = loc_150AA70(a1, a2, a3, a4, a5); | |
5663 | bool result = false; | |
5664 | char v2 = *(char *)0x1CCB210; | |
5665 | if (a4 == 0 || v1 > 0 || ((int32_t)(v1 < 0) || (int32_t)(v2 == 0)) != 0 || sub_14F8DD4(a4) <= 0) | |
5666 | { | |
5667 | return result; | |
5668 | } | |
5669 | int32_t v3 = result; | |
5670 | bool v4 = true; | |
5671 | if (*(char *)0x1CCB134 != 0) | |
5672 | { | |
5673 | v3 = 0x2005010; | |
5674 | } | |
5675 | int32_t v5 = *(int32_t *)v3; | |
5676 | int32_t v6 = v5; | |
5677 | if (v5 == 0) | |
5678 | { | |
5679 | return result; | |
5680 | } | |
5681 | sub_D320D8(v5, 0, 0); | |
5682 | *(int32_t *)(v6 + 1592) = -1; | |
5683 | *(int32_t *)v6 = 0x1908950; | |
5684 | sub_D32030(v6 + 1600, -1, 0x1908950); | |
5685 | int32_t v7 = result; | |
5686 | *(int32_t *)(v6 + 3160) = v7; | |
5687 | *(int32_t *)(v6 + 3164) = v7; | |
5688 | *(int32_t *)(v6 + 3168) = v7; | |
5689 | *(int32_t *)(v6 + 28) = v3; | |
5690 | *(int32_t *)v6 = 0x190BA90; | |
5691 | if (v6 == 0) | |
5692 | { | |
5693 | return result; | |
5694 | } | |
5695 | int32_t v8 = v6 + 3164; | |
5696 | v3 = v8; | |
5697 | int32_t * v9; | |
5698 | int32_t v10; | |
5699 | int32_t v11; | |
5700 | int32_t v12; | |
5701 | if (v8 != 0) | |
5702 | { | |
5703 | if (*(int32_t *)v8 == 1) | |
5704 | { | |
5705 | v10 = v6; | |
5706 | if (v10 == 0) | |
5707 | { | |
5708 | return result; | |
5709 | } | |
5710 | v11 = result; | |
5711 | v12 = v11; | |
5712 | if (*(char *)0x1CCB134 != 0) | |
5713 | { | |
5714 | v12 = v4 ? 0x2005010 : 0; | |
5715 | } | |
5716 | v9 = (int32_t *)(v10 + 28); | |
5717 | if (v12 == *v9) | |
5718 | { | |
5719 | *v9 = v11; | |
5720 | } | |
5721 | return result; | |
5722 | } | |
5723 | } | |
5724 | if (sub_D38374(v6, v1, a2, a3, a4, a5) != 0) | |
5725 | { | |
5726 | if (sub_D29A80(v6, v3) != 0) | |
5727 | { | |
5728 | if (sub_D29818(0, v6) == 0) | |
5729 | { | |
5730 | v10 = v6; | |
5731 | if (v10 != 0) | |
5732 | { | |
5733 | v11 = result; | |
5734 | v12 = v11; | |
5735 | if (*(char *)0x1CCB134 != 0) | |
5736 | { | |
5737 | v12 = v4 ? 0x2005010 : 0; | |
5738 | } | |
5739 | v9 = (int32_t *)(v10 + 28); | |
5740 | if (v12 == *v9) | |
5741 | { | |
5742 | *v9 = v11; | |
5743 | } | |
5744 | } | |
5745 | } | |
5746 | else | |
5747 | { | |
5748 | result = true; | |
5749 | } | |
5750 | return result; | |
5751 | } | |
5752 | } | |
5753 | if (v3 == 0) | |
5754 | { | |
5755 | v10 = v6; | |
5756 | } | |
5757 | else | |
5758 | { | |
5759 | if (*(int32_t *)(v6 + 3164) != 2) | |
5760 | { | |
5761 | sub_1524308(v3, 1, 0); | |
5762 | sub_1524308(v3, 2, -1); | |
5763 | v10 = v6; | |
5764 | } | |
5765 | else | |
5766 | { | |
5767 | v10 = v6; | |
5768 | } | |
5769 | } | |
5770 | if (v10 != 0) | |
5771 | { | |
5772 | v11 = result; | |
5773 | v12 = v11; | |
5774 | if (*(char *)0x1CCB134 != 0) | |
5775 | { | |
5776 | v12 = v4 ? 0x2005010 : 0; | |
5777 | } | |
5778 | v9 = (int32_t *)(v10 + 28); | |
5779 | if (v12 == *v9) | |
5780 | { | |
5781 | *v9 = v11; | |
5782 | } | |
5783 | } | |
5784 | return result; | |
5785 | } | |
5786 | int32_t sub_D6CBC4(int32_t a1, int32_t a2, int32_t * a3) | |
5787 | { | |
5788 | int32_t v1 = (int32_t)a3; | |
5789 | int32_t v2 = loc_150AA78(a1, a2, v1); | |
5790 | uint28_t v3 = 0; | |
5791 | int28_t v4 = v2 > 0 ? 0x4000000 : 0; | |
5792 | int28_t v5 = v2 == 0 ? 0x2000000 : 0; | |
5793 | int28_t v6 = 0x8000000 * (int28_t)(v2 < 0) | v3 % 0x1000000 | v4 | v5; | |
5794 | if (a3 == NULL || (v3 & 128) == 0 || v6 < 0) | |
5795 | { | |
5796 | return 0; | |
5797 | } | |
5798 | bool v7 = true; | |
5799 | int32_t v8 = *(int32_t *)0x2005010; | |
5800 | int32_t v9 = v8; | |
5801 | if (v8 == 0) | |
5802 | { | |
5803 | return 0; | |
5804 | } | |
5805 | sub_D320D8(v8, 0, 0); | |
5806 | *(int32_t *)v9 = 0x1908950; | |
5807 | *(int32_t *)(v9 + 1592) = -1; | |
5808 | sub_D32030(v9 + 1600, 0x1908950, -1); | |
5809 | *(int32_t *)(v9 + 3160) = 0; | |
5810 | *(int32_t *)(v9 + 28) = 0x2005010; | |
5811 | *(int32_t *)v9 = 0x190B510; | |
5812 | if (v9 == 0) | |
5813 | { | |
5814 | return 0; | |
5815 | } | |
5816 | int32_t * v10; | |
5817 | int32_t v11; | |
5818 | int32_t v12; | |
5819 | int32_t v13; | |
5820 | int32_t v14; | |
5821 | if (*(int32_t *)v1 != 1) | |
5822 | { | |
5823 | if (sub_D37970(v9, v2, a2) != 0) | |
5824 | { | |
5825 | if (sub_D29A80(v9, v1) != 0) | |
5826 | { | |
5827 | int32_t result = 1; | |
5828 | if (sub_D29818(0, v9) == 0) | |
5829 | { | |
5830 | v11 = v9; | |
5831 | if (v11 != 0) | |
5832 | { | |
5833 | v14 = *(int32_t *)(v11 + 12); | |
5834 | if (((int32_t)(v14 < 2) ^ 1 || (int32_t)(v14 < 0)) != 0) | |
5835 | { | |
5836 | *(int32_t *)(v1 + 4) = -1; | |
5837 | } | |
5838 | v13 = 0; | |
5839 | if (*(char *)0x1CCB134 != 0) | |
5840 | { | |
5841 | v13 = v7 ? 0x2005010 : 0; | |
5842 | } | |
5843 | v12 = v9; | |
5844 | if (v12 != 0) | |
5845 | { | |
5846 | v10 = (int32_t *)(v12 + 28); | |
5847 | if (v13 == *v10) | |
5848 | { | |
5849 | *v10 = 0; | |
5850 | result = 0; | |
5851 | } | |
5852 | else | |
5853 | { | |
5854 | result = 0; | |
5855 | } | |
5856 | } | |
5857 | else | |
5858 | { | |
5859 | result = 0; | |
5860 | } | |
5861 | } | |
5862 | else | |
5863 | { | |
5864 | result = 0; | |
5865 | } | |
5866 | } | |
5867 | return result; | |
5868 | } | |
5869 | } | |
5870 | if (*(int32_t *)v1 != 2) | |
5871 | { | |
5872 | sub_1524308(v1, 1, 0); | |
5873 | sub_1524308(v1, 2, -1); | |
5874 | } | |
5875 | } | |
5876 | v11 = v9; | |
5877 | if (v11 == 0) | |
5878 | { | |
5879 | return 0; | |
5880 | } | |
5881 | v14 = *(int32_t *)(v11 + 12); | |
5882 | if (((int32_t)(v14 < 2) ^ 1 || (int32_t)(v14 < 0)) != 0) | |
5883 | { | |
5884 | *(int32_t *)(v1 + 4) = -1; | |
5885 | } | |
5886 | v13 = 0; | |
5887 | if (*(char *)0x1CCB134 != 0) | |
5888 | { | |
5889 | v13 = v7 ? 0x2005010 : 0; | |
5890 | } | |
5891 | v12 = v9; | |
5892 | if (v12 != 0) | |
5893 | { | |
5894 | v10 = (int32_t *)(v12 + 28); | |
5895 | if (v13 == *v10) | |
5896 | { | |
5897 | *v10 = 0; | |
5898 | } | |
5899 | } | |
5900 | return 0; | |
5901 | } | |
5902 | int32_t sub_D651E4(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6, int32_t * a7) | |
5903 | { | |
5904 | int32_t v1 = (int32_t)a7; | |
5905 | int32_t v2 = sub_150AA68(a1, a2, a3, a4, a5, a6, v1); | |
5906 | bool result = false; | |
5907 | int32_t v3 = 0x2005010; | |
5908 | int32_t v4 = *(int32_t *)0x2005010; | |
5909 | int32_t v5 = v4; | |
5910 | if (v4 == 0) | |
5911 | { | |
5912 | return false; | |
5913 | } | |
5914 | sub_D320D8(v4, 0, 0); | |
5915 | *(int32_t *)(v5 + 1592) = -1; | |
5916 | *(int32_t *)v5 = 0x1908950; | |
5917 | sub_D32030(v5 + 1600, -1, 0x1908950); | |
5918 | *(int32_t *)(v5 + 3160) = (int32_t)result; | |
5919 | *(int32_t *)(v5 + 28) = 0x2005010; | |
5920 | *(int32_t *)v5 = 0x190A540; | |
5921 | if (v5 == 0) | |
5922 | { | |
5923 | return result; | |
5924 | } | |
5925 | int32_t * v6; | |
5926 | int32_t v7; | |
5927 | int32_t v8; | |
5928 | bool result3; | |
5929 | int32_t v9; | |
5930 | int32_t v10; | |
5931 | bool result2; | |
5932 | int32_t v11; | |
5933 | if (v1 != 0) | |
5934 | { | |
5935 | if (*(int32_t *)v1 == 1) | |
5936 | { | |
5937 | v7 = v5; | |
5938 | if (v7 == 0) | |
5939 | { | |
5940 | result2 = result; | |
5941 | } | |
5942 | else | |
5943 | { | |
5944 | v11 = *(int32_t *)(v7 + 12); | |
5945 | if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0) | |
5946 | { | |
5947 | *(int32_t *)(v1 + 4) = -1; | |
5948 | } | |
5949 | result3 = result; | |
5950 | v8 = result3; | |
5951 | v10 = v8; | |
5952 | if (*(char *)0x1CCB134 != 0) | |
5953 | { | |
5954 | v10 = v3; | |
5955 | } | |
5956 | v9 = v5; | |
5957 | if (v9 != 0) | |
5958 | { | |
5959 | v6 = (int32_t *)(v9 + 28); | |
5960 | if (v10 == *v6) | |
5961 | { | |
5962 | *v6 = v8; | |
5963 | result2 = result3; | |
5964 | } | |
5965 | else | |
5966 | { | |
5967 | result2 = result3; | |
5968 | } | |
5969 | } | |
5970 | else | |
5971 | { | |
5972 | result2 = result3; | |
5973 | } | |
5974 | } | |
5975 | return result2; | |
5976 | } | |
5977 | } | |
5978 | int32_t v12; | |
5979 | if (sub_D3310C(v5, v2, a2, a3, a4, a5, a6) == 0) | |
5980 | { | |
5981 | v12 = v1; | |
5982 | if (v12 == 0) | |
5983 | { | |
5984 | v7 = v5; | |
5985 | if (v7 == 0) | |
5986 | { | |
5987 | return result; | |
5988 | } | |
5989 | v11 = *(int32_t *)(v7 + 12); | |
5990 | if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0) | |
5991 | { | |
5992 | *(int32_t *)(v1 + 4) = -1; | |
5993 | } | |
5994 | result3 = result; | |
5995 | v8 = result3; | |
5996 | v10 = v8; | |
5997 | if (*(char *)0x1CCB134 != 0) | |
5998 | { | |
5999 | v10 = v3; | |
6000 | } | |
6001 | v9 = v5; | |
6002 | if (v9 != 0) | |
6003 | { | |
6004 | v6 = (int32_t *)(v9 + 28); | |
6005 | if (v10 == *v6) | |
6006 | { | |
6007 | *v6 = v8; | |
6008 | } | |
6009 | } | |
6010 | return result3; | |
6011 | } | |
6012 | if (*(int32_t *)v12 != 2) | |
6013 | { | |
6014 | sub_1524308(v12, 1, 0); | |
6015 | sub_1524308(v1, 2, -1); | |
6016 | } | |
6017 | v7 = v5; | |
6018 | if (v7 == 0) | |
6019 | { | |
6020 | result2 = result; | |
6021 | } | |
6022 | else | |
6023 | { | |
6024 | v11 = *(int32_t *)(v7 + 12); | |
6025 | if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0) | |
6026 | { | |
6027 | *(int32_t *)(v1 + 4) = -1; | |
6028 | } | |
6029 | result3 = result; | |
6030 | v8 = result3; | |
6031 | v10 = v8; | |
6032 | if (*(char *)0x1CCB134 != 0) | |
6033 | { | |
6034 | v10 = v3; | |
6035 | } | |
6036 | v9 = v5; | |
6037 | if (v9 != 0) | |
6038 | { | |
6039 | v6 = (int32_t *)(v9 + 28); | |
6040 | if (v10 == *v6) | |
6041 | { | |
6042 | *v6 = v8; | |
6043 | result2 = result3; | |
6044 | } | |
6045 | else | |
6046 | { | |
6047 | result2 = result3; | |
6048 | } | |
6049 | } | |
6050 | else | |
6051 | { | |
6052 | result2 = result3; | |
6053 | } | |
6054 | } | |
6055 | return result2; | |
6056 | } | |
6057 | if (sub_D29A80(v5, v1) != 0) | |
6058 | { | |
6059 | if (sub_D29818(0, v5) != 0) | |
6060 | { | |
6061 | return true; | |
6062 | } | |
6063 | v7 = v5; | |
6064 | if (v7 == 0) | |
6065 | { | |
6066 | result2 = result; | |
6067 | } | |
6068 | else | |
6069 | { | |
6070 | v11 = *(int32_t *)(v7 + 12); | |
6071 | if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0) | |
6072 | { | |
6073 | *(int32_t *)(v1 + 4) = -1; | |
6074 | } | |
6075 | result3 = result; | |
6076 | v8 = result3; | |
6077 | v10 = v8; | |
6078 | if (*(char *)0x1CCB134 != 0) | |
6079 | { | |
6080 | v10 = v3; | |
6081 | } | |
6082 | v9 = v5; | |
6083 | if (v9 != 0) | |
6084 | { | |
6085 | v6 = (int32_t *)(v9 + 28); | |
6086 | if (v10 == *v6) | |
6087 | { | |
6088 | *v6 = v8; | |
6089 | result2 = result3; | |
6090 | } | |
6091 | else | |
6092 | { | |
6093 | result2 = result3; | |
6094 | } | |
6095 | } | |
6096 | else | |
6097 | { | |
6098 | result2 = result3; | |
6099 | } | |
6100 | } | |
6101 | return result2; | |
6102 | } | |
6103 | v12 = v1; | |
6104 | if (v12 != 0) | |
6105 | { | |
6106 | if (*(int32_t *)v12 != 2) | |
6107 | { | |
6108 | sub_1524308(v12, 1, 0); | |
6109 | sub_1524308(v1, 2, -1); | |
6110 | } | |
6111 | } | |
6112 | v7 = v5; | |
6113 | if (v7 == 0) | |
6114 | { | |
6115 | result2 = result; | |
6116 | } | |
6117 | else | |
6118 | { | |
6119 | v11 = *(int32_t *)(v7 + 12); | |
6120 | if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0) | |
6121 | { | |
6122 | *(int32_t *)(v1 + 4) = -1; | |
6123 | } | |
6124 | result3 = result; | |
6125 | v8 = result3; | |
6126 | v10 = v8; | |
6127 | if (*(char *)0x1CCB134 != 0) | |
6128 | { | |
6129 | v10 = v3; | |
6130 | } | |
6131 | v9 = v5; | |
6132 | if (v9 != 0) | |
6133 | { | |
6134 | v6 = (int32_t *)(v9 + 28); | |
6135 | if (v10 == *v6) | |
6136 | { | |
6137 | *v6 = v8; | |
6138 | result2 = result3; | |
6139 | } | |
6140 | else | |
6141 | { | |
6142 | result2 = result3; | |
6143 | } | |
6144 | } | |
6145 | else | |
6146 | { | |
6147 | result2 = result3; | |
6148 | } | |
6149 | } | |
6150 | return result2; | |
6151 | } | |
6152 | ||
6153 | ||
6154 | ||
6155 | ||
6156 | ||
6157 | /* | |
6158 | trying to block the blacklist for when youre kicked | |
6159 | A8BF68 | |
6160 | D232DC | |
6161 | A8C3F4 | |
6162 | A8B5FC | |
6163 | A8BBBC | |
6164 | A8B978 | |
6165 | D11D0C | |
6166 | ||
6167 | D04048 138E5C0 = 4B975A89 | |
6168 | D26100 138E600 = 4B997B01 | |
6169 | 9F8FD8 138E644 = 4B66A995 | |
6170 | ||
6171 | ||
6172 | //blr = 0x4E800020 | |
6173 | 0xA8BBBC = 0x60850000 //this stops you from joining a new session. not protecting | |
6174 | 0xA8B978 = 0x80630010 //freeze | |
6175 | 0x970F28 = 0x7C0802A6 // not protecting | |
6176 | 0x1358AAC = 0x7C0802A6 //this one protects against it but makes everyone leave | |
6177 | ||
6178 | //nopped | |
6179 | 0x1358E50 = 4B732D6D | |
6180 | 0x1358E84 = 4B732AF5 | |
6181 | 0x1358D08 = 4B618221 | |
6182 | 0x1358C08 = 4BFFFEA5 | |
6183 | 0x138F9F0 = 4BFFE6D9 nop //this one protects against it but makes everyone leave | |
6184 | 0x138F9DC = F821FF91 blr //this one protects against it but makes everyone leave | |
6185 | 0x138E5BC = 30611AE4 branch 48001418 // //this one protects against it but makes everyone leave | |
6186 | 0x138E600 = 4B997B01 | |
6187 | 0x138E614 = 483C6B4D //not tried but didnt protect | |
6188 | 0x138E624 = 4B5E0AF1 //this one protects against it but makes everyone leave | |
6189 | 0x138E638 = 4BF63621 | |
6190 | 0x138E644 = 4B66A995 //not protecting | |
6191 | 0x138E670 = 4BFCA43D //this one protects against it but makes everyone leave the curret best | |
6192 | */ | |
6193 | ||
6194 | ||
6195 | ||
6196 | ||
6197 | ||
6198 | ||
6199 | ||
6200 | ||
6201 | ||
6202 | ||
6203 | ||
6204 | ||
6205 | ||
6206 | ||
6207 | ||
6208 | ||
6209 | void func_51() | |
6210 | { | |
6211 | int iVar0 = _GET_TOTAL_SC_INBOX_IDS(); | |
6212 | int iVar1 = 0; | |
6213 | while (iVar1 < iVar0) | |
6214 | { | |
6215 | if (!_IS_SC_INBOX_VALID(iVar1)) | |
6216 | { | |
6217 | Hash iVar2 = _SC_INBOX_MESSAGE_INIT(iVar1); | |
6218 | printf("SC MESSAGE TYPE: 0x%X\n", iVar2); | |
6219 | switch (iVar2) | |
6220 | { | |
6221 | case 0xCBB12972: // crew_message | |
6222 | { | |
6223 | //requires, crewId and crewTag | |
6224 | printf("crew_message: 0x%X\n", iVar2); | |
6225 | break; | |
6226 | } | |
6227 | case 0xEDF54CE2: // statupdate | |
6228 | { | |
6229 | printf("statupdate: 0x%X\n", iVar2); | |
6230 | break; | |
6231 | } | |
6232 | case 0x8C571656: // mission_verified | |
6233 | { | |
6234 | printf("mission_verified: 0x%X\n", iVar2); | |
6235 | break; | |
6236 | } | |
6237 | case 0x70E4D0E1: // rockstar_message | |
6238 | { | |
6239 | printf("rockstar_message: 0x%X\n", iVar2); | |
6240 | break; | |
6241 | } | |
6242 | case 0x2190F9E1: // ugcstatupdate | |
6243 | { | |
6244 | printf("ugcstatupdate: 0x%X\n", iVar2); | |
6245 | break; | |
6246 | } | |
6247 | case 0xD36120CE: // game_award | |
6248 | { | |
6249 | //type-> cash or xp | |
6250 | //amt-> 999999 | |
6251 | //from-> Rockstar | |
6252 | printf("game_award: 0x%X\n", iVar2); | |
6253 | break; | |
6254 | } | |
6255 | case 0x134AB8CF: // bounty | |
6256 | { | |
6257 | printf("bounty: 0x%X\n", iVar2); | |
6258 | break; | |
6259 | } | |
6260 | } | |
6261 | } | |
6262 | iVar1++; | |
6263 | } | |
6264 | } | |
6265 | ||
6266 | ||
6267 | ||
6268 | ||
6269 | ||
6270 | ||
6271 | ||
6272 | ||
6273 | ||
6274 | ||
6275 | ||
6276 | ||
6277 | ||
6278 | ||
6279 | ||
6280 | ||
6281 | ||
6282 | ||
6283 | ||
6284 | ||
6285 | int32_t createAmbientPickupFunc(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, uint32_t a6, uint32_t a7, int32_t a8) | |
6286 | { | |
6287 | int32_t v1 = sub_150AA74(a1, a2, a3, a4, a5, a6, a7, a8); | |
6288 | int32_t v2 = a7 % 256; | |
6289 | int32_t v3 = a6 % 256; | |
6290 | if (*(char *)0x223F0C0 == 0) | |
6291 | { | |
6292 | return sub_3FA198(v1, a2, a3, a4, a5, v3, v2); | |
6293 | } | |
6294 | int32_t v4; | |
6295 | int32_t v5; | |
6296 | int32_t v6; | |
6297 | int32_t v7; | |
6298 | int32_t v8; | |
6299 | int32_t v9; | |
6300 | int32_t v10; | |
6301 | if (*(int32_t *)0x2183F14 == v1) | |
6302 | { | |
6303 | v9 = sub_D25F10((int32_t)&v7, 0); | |
6304 | v10 = sub_9F858C(v9); | |
6305 | if (v10 == 0) | |
6306 | { | |
6307 | v6 = sub_12EF35C(); | |
6308 | sub_131BC34(v10, v6, a4, v1); | |
6309 | return sub_3FA198(v1, a2, a3, a4, a5, v3, v2); | |
6310 | } | |
6311 | rand(); | |
6312 | v4 = v8; | |
6313 | if (*(int32_t *)(sub_9F8604(0x2FB220, 0x300000) + 0x300000) != 0) | |
6314 | { | |
6315 | v5 = sub_1545344(); | |
6316 | reportCashSpawnfn(v4, a4, v1, v5); | |
6317 | return sub_3FA198(v1, a2, a3, a4, a5, v3, v2); | |
6318 | } | |
6319 | v6 = sub_12EF35C(); | |
6320 | sub_131BC34(v4, v6, a4, v1); | |
6321 | return sub_3FA198(v1, a2, a3, a4, a5, v3, v2); | |
6322 | } | |
6323 | if (*(int32_t *)0x2183F18 == v1 || *(int32_t *)0x2183F1C == v1 || *(int32_t *)0x2183F20 == v1 || *(int32_t *)0x2183F24 == v1 || *(int32_t *)0x2183F28 == v1) | |
6324 | { | |
6325 | v9 = sub_D25F10((int32_t)&v7, 0); | |
6326 | v10 = sub_9F858C(v9); | |
6327 | v4 = v10; | |
6328 | if (v10 != 0) | |
6329 | { | |
6330 | rand(); | |
6331 | v4 = v8; | |
6332 | if (*(int32_t *)(sub_9F8604(0x2FB220, 0x300000) + 0x300000) != 0) | |
6333 | { | |
6334 | v5 = sub_1545344(); | |
6335 | reportCashSpawnfn(v4, a4, v1, v5); | |
6336 | return sub_3FA198(v1, a2, a3, a4, a5, v3, v2); | |
6337 | } | |
6338 | } | |
6339 | v6 = sub_12EF35C(); | |
6340 | sub_131BC34(v4, v6, a4, v1); | |
6341 | return sub_3FA198(v1, a2, a3, a4, a5, v3, v2); | |
6342 | } | |
6343 | if (*(int32_t *)0x2183F2C != v1) | |
6344 | { | |
6345 | return sub_3FA198(v1, a2, a3, a4, a5, v3, v2); | |
6346 | } | |
6347 | v9 = sub_D25F10((int32_t)&v7, 0); | |
6348 | v10 = sub_9F858C(v9); | |
6349 | v4 = v10; | |
6350 | if (v10 != 0) | |
6351 | { | |
6352 | rand(); | |
6353 | v4 = v8; | |
6354 | if (*(int32_t *)(sub_9F8604(0x2FB220, 0x300000) + 0x300000) != 0) | |
6355 | { | |
6356 | v5 = sub_1545344(); | |
6357 | reportCashSpawnfn(v4, a4, v1, v5); | |
6358 | return sub_3FA198(v1, a2, a3, a4, a5, v3, v2); | |
6359 | } | |
6360 | } | |
6361 | v6 = sub_12EF35C(); | |
6362 | sub_131BC34(v4, v6, a4, v1); | |
6363 | return sub_3FA198(v1, a2, a3, a4, a5, v3, v2); | |
6364 | } | |
6365 | ||
6366 | /* | |
6367 | ||
6368 | r0=000000000019660D r8=00000000100000A0 r16=0000000000000000 r24=0000000000000000 | |
6369 | r1=00000000D003F610 r9=00000000100001C4 r17=00000000D0040430 r25=0000000000000001 | |
6370 | r2=0000000001C85330 r10=00000000100001B0 r18=0000000035F680D8 r26=DEF76158880A67D9 | |
6371 | r3=DEF76158880A67D9 r11=0007213E023A5975 r19=0000000001CC2FA8 r27=FFFFFFFFCE6FDD6B | |
6372 | r4=0000000000009C40 r12=0000000002290308 r20=0000000032293664 r28=0000000010069664 | |
6373 | r5=FFFFFFFFCE6FDD6B r13=0000000010007060 r21=0000000035F68000 r29=0000000000000000 | |
6374 | r6=0000000000000005 r14=0000000000000000 r22=0000000001E70370 r30=0000000000009C40 | |
6375 | r7=00000000100001AC r15=0000000000000000 r23=00000000320A8DC0 r31=00000000113FD533 | |
6376 | ||
6377 | xer=0000000000000000 ctr=000000000227512C lr=00000000003FA628 fpscr=BF324500 | |
6378 | ||
6379 | cr=48000044 cr0=GT cr1=LT cr2= cr3= cr4= cr5= cr6=GT cr7=GT | |
6380 | ||
6381 | pc=00000000012D73D8 | |
6382 | ||
6383 | ||
6384 | ||
6385 | */ | |
6386 | ||
6387 | ||
6388 | //model hash is in r31 | |
6389 | GAME_EXPORT int32_t reportCashSpawnfn(int32_t a1, int32_t amount, int32_t pickup_hash_0xFFFFFFFFCE6FDD6B, int32_t ret_sub_1545344); | |
6390 | GAME_EXPORT int32_t sub_1545344(int32_t cNetGamePlayer); | |
6391 | ||
6392 | ||
6393 | void report_player_test() | |
6394 | { | |
6395 | int32_t _rand = rand(); | |
6396 | printf("rand: 0x%X\n", _rand); | |
6397 | int32_t v5 = sub_1545344(CNetGamePlayerFn(iSelectedPlayer, 1)); | |
6398 | reportCashSpawnfn(_rand, 40000, 0xFFFFFFFFCE6FDD6B, v5); | |
6399 | } | |
6400 | ||
6401 | ||
6402 | ||
6403 | ||
6404 | ||
6405 | ||
6406 | ||
6407 | GAME_EXPORT char* GetLabelTextByGXTFunc(address, gxt_label); // 0xD914CC | |
6408 | char backup_GetLabelTextByGXT[4 * 4]; | |
6409 | ||
6410 | char *_MY_GetLabelTextByGXT(int32_t unk_20668B0, char *label_name) | |
6411 | { | |
6412 | printf("unk_20668B0: 0x%X\n", unk_20668B0); | |
6413 | printf("label_name: %s\n", label_name); | |
6414 | ||
6415 | ||
6416 | ||
6417 | ||
6418 | //backup hook, revert, call, hook | |
6419 | char backup_hook[4 * 4]; | |
6420 | WriteProcessMemory(backup_hook, (const void *)0xD914CC, 4 * 4); | |
6421 | WriteProcessMemory((void *)0xD914CC, backup_GetLabelTextByGXT, 4 * 4); | |
6422 | char *ret = GetLabelTextByGXTFunc(unk_20668B0, label_name); | |
6423 | WriteProcessMemory((void *)0xD914CC, backup_hook, 4 * 4); | |
6424 | return ret; | |
6425 | } | |
6426 | ||
6427 | ||
6428 | ||
6429 | WriteProcessMemory(backup_GetLabelTextByGXT, (const void *)0xD914CC, 4 * 4); | |
6430 | PatchInJump(0xD914CC, (int)_MY_GetLabelTextByGXT, false); | |
6431 | ||
6432 | ||
6433 | ||
6434 | ||
6435 | ||
6436 | ||
6437 | ||
6438 | ||
6439 | ||
6440 | ||
6441 | //nop all if you freeze | |
6442 | 00A51B60; | |
6443 | 0A51B6C; | |
6444 | 0A51B74; | |
6445 | 00A51B74; | |
6446 | 000A51B78; | |
6447 | 0A51B84; | |
6448 | 00A51B88; | |
6449 | 00A51B8C; | |
6450 | 0A51B94; | |
6451 | 0A51B98; | |
6452 | 0A51BA4; | |
6453 | 00A51BB0; | |
6454 | 0A51BB4; | |
6455 | 00A51BBC; | |
6456 | 0A51BC0; | |
6457 | 0A51BC4; | |
6458 | 0A51BC8; | |
6459 | 0A51BD0; | |
6460 | 00A51BD4; | |
6461 | 0A51BEC; | |
6462 | 00A51BF8; | |
6463 | ||
6464 | ||
6465 | //texture freeze protection | |
6466 | //0x12D30D8 = 0x60000000; | |
6467 | //0x12D3118 = 0x60000000; | |
6468 | ||
6469 | ||
6470 | ||
6471 | ||
6472 | ||
6473 | /* | |
6474 | Rage::Import | |
6475 | 0xD095A365 | |
6476 | platform:/levels/gta5/scenario/Alamo_Sea.cmt | |
6477 | 1 | |
6478 | 0 | |
6479 | 1 | |
6480 | 0 | |
6481 | ||
6482 | ||
6483 | 0xD09A5563 | |
6484 | platform:/levels/gta5/streaming/ah_1_int_srl.cmt | |
6485 | 1 | |
6486 | ah_1_int_srl.cmt | |
6487 | 0 | |
6488 | 1 | |
6489 | ||
6490 | 0xD09EA573 | |
6491 | dlcMPHeist:/ps3/levels/gta5/streaming/heist_int_srl.cmt | |
6492 | 1 | |
6493 | heist_int_srl.cmt | |
6494 | 0 | |
6495 | 1 | |
6496 | */ | |
6497 | ||
6498 | ||
6499 | ||
6500 | ||
6501 | ||
6502 | ||
6503 | ||
6504 | ||
6505 | //using sc features with out being in game | |
6506 | //make a post respones | |
6507 | // https://socialclub.rockstargames.com/crew/crew_message | |
6508 | // {"crewId":39499191,"message":"hello world","nickname":""} | |
6509 | ||
6510 | ||
6511 | ||
6512 | ||
6513 | ||
6514 | ||
6515 | ||
6516 | ||
6517 | ||
6518 | ||
6519 | ||
6520 | ||
6521 | ||
6522 | ||
6523 | ||
6524 | ||
6525 | ||
6526 | ||
6527 | ||
6528 | ||
6529 | static size_t _wcslen(const wchar_t *s) | |
6530 | { | |
6531 | const wchar_t *p; | |
6532 | ||
6533 | p = s; | |
6534 | while (*p) | |
6535 | p++; | |
6536 | ||
6537 | return p - s; | |
6538 | } | |
6539 | static int _wcslen(char *str) | |
6540 | { | |
6541 | int nullCount = 0; | |
6542 | int i = 0; | |
6543 | for (i = 0; i < 64; i++) | |
6544 | { | |
6545 | if (nullCount == 2) | |
6546 | { | |
6547 | break; | |
6548 | } | |
6549 | if (*(str + i) == 0x00) | |
6550 | { | |
6551 | nullCount++; | |
6552 | } | |
6553 | else | |
6554 | { | |
6555 | nullCount = 0; | |
6556 | } | |
6557 | } | |
6558 | return i; | |
6559 | } | |
6560 | static size_t StringToWideCharacter(wchar_t *dest, const char *scr, size_t len) | |
6561 | { | |
6562 | int count = 0; | |
6563 | if (len) | |
6564 | { | |
6565 | do | |
6566 | { | |
6567 | if ((*dest++ = (wchar_t)*scr++) == 0) | |
6568 | break; | |
6569 | count++; | |
6570 | } while (--len); | |
6571 | } | |
6572 | return count; | |
6573 | } | |
6574 | static size_t WideCharacterToString(char *dest, const wchar_t *scr, size_t len) | |
6575 | { | |
6576 | int count = 0; | |
6577 | if (len) | |
6578 | { | |
6579 | do | |
6580 | { | |
6581 | if ((*dest++ = (char)*scr++) == 0) | |
6582 | break; | |
6583 | count++; | |
6584 | } while (--len); | |
6585 | } | |
6586 | return count; | |
6587 | } | |
6588 | ||
6589 | ||
6590 | ||
6591 | ||
6592 | ||
6593 | //#define InitializeCriticalSection(lpCriticalSection) pthread_mutex_init(lpCriticalSection, NULL) | |
6594 | //#define DeleteCriticalSection(lpCriticalSection) pthread_mutex_destroy(lpCriticalSection) | |
6595 | //#define EnterCriticalSection(lpCriticalSection) pthread_mutex_lock(lpCriticalSection) | |
6596 | //#define LeaveCriticalSection(lpCriticalSection) pthread_mutex_unlock(lpCriticalSection) | |
6597 | //pthread_mutex_t DetourAsmSection; | |
6598 | ||
6599 | //#define InitializeCriticalSection(lpCriticalSection) sys_lwmutex_create(lpCriticalSection, NULL) | |
6600 | //#define DeleteCriticalSection(lpCriticalSection) sys_lwmutex_destroy(lpCriticalSection) | |
6601 | //#define EnterCriticalSection(lpCriticalSection) sys_lwmutex_lock(lpCriticalSection, 0) | |
6602 | //#define LeaveCriticalSection(lpCriticalSection) sys_lwmutex_unlock(lpCriticalSection) | |
6603 | //sys_lwmutex_t DetourAsmSection; | |
6604 | ||
6605 | ||
6606 | ||
6607 | ||
6608 | ||
6609 | ||
6610 | ||
6611 | ||
6612 | ||
6613 | ||
6614 | ||
6615 | ||
6616 | ||
6617 | ||
6618 | ||
6619 | ||
6620 | ||
6621 | int32_t sub_A5660C(int32_t a1) | |
6622 | { | |
6623 | int32_t v1 = __savegprlr_26(); // 0x150AA7C | |
6624 | int32_t v2 = v1; | |
6625 | int32_t * v3 = (int32_t *)(v1 + 140); | |
6626 | uint32_t v4 = *v3; | |
6627 | if (v4 >= 1) | |
6628 | { | |
6629 | int32_t v5 = v4 - *(int32_t *)0x1EC673C; | |
6630 | *v3 = v5 < 0 ? 0 : v5; | |
6631 | v1 = v2; | |
6632 | } | |
6633 | int32_t v6 = *(int32_t *)(v1 + 52); | |
6634 | int32_t v7; | |
6635 | int32_t v8; | |
6636 | int32_t v9; | |
6637 | int32_t v10; | |
6638 | int32_t v11; | |
6639 | int32_t v12; | |
6640 | int32_t v13; | |
6641 | int32_t v14; | |
6642 | int32_t result2; | |
6643 | int32_t result; | |
6644 | int32_t result3; | |
6645 | int32_t v15; | |
6646 | int32_t v16; | |
6647 | int32_t v17; | |
6648 | int32_t v18; | |
6649 | int32_t v19; | |
6650 | int32_t v20; | |
6651 | int32_t v21; | |
6652 | if (v6 == 0) | |
6653 | { | |
6654 | result = __asm_rlwinm((int32_t)*(char *)(v1 + 173), 30, 31, 31); | |
6655 | if (result == 0) | |
6656 | { | |
6657 | return 0; | |
6658 | } | |
6659 | v11 = v2; | |
6660 | v17 = *(int32_t *)(v11 + 28); | |
6661 | if (v17 == 0) | |
6662 | { | |
6663 | return result; | |
6664 | } | |
6665 | v18 = *(int32_t *)(v17 + 8); | |
6666 | if (v18 == 0) | |
6667 | { | |
6668 | v13 = v11; | |
6669 | if (*(int32_t *)(v17 + 8) != 0) | |
6670 | { | |
6671 | v20 = *(int32_t *)(v13 + 140); | |
6672 | if (v20 == 0) | |
6673 | { | |
6674 | int32_t l_var = sub_15BA0E4(v20); | |
6675 | v21 = *(int32_t *)(v13 + 28); | |
6676 | v7 = 0; | |
6677 | if (v21 != 0) | |
6678 | { | |
6679 | v7 = *(int32_t *)(v21 + 8); | |
6680 | } | |
6681 | v15 = &v8; | |
6682 | sub_A8B814(v15); | |
6683 | v16 = &v9; | |
6684 | sub_A8B908(v15, v16, 982); | |
6685 | if (aub_1626844(*(int32_t *)0x1EC69C8, v15) == 0) | |
6686 | { | |
6687 | sub_46E30C(l_var, unk); | |
6688 | } | |
6689 | else | |
6690 | { | |
6691 | sub_A8B978(v15); | |
6692 | v14 = sub_9F8E10(); | |
6693 | sub_9F8FF0(v14, v7, v16, 1, (int32_t)&v10, 0); | |
6694 | } | |
6695 | *(int32_t *)(v2 + 140) = 250; | |
6696 | result2 = 250; | |
6697 | } | |
6698 | else | |
6699 | { | |
6700 | result2 = v20; | |
6701 | } | |
6702 | } | |
6703 | else | |
6704 | { | |
6705 | result2 = 0; | |
6706 | } | |
6707 | return result2; | |
6708 | } | |
6709 | result3 = aub_9F8FD8(v18); | |
6710 | v12 = v2; | |
6711 | v19 = *(int32_t *)(v12 + 28); | |
6712 | if (result3 != 0 || v19 == 0) | |
6713 | { | |
6714 | return result3; | |
6715 | } | |
6716 | v13 = v12; | |
6717 | if (*(int32_t *)(v19 + 8) != 0) | |
6718 | { | |
6719 | v20 = *(int32_t *)(v13 + 140); | |
6720 | if (v20 == 0) | |
6721 | { | |
6722 | v21 = *(int32_t *)(v13 + 28); | |
6723 | v7 = 0; | |
6724 | if (v21 != 0) | |
6725 | { | |
6726 | v7 = *(int32_t *)(v21 + 8); | |
6727 | } | |
6728 | v15 = &v8; | |
6729 | sub_A8B814(v15); | |
6730 | v16 = &v9; | |
6731 | sub_A8B908(v15, v16, 982); | |
6732 | if (sub_1626844(*(int32_t *)0x1EC69C8, v15) == 0) | |
6733 | { | |
6734 | ||
6735 | } | |
6736 | else | |
6737 | { | |
6738 | sub_A8B978(v15); | |
6739 | v14 = sub_9F8E10(); | |
6740 | sub_9F8FF0(v14, v7, v16, 1, (int32_t)&v10, 0); | |
6741 | } | |
6742 | *(int32_t *)(v2 + 140) = 250; | |
6743 | result2 = 250; | |
6744 | } | |
6745 | else | |
6746 | { | |
6747 | result2 = v20; | |
6748 | } | |
6749 | } | |
6750 | else | |
6751 | { | |
6752 | result2 = 0; | |
6753 | } | |
6754 | return result2; | |
6755 | } | |
6756 | if (sub_9D8FD8(v6) != 0) | |
6757 | { | |
6758 | int32_t result4 = *(int32_t *)(v2 + 12); | |
6759 | if (result4 != 0) | |
6760 | { | |
6761 | return result4; | |
6762 | } | |
6763 | int32_t v22 = (int32_t)*(char *)(v2 + 173); | |
6764 | if (__asm_rlwinm(v22, 31, 31, 31) == 0) | |
6765 | { | |
6766 | int32_t v23 = __asm_rlwinm(v22, 25, 31, 31); | |
6767 | if (v23 == 0) | |
6768 | { | |
6769 | result2 = v2; | |
6770 | } | |
6771 | else | |
6772 | { | |
6773 | result2 = v23; | |
6774 | } | |
6775 | } | |
6776 | else | |
6777 | { | |
6778 | int32_t v24 = *(int32_t *)(v2 + 140); | |
6779 | if (v24 == 0) | |
6780 | { | |
6781 | if (*(int32_t *)(*(int32_t *)0x1CC57B8 + 36) != 0) | |
6782 | { | |
6783 | int32_t l_var = sub_15BA0E4(a1 + 4); | |
6784 | sub_46E098(l_var); | |
6785 | } | |
6786 | *(int32_t *)(v2 + 52) = 0; | |
6787 | result2 = sub_A563E4(v2, 0); | |
6788 | } | |
6789 | else | |
6790 | { | |
6791 | result2 = v24; | |
6792 | } | |
6793 | } | |
6794 | return result2; | |
6795 | } | |
6796 | result = __asm_rlwinm((int32_t)*(char *)(v2 + 173), 30, 31, 31); | |
6797 | if (result == 0) | |
6798 | { | |
6799 | return 0; | |
6800 | } | |
6801 | v11 = v2; | |
6802 | v17 = *(int32_t *)(v11 + 28); | |
6803 | if (v17 == 0) | |
6804 | { | |
6805 | //return sub_483F50(r3, r4, r5, r6, r7, r8); | |
6806 | } | |
6807 | v18 = *(int32_t *)(v17 + 8); | |
6808 | if (v18 == 0) | |
6809 | { | |
6810 | v13 = v11; | |
6811 | if (*(int32_t *)(v17 + 8) != 0) | |
6812 | { | |
6813 | v20 = *(int32_t *)(v13 + 140); | |
6814 | if (v20 == 0) | |
6815 | { | |
6816 | v21 = *(int32_t *)(v13 + 28); | |
6817 | v7 = 0; | |
6818 | if (v21 != 0) | |
6819 | { | |
6820 | v7 = *(int32_t *)(v21 + 8); | |
6821 | } | |
6822 | v15 = &v8; | |
6823 | sub_A8B814(v15); | |
6824 | v16 = &v9; | |
6825 | sub_A8B908(v15, v16, 982); | |
6826 | if (sub_1626844(*(int32_t *)0x1EC69C8, v15) == 0) | |
6827 | { | |
6828 | ||
6829 | } | |
6830 | else | |
6831 | { | |
6832 | sub_A8B978(v15); | |
6833 | v14 = sub_9F8E10(); | |
6834 | sub_9F8FF0(v14, v7, v16, 1, (int32_t)&v10, 0); | |
6835 | } | |
6836 | *(int32_t *)(v2 + 140) = 250; | |
6837 | result2 = 250; | |
6838 | } | |
6839 | else | |
6840 | { | |
6841 | result2 = v20; | |
6842 | } | |
6843 | } | |
6844 | else | |
6845 | { | |
6846 | result2 = 0; | |
6847 | } | |
6848 | } | |
6849 | else | |
6850 | { | |
6851 | result3 = sub_9F8FD8(v18); | |
6852 | v12 = v2; | |
6853 | v19 = *(int32_t *)(v12 + 28); | |
6854 | if (result3 == 0 && v19 != 0) | |
6855 | { | |
6856 | v13 = v12; | |
6857 | if (*(int32_t *)(v19 + 8) != 0) | |
6858 | { | |
6859 | v20 = *(int32_t *)(v13 + 140); | |
6860 | if (v20 == 0) | |
6861 | { | |
6862 | v21 = *(int32_t *)(v13 + 28); | |
6863 | v7 = 0; | |
6864 | if (v21 != 0) | |
6865 | { | |
6866 | v7 = *(int32_t *)(v21 + 8); | |
6867 | } | |
6868 | v15 = &v8; | |
6869 | sub_A8B814(v15); | |
6870 | v16 = &v9; | |
6871 | sub_A8B908(v15, v16, 982); | |
6872 | if (sub_1626844(*(int32_t *)0x1ec69c8, v15) == 0) | |
6873 | { | |
6874 | ||
6875 | } | |
6876 | else | |
6877 | { | |
6878 | sub_A8B978(v15); | |
6879 | v14 = sub_9F8E10(); | |
6880 | sub_9F8FF0(v14, v7, v16, 1, (int32_t)&v10, 0); | |
6881 | } | |
6882 | *(int32_t *)(v2 + 140) = 250; | |
6883 | result2 = 250; | |
6884 | } | |
6885 | else | |
6886 | { | |
6887 | result2 = v20; | |
6888 | } | |
6889 | } | |
6890 | else | |
6891 | { | |
6892 | result2 = 0; | |
6893 | } | |
6894 | } | |
6895 | else | |
6896 | { | |
6897 | result2 = result3; | |
6898 | } | |
6899 | } | |
6900 | return result2; | |
6901 | } |