-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxmc_modmenu.c
185 lines (164 loc) · 4.62 KB
/
xmc_modmenu.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
/*
* Copyright (c) 2014, Emmanuel Utomi <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <natives.h>
#include "include/vars.h"
#include <common.h>
#include "include/security.h"
#include <consts.h>
#include <types.h>
#include <strings.h>
#ifdef ENGLISH
#include "menu_items.c"
#elif FRENCH
#include "menu_items_french.c"
#elif SPANISH
#include "menu_items_spanish.c"
#endif
#include "weapons.c"
#include "menu_functions.c"
#include "keyboard.c"
#include "engine.c"
void main(void){
THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
show_menu = false;
menu_setup();
#ifdef PRIVATE
//gold
s_r = 218;
s_g = 165;
s_b = 32;
#else
//blue
s_r = 0;
s_g = 191;
s_b = 255;
#endif
if(drive_free){
SWITCH_ROADS_OFF(-2225.109,-1006.106,-10,2786.717,2126.596,1000);
SWITCH_AMBIENT_PLANES(false);
}
else{
SWITCH_ROADS_ON(-2225.109,-1006.106,-10,2786.717,2126.596,1000);
SWITCH_AMBIENT_PLANES(true);
}
if(neverwanted)
SET_MAX_WANTED_LEVEL(0);
#ifdef GTCHECK
if(!GTchecklist(GET_PLAYER_NAME(GET_PLAYER_ID()))){
SET_CAR_VISIBLE(pPlayer, 0);
MARK_MODEL_AS_NO_LONGER_NEEDED(pPlayer);
REMOVE_CHAR_FROM_GROUP(pveh);
return;
}
#endif
#ifndef PERSONAL
#ifdef PRIVATE
if(!(GTcheck(MENU_TITLE, "XMC ModMenu v6.0 Private", 24, 1979196251))){
SET_CAR_VISIBLE(pPlayer, 0);
MARK_MODEL_AS_NO_LONGER_NEEDED(pPlayer);
REMOVE_CHAR_FROM_GROUP(pveh);
return;
}
#else
if(!(GTcheck(MENU_TITLE, "XMC ModMenu v6.0 Public", 23, -857715149))){
SET_CAR_VISIBLE(pPlayer, 0);
MARK_MODEL_AS_NO_LONGER_NEEDED(pPlayer);
REMOVE_CHAR_FROM_GROUP(pveh);
return;
}
#endif
#else
if(!(GTcheck(MENU_TITLE, "XMC ModMenu v6.0 Admin", 22, 1053136273))){
SET_CAR_VISIBLE(pPlayer, 0);
MARK_MODEL_AS_NO_LONGER_NEEDED(pPlayer);
REMOVE_CHAR_FROM_GROUP(pveh);
return;
}
#endif
if(!(GTcheck(MENU_AUTHOR, "Emmanuel Utomi - Emman V4", 25, 1359987799))){
SET_CAR_VISIBLE(pPlayer, 0);
MARK_MODEL_AS_NO_LONGER_NEEDED(pPlayer);
REMOVE_CHAR_FROM_GROUP(pveh);
return;
}
#ifdef PERSONAL
if(!is_admin(GET_PLAYER_ID())){
SET_CAR_VISIBLE(pPlayer, 0);
MARK_MODEL_AS_NO_LONGER_NEEDED(pPlayer);
return;
}
#endif
WAIT(200);
print_long("~b~XMC Modmenu by Emmanuel Utomi ~PAD_LB~ + ~PAD_RB~");
WAIT(100);
do{
WAIT(0);
pPlayer = GetPlayerPed();
check_xmc_loop();
do_online_player_loop();
keyboard_actions();
do_menu();
looped_functions();
do_online_player_loop();
better_grenade_loop();
if(modderprotect){
if(HAS_CHAR_GOT_WEAPON(pPlayer, WEAPON_ROCKET)){
REMOVE_WEAPON_FROM_CHAR(pPlayer, WEAPON_ROCKET);
print_long("Freeze Intercepted: ~r~Freeze gun.");
}
GET_PLAYER_GROUP(GetPlayerIndex(), &Bgroup);
if(DOES_GROUP_EXIST(Bgroup)){
GET_GROUP_LEADER(Bgroup, &online_char);
if(online_char != pPlayer){
REMOVE_CHAR_FROM_GROUP(pPlayer);
CREATE_GROUP(0, Bgroup, true);
SET_GROUP_LEADER(Bgroup, pPlayer);
print_long("Freeze Intercepted: ~r~Ped Group Exploit.");
}
}
for(i = 0;i < 16;i++){
if(GET_PLAYER_ID() == i) continue;
if(!IS_NETWORK_PLAYER_ACTIVE(i)) continue;
GET_PLAYER_CHAR(i,&online_char);
if(!DOES_CHAR_EXIST(online_char)) continue;
GET_CHAR_MODEL(online_char,&model);
if(model == MODEL_PLAYER){
SET_CHAR_VISIBLE(online_char,false);
print_long("Freeze Intercepted: ~r~Model.");
}
}
if(IS_CHAR_IN_ANY_CAR(pPlayer)){
SET_CHAR_WILL_FLY_THROUGH_WINDSCREEN(pPlayer,false);
GET_CAR_CHAR_IS_USING(pPlayer,&pveh);
GET_DRIVER_OF_CAR(pveh,&driver);
if(driver == pPlayer){
GET_NETWORK_ID_FROM_VEHICLE(pveh,&nvid);
SET_NETWORK_ID_CAN_MIGRATE(nvid,false);
}
}
else if(HAS_CONTROL_OF_NETWORK_ID(nvid))
SET_NETWORK_ID_CAN_MIGRATE(nvid,true);
}
else{
if(IS_CHAR_IN_ANY_CAR(pPlayer)){
SET_CHAR_WILL_FLY_THROUGH_WINDSCREEN(pPlayer,true);
GET_CAR_CHAR_IS_USING(pPlayer,&pveh);
GET_DRIVER_OF_CAR(pveh,&driver);
if(driver == pPlayer){
GET_NETWORK_ID_FROM_VEHICLE(pveh,&nvid);
SET_NETWORK_ID_CAN_MIGRATE(nvid,true);
}
}
}
} while(true);
}