SHOW:
|
|
- or go back to the newest paste.
1 | - | #include < a_samp > |
1 | + | #include <a_samp> |
2 | #include sscanf.inc | |
3 | #include zcmd.inc | |
4 | #include dof2.inc | |
5 | - | // -------------------------------------------------------- > Definições do Servidor em Geral |
5 | + | |
6 | - | #define Entrada_Loja 213.2318,-183.4858,1.5781 |
6 | + | new Carro; |
7 | - | #define Entrada_Ammu 243.0552,-178.4454,1.5822 |
7 | + | new Criou_Carro; |
8 | - | #define Menu_Armas 314.2584,-132.9375,999.6016 |
8 | + | new Id_Kick; |
9 | - | #define Entrada_Prefeitura 292.9194,-195.3610,1.7786 |
9 | + | new Ladrao; |
10 | - | #define Entrada_Loja_Roupas 171.9727,-152.4717,1.5752 |
10 | + | |
11 | - | #define Menu_Prefeitura 361.8299,173.6784,1008.3828 |
11 | + | new Float:RandomSpawns[][] = |
12 | - | #define Materiais_Obter 1230.2911,-1735.1278,13.5867 |
12 | + | |
13 | {-1942.8346, 558.2853, 35.1719, 0.4245}, | |
14 | - | #define Tempo_P 5000 |
14 | + | {-1784.0457, 571.9812, 35.1641, 117.0025}, |
15 | {-1754.1642, 959.6666, 24.8828, 174.4981} | |
16 | - | #define Dialog_Armas 1050 |
16 | + | |
17 | - | #define Dialog_Emprego 2050 |
17 | + | |
18 | #define Branco 0xFFFFFFAA | |
19 | - | #define Desempregado 3 |
19 | + | #define Arquivo "Contas/%s.ini" |
20 | - | #define Mecanico 4 |
20 | + | |
21 | - | #define Caminhoneiro 5 |
21 | + | #define Dialog_Y 1 |
22 | - | #define Advogado 6 |
22 | + | #define Dialog_Z 2 |
23 | - | #define Detetive 7 |
23 | + | #define Dialog_Ban 3 |
24 | - | #define Vendedor_de_Armas 8 |
24 | + | #define Dialog_Cmd 4 |
25 | ||
26 | - | #define Civil 20 |
26 | + | enum Info |
27 | - | #define Groove 21 |
27 | + | |
28 | - | #define Ballas 22 |
28 | + | Senha[16], |
29 | - | #define Aztecas 23 |
29 | + | Score, |
30 | - | #define Vagos 24 |
30 | + | Dinheiro, |
31 | - | #define PCC 25 |
31 | + | bool:Admin, |
32 | - | #define Comando_V 26 |
32 | + | bool:Banido, |
33 | - | #define Rota 27 |
33 | + | bool:Cadastrado |
34 | - | #define Policia_M 28 |
34 | + | |
35 | - | #define Policia_F 29 |
35 | + | |
36 | - | #define Exercito 30 |
36 | + | new pInfo[MAX_PLAYERS][Info]; |
37 | - | #define GI 31 |
37 | + | |
38 | - | #define Farc 32 |
38 | + | |
39 | - | #define Hitman 33 |
39 | + | |
40 | - | #define Administradores 50 |
40 | + | print("\n----------------------------------"); |
41 | print(" Blank Gamemode by your name here"); | |
42 | - | #define Verde 0x21DD00FF |
42 | + | print("----------------------------------\n"); |
43 | - | #define Vermelho 0xFF030FFF |
43 | + | |
44 | - | #define Amarelo 0xFFFF00FF |
44 | + | |
45 | - | #define Laranja 0xF97804FF |
45 | + | |
46 | - | #define Azul_Claro 0x00C2ECFF |
46 | + | |
47 | - | #define Branco 0xFFFFFFAA |
47 | + | |
48 | - | #define Azul 0x1229FAFF |
48 | + | |
49 | - | #define Verde_Claro 0x38FF06FF |
49 | + | |
50 | - | #define Cinza 0xCECECEFF |
50 | + | |
51 | - | #define Rosa 0xD52DFFFF |
51 | + | |
52 | - | #define Cinza_Escuro 0x626262FF |
52 | + | LimitGlobalChatRadius(150.0); |
53 | - | // -------------------------------------------------------- > |
53 | + | |
54 | - | enum |
54 | + | AddPlayerClass(230, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); |
55 | - | pDados |
55 | + | |
56 | AddStaticVehicle(562,-1959.4115,585.1229,34.7801,0.1878,0,0); | |
57 | - | Organizacao, Quentinha, Pizza, Id_Check, Kikado, Debug, |
57 | + | AddStaticVehicle(562,-1950.3756,585.1836,34.7835,359.9642,0,0); |
58 | - | Cargo, Hamburguer, Crimes, Horas_Jogadas, Preso, Materiais, |
58 | + | AddStaticVehicle(562,-1932.2970,585.1634,34.7828,359.3857,0,0); |
59 | - | Licenciado, Licenca_Armas, Cigarros, Emprego, Loja_Roupas, Comprar_Materiais, |
59 | + | AddStaticVehicle(562,-1926.2413,584.8201,34.7923,0.1967,0,0); |
60 | - | Fazer_Compras, Produtos, Maconha, Contrato, Id_Kick, |
60 | + | AddStaticVehicle(562,-1746.5321,941.3483,24.5490,181.0919,0,0); |
61 | AddStaticVehicle(562,-1753.3002,941.3849,24.5501,179.7459,0,0); | |
62 | AddStaticVehicle(562,-1763.4749,941.3840,24.5494,179.7853,0,0); | |
63 | - | new Timer_Cigarro; |
63 | + | |
64 | - | new Timer_Maconha; |
64 | + | |
65 | ||
66 | - | new World_Time; |
66 | + | |
67 | - | new pInfo[MAX_PLAYERS][pDados]; |
67 | + | |
68 | DOF2_Exit(); | |
69 | - | forward Spawn_Player(playerid); |
69 | + | |
70 | } | |
71 | - | forward Soltar_Preso(playerid); |
71 | + | |
72 | - | forward Fumando_Maconha(playerid); |
72 | + | |
73 | - | forward Tempo_World(playerid); |
73 | + | |
74 | - | forward Fumando_Cigarro(playerid); |
74 | + | SetPlayerInterior(playerid, 11); |
75 | - | // -------------------------------------------------------- > |
75 | + | SetPlayerPos(playerid, 508.7362, -87.4335, 998.9609); |
76 | - | new Float: C_R[][] = // Random Spawns Caminhoneiros |
76 | + | SetPlayerFacingAngle(playerid, 0.0); |
77 | SetPlayerCameraPos(playerid, 508.7362, -83.4335, 998.9609); | |
78 | - | {195.9697,-232.3367,1.7786,271.1507}, |
78 | + | SetPlayerCameraLookAt(playerid, 508.7362, -87.4335, 998.9609); |
79 | - | {219.1665,-226.9594,1.7786,92.1534}, |
79 | + | |
80 | - | {253.9131,-158.1334,1.5703,75.7547}, |
80 | + | |
81 | - | {292.3913,-187.2190,1.5781,89.1007}, |
81 | + | |
82 | - | {81.4282,-198.9835,1.5631,221.6808} |
82 | + | |
83 | { | |
84 | - | // -------------------------------------------------------- > |
84 | + | if(pInfo[playerid][Admin] == true) |
85 | { | |
86 | SetPlayerColor(playerid, 0xFF0091FF); | |
87 | } | |
88 | - | print("\n------------------------------- >"); |
88 | + | |
89 | - | print(" Brasil Play Net Carregado ! - > By Lucas Emmanuel"); |
89 | + | SetPlayerColor(playerid, Branco); |
90 | - | print("------------------------------- >\n"); |
90 | + | |
91 | new | |
92 | Str[80], | |
93 | Stx[128] | |
94 | ; | |
95 | ||
96 | format(Str, sizeof(Str), "{696969}Jogador{00FFFF} %s {696969}Entrou no Servidor", pName(playerid)); | |
97 | SendClientMessageToAll(Branco, Str); | |
98 | // -------------------------------------------------------------------------- || | |
99 | - | LimitGlobalChatRadius(150); |
99 | + | |
100 | Ler(playerid); | |
101 | // pInfo[playerid][Cadastrado] = DOF2_GetBool(GetarConta(playerid), "Cadastrado"); | |
102 | - | AddPlayerClass(23, 1242.7977, -1694.7399, 16.1965, 182.3878, 0, 0, 0, 0, 0, 0); |
102 | + | |
103 | if(pInfo[playerid][Cadastrado] == false) | |
104 | - | AddStaticPickup(1318, 1, Entrada_Loja, 0); |
104 | + | |
105 | - | AddStaticPickup(1318, 1, Entrada_Ammu, 0); |
105 | + | format(Stx, sizeof(Stx), "{FFFFFF}Seja Bem Vindo %s.\n\nVocê ainda não é Cadastrado.\n\nDigite sua Senha abaixo para se Cadastrar", pName(playerid)); |
106 | - | AddStaticPickup(1318, 1, Entrada_Prefeitura, 0); |
106 | + | ShowPlayerDialog(playerid, Dialog_Y, DIALOG_STYLE_INPUT, "Registro", Stx, "Cadastrar", ""); |
107 | - | AddStaticPickup(1318, 1, Entrada_Loja_Roupas, 0); |
107 | + | |
108 | - | AddStaticPickup(1318, 1, Materiais_Obter , 0); |
108 | + | |
109 | { | |
110 | - | AddStaticPickup(1318, 1, 315.7297,-143.6574,999.6016, 0); |
110 | + | format(Stx, sizeof(Stx), "{FFFFFF}Seja Bem Vindo %s.\n\nVocê é Cadastrado.\n\nDigite sua Senha abaixo para se Logar", pName(playerid)); |
111 | - | AddStaticPickup(1318, 1, -26.0003,-188.2597,1003.5469, 0); |
111 | + | ShowPlayerDialog(playerid, Dialog_Z, DIALOG_STYLE_INPUT, "Login", Stx, "Login", ""); |
112 | - | AddStaticPickup(1318, 1, 389.8720,173.6646,1008.3828, 0); |
112 | + | |
113 | - | AddStaticPickup(1318, 1, 227.5590,-8.1010,1002.2109, 0); |
113 | + | |
114 | } | |
115 | - | AddStaticPickup(1318, 1, Menu_Armas, 0); |
115 | + | |
116 | - | AddStaticPickup(1318, 1, Menu_Prefeitura, 0); |
116 | + | |
117 | { | |
118 | - | Create3DTextLabel("Compra de Materiais\nAperte F", Azul_Claro, Materiais_Obter, 20.0, 0, 0); |
118 | + | new Str[ 80 ]; |
119 | format(Str, sizeof(Str), "{696969}Jogador{00FFFF} %s {696969}Desconectou-se do Servidor", pName(playerid)); | |
120 | - | // ----------------------------------------------- > |
120 | + | SendClientMessageToAll(Branco, Str); |
121 | - | SetTimer("Tempo_World", 60 * 60 * 1000, true); |
121 | + | |
122 | Salvar(playerid); | |
123 | return 1; | |
124 | } | |
125 | ||
126 | public OnPlayerSpawn(playerid) | |
127 | { | |
128 | if ( pInfo[playerid][Banido] == true) | |
129 | { | |
130 | - | public Tempo_World(playerid) |
130 | + | new string[128]; |
131 | format(string, sizeof(string), "{FFFFFF}Seja Bem Vindo %s.\n\nVocê foi Banido do Servidor.\n\nSe isso for um engano, entre em contato\ncom a Direção.", pName(playerid)); | |
132 | - | new Str[120], StE[120]; |
132 | + | ShowPlayerDialog(playerid, Dialog_Ban, DIALOG_STYLE_MSGBOX, "Banido", string, "Sair", ""); |
133 | - | if (World_Time == 25) |
133 | + | SetTimer("Kick_Player", 1000, false); |
134 | } | |
135 | - | World_Time = 0; |
135 | + | |
136 | SetPlayerInterior(playerid, 0); | |
137 | ||
138 | - | SetWorldTime(World_Time); |
138 | + | new Random = random(sizeof(RandomSpawns)); |
139 | - | World_Time ++; |
139 | + | SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]); |
140 | - | format(Str, sizeof(Str), "BRASIL PLAY NET :{FFFFFF}Agora São {88AA88}%d {FFFFFF}Horas.", World_Time); |
140 | + | SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]); |
141 | - | SendClientMessageToAll(Verde_Claro , Str); |
141 | + | |
142 | - | pInfo[playerid][Horas_Jogadas] ++; |
142 | + | |
143 | - | pInfo[playerid][Contrato] --; |
143 | + | |
144 | - | format(StE, sizeof(StE), "Você tem Agora %d Horas Jogadas", pInfo[playerid][Horas_Jogadas]); |
144 | + | |
145 | - | SendClientMessage(playerid, Laranja, StE); |
145 | + | |
146 | if( killerid != playerid ) | |
147 | { | |
148 | Kick(killerid); | |
149 | } | |
150 | - | SetTimer("Spawn_Player", 100, false); |
150 | + | |
151 | } | |
152 | ||
153 | public OnPlayerCommandPerformed(playerid, cmdtext[], success) | |
154 | - | public Spawn_Player(playerid) |
154 | + | |
155 | if(!success) | |
156 | - | SpawnPlayer(playerid); |
156 | + | { |
157 | SendClientMessage(playerid, Branco, "Comando Inexistente. {696969}Use: {FFFFFF}/Comandos"); | |
158 | return 1; | |
159 | } | |
160 | return 1; | |
161 | } | |
162 | - | Nome[25], |
162 | + | |
163 | - | Str[80] |
163 | + | // -------------------------------------------------- >> Comandos do Servidor || |
164 | CMD:ir(playerid, params []) | |
165 | { | |
166 | - | GetPlayerName(playerid, Nome, 25); |
166 | + | |
167 | - | format(Str, sizeof(Str), "O Jogador {00FFFF}%s {FFFFFF}Entrou no Servidor", Nome); |
167 | + | iD |
168 | - | SendClientMessageToAll(0xFFFFFFAA, Str); |
168 | + | |
169 | ||
170 | if (sscanf(params, "u", iD)) | |
171 | { | |
172 | SendClientMessage(playerid, -1, "{696969}Use: /Ir {00FFFF}[ID]"); | |
173 | } | |
174 | else | |
175 | - | Nome[25], |
175 | + | |
176 | - | Str[80] |
176 | + | if (!IsPlayerConnected(iD)) |
177 | { | |
178 | SendClientMessage(playerid, Branco, "Jogador Não Conectado"); | |
179 | - | GetPlayerName(playerid, Nome, 25); |
179 | + | |
180 | - | format(Str, sizeof(Str), "O Jogador {00FFFF}%s {FFFFFF}Desconectou - se do Servidor", Nome); |
180 | + | |
181 | - | SendClientMessageToAll(0xFFFFFFAA, Str); |
181 | + | |
182 | new | |
183 | Float:x, | |
184 | Float:y, | |
185 | Float:z | |
186 | ; | |
187 | - | if(pInfo[playerid][Preso] == 1) |
187 | + | |
188 | new Str[100]; | |
189 | - | new |
189 | + | |
190 | - | Str[80] |
190 | + | GetPlayerPos(iD, x, y, z); |
191 | SetPlayerPos(playerid, x, y, z); | |
192 | format(Str, sizeof(Str), "Você foi até o Jogador %s", pName(iD)); | |
193 | - | SetPlayerPos(playerid, 263.8820,77.4002,1001.0391); |
193 | + | SendClientMessage(playerid, Branco, Str); |
194 | - | SetPlayerInterior(playerid, 6); |
194 | + | |
195 | - | ResetPlayerWeapons(playerid); |
195 | + | |
196 | - | SetPlayerWantedLevel(playerid, 0); |
196 | + | |
197 | - | SetTimer("Soltar_Preso", Tempo_P * pInfo[playerid][Crimes], false); |
197 | + | |
198 | - | pInfo[playerid][Preso] = 1; |
198 | + | CMD:radio(playerid) |
199 | { | |
200 | - | format(Str, sizeof(Str), "Sentença incompleta. Tempo Restante: {FFFFFF}%d", Tempo_P * pInfo[playerid][Crimes]); |
200 | + | PlayAudioStreamForPlayer(playerid, "http://live.hunterfm.com/live"); |
201 | - | SendClientMessage(playerid, Verde_Claro, Str); |
201 | + | SendClientMessage(playerid, Branco, "Rádio Hunter Conectada. {696969}/Radioof"); |
202 | return 1; | |
203 | } | |
204 | - | if(pInfo[playerid][Organizacao] == Civil) |
204 | + | |
205 | CMD:radioof(playerid) | |
206 | - | SetPlayerSkin(playerid, 23); |
206 | + | |
207 | StopAudioStreamForPlayer(playerid); | |
208 | SendClientMessage(playerid, Branco, "Rádio Hunter Desconectada. {696969}/Radio"); | |
209 | return 1; | |
210 | } | |
211 | - | if(pInfo[playerid][Emprego] == Caminhoneiro) |
211 | + | |
212 | CMD:skin(playerid, params[]) | |
213 | - | new Random = random(sizeof(C_R)); |
213 | + | |
214 | - | SetPlayerPos(playerid, C_R[Random][0], C_R[Random][1], C_R[Random][2]); |
214 | + | |
215 | - | SetPlayerFacingAngle(playerid, C_R[Random][3]); |
215 | + | |
216 | ; | |
217 | ||
218 | if (sscanf(params, "i", Skin)) | |
219 | { | |
220 | SendClientMessage(playerid, -1, "{696969}Use: /Skin {00FFFF}[Skin id]"); | |
221 | } | |
222 | - | new Str_Wanted[60]; |
222 | + | |
223 | { | |
224 | - | if(pInfo[killerid][Organizacao] == Groove || Ballas || Aztecas || Vagos || PCC || Comando_V || Civil || Hitman) |
224 | + | if (Skin < 0 || Skin > 299) |
225 | { | |
226 | - | pInfo[killerid][Crimes] ++; |
226 | + | |
227 | - | SendClientMessage(killerid, Vermelho, "Você Cometeu um Crime : {FFFFFF}Assasinato"); |
227 | + | |
228 | - | format(Str_Wanted, sizeof(Str_Wanted), "Nivel Atual de Procura : {FFFFFF}%d", pInfo[killerid][Crimes]); |
228 | + | |
229 | - | SendClientMessage(playerid, Amarelo, Str_Wanted); |
229 | + | |
230 | - | SetPlayerWantedLevel(killerid, pInfo[killerid][Crimes]); |
230 | + | |
231 | SendClientMessage(playerid, Branco, "Skin Selecionada com Sucesso"); | |
232 | } | |
233 | - | if(pInfo[playerid][Organizacao] == Groove || Ballas || Aztecas || Vagos || PCC || Comando_V || Civil || Hitman) |
233 | + | |
234 | } | |
235 | - | if(GetPlayerWantedLevel(playerid) < 1) |
235 | + | |
236 | - | { |
236 | + | |
237 | - | if(pInfo[killerid][Organizacao] == Rota || Policia_M || Policia_F ) |
237 | + | |
238 | - | { |
238 | + | if(Criou_Carro == 1) |
239 | - | GameTextForPlayer(killerid, "~b~Suspeito ~r~Morto ~w~Bonus R$ ~g~300", 2500, 1); |
239 | + | |
240 | - | GivePlayerMoney(killerid, 300); |
240 | + | SendClientMessage(playerid, Branco, "Você Já criou um carro."); |
241 | - | // --------------------------------------------------------------------------- > |
241 | + | |
242 | - | SetPlayerPos(playerid, 263.8820,77.4002,1001.0391); |
242 | + | |
243 | - | SetPlayerInterior(playerid, 6); |
243 | + | |
244 | - | ResetPlayerWeapons(playerid); |
244 | + | |
245 | - | SetPlayerWantedLevel(playerid, 0); |
245 | + | |
246 | - | SetTimer("Soltar_Preso", Tempo_P * pInfo[playerid][Crimes], false); |
246 | + | Float: y, Float: z |
247 | - | pInfo[playerid][Preso] = 1; |
247 | + | |
248 | - | } |
248 | + | |
249 | if (sscanf(params, "dii", Id, Cor[0], Cor[1])) | |
250 | { | |
251 | SendClientMessage(playerid, Branco, "{696969}Use: /Car {00FFFF}[Id] [Cor] [Cor]"); | |
252 | } | |
253 | else | |
254 | - | public OnVehicleSpawn(vehicleid) |
254 | + | |
255 | if (Id < 400 || Id > 611) return | |
256 | SendClientMessage(playerid, Branco, "ID do Veículo Inválido"); | |
257 | ||
258 | if (Cor[0] < 0 || Cor[0] > 126) return | |
259 | - | public OnVehicleDeath(vehicleid, killerid) |
259 | + | |
260 | ||
261 | if (Cor[1] < 0 || Cor[1] > 126) return | |
262 | SendClientMessage(playerid, Branco, "ID da 2ª Cor Inválido"); | |
263 | ||
264 | - | public OnPlayerText(playerid, text[]) |
264 | + | |
265 | Carro = CreateVehicle(Id, x, y, z, 0, Cor[0], Cor[1], false); | |
266 | PutPlayerInVehicle(playerid, Carro, 0); | |
267 | Criou_Carro = 1; | |
268 | } | |
269 | - | // --------------------------------------------------------------------------- > |
269 | + | |
270 | } | |
271 | ||
272 | CMD:lmc(playerid) | |
273 | { | |
274 | - | if (pInfo[playerid][Organizacao] != Administradores) |
274 | + | for (new i = 0; i < 100; i++) |
275 | { | |
276 | - | SendClientMessage(playerid, Branco, "Você não é um {00FFFF}Administrador"); |
276 | + | SendClientMessage(playerid, Branco, " "); |
277 | } | |
278 | return 1; | |
279 | } | |
280 | ||
281 | CMD:kill(playerid) | |
282 | - | Float: y, Float: z, |
282 | + | |
283 | - | Carro |
283 | + | SetPlayerHealth(playerid, 0); |
284 | return 1; | |
285 | } | |
286 | - | pInfo[playerid][Licenciado] = 1; |
286 | + | |
287 | CMD:tempo(playerid, params []) | |
288 | { | |
289 | new | |
290 | - | SendClientMessage(playerid, Branco, "Use: /Car [Id] [Cor] [Cor]"); |
290 | + | |
291 | ; | |
292 | ||
293 | if (sscanf(params, "i", Tempo)) | |
294 | { | |
295 | SendClientMessage(playerid, Branco, "Use: /tempo {00FFFF}[Tempo ID]"); | |
296 | } | |
297 | else | |
298 | { | |
299 | if ( Tempo > 24 ) | |
300 | { | |
301 | SendClientMessage(playerid, Branco, "ID do Tempo Inválido"); | |
302 | return 1; | |
303 | } | |
304 | ||
305 | SetWorldTime(Tempo); | |
306 | } | |
307 | return 1; | |
308 | } | |
309 | ||
310 | - | CMD:comprar(playerid, params []) |
310 | + | |
311 | { | |
312 | - | if (pInfo[playerid][Fazer_Compras] == 0) |
312 | + | |
313 | Clima | |
314 | - | SendClientMessage(playerid, Vermelho, "Você não está em uma 24/7"); |
314 | + | |
315 | ||
316 | if (sscanf(params, "i", Clima)) | |
317 | { | |
318 | SendClientMessage(playerid, Branco, "Use: /Clima {00FFFF}[Clima ID]"); | |
319 | - | Item |
319 | + | |
320 | else | |
321 | { | |
322 | - | if (sscanf(params, "i", Item)) |
322 | + | |
323 | { | |
324 | - | SendClientMessage(playerid, Vermelho, "----------------Loja----------------"); |
324 | + | |
325 | - | SendClientMessage(playerid, Branco , "[1] - Carteira de Motorista"); |
325 | + | |
326 | - | SendClientMessage(playerid, Branco , "[2] - Quentinha"); |
326 | + | |
327 | - | SendClientMessage(playerid, Branco , "[3] - Licença de Armas"); |
327 | + | |
328 | - | SendClientMessage(playerid, Branco , "[4] - Pizza"); |
328 | + | |
329 | - | SendClientMessage(playerid, Branco , "[5] - Hamburguer"); |
329 | + | |
330 | - | SendClientMessage(playerid, Branco , "[6] - Cigarros"); |
330 | + | |
331 | - | SendClientMessage(playerid, Vermelho, "------------------------------------"); |
331 | + | |
332 | - | return SendClientMessage(playerid, Laranja, "Use: /Comprar [ID do Item]"); |
332 | + | |
333 | CMD:pista(playerid, params []) | |
334 | { | |
335 | - | if ( Item < 0 || Item > 6 ) |
335 | + | if( ! IsPlayerInAnyVehicle(playerid)) |
336 | { | |
337 | - | SendClientMessage(playerid, Branco, "Número de Item Inválido"); |
337 | + | SetPlayerPos(playerid, -316.2834,1523.4813,75.3594); |
338 | SendClientMessage(playerid, Branco, "Crie seu Veículo. Use: {00FFFF}/Car"); | |
339 | } | |
340 | ||
341 | - | switch ( Item ) |
341 | + | |
342 | iD, | |
343 | - | case 1: |
343 | + | Veh |
344 | ; | |
345 | - | if(GetPlayerMoney(playerid) < 5000) |
345 | + | |
346 | if (sscanf(params, "i", iD)) | |
347 | - | SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 5000"); |
347 | + | |
348 | - | return 1; |
348 | + | SendClientMessage(playerid, Branco, "Use: /Pista {00FFFF}[Número]"); |
349 | - | } |
349 | + | |
350 | ||
351 | - | pInfo[playerid][Licenciado] = 1; |
351 | + | |
352 | - | SendClientMessage(playerid, Laranja, "Você comprou uma Carteira de Motorista por {FFFFFF}R$: 5000"); |
352 | + | |
353 | - | GivePlayerMoney(playerid, - 5000); |
353 | + | if ( iD < 1 || iD > 2 ) |
354 | { | |
355 | SendClientMessage(playerid, Branco, "Número da Pista Inválido.{696969}De: 1 {FFFFFF}a {696969}2"); | |
356 | - | // --------------------------------- > |
356 | + | |
357 | - | case 2: |
357 | + | |
358 | ||
359 | - | if(GetPlayerMoney(playerid) < 150) |
359 | + | if ( iD == 1 ) |
360 | { | |
361 | - | SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 150"); |
361 | + | new Str [128]; |
362 | - | return 1; |
362 | + | |
363 | - | } |
363 | + | Veh = GetPlayerVehicleID(playerid); |
364 | SetVehiclePos(Veh, -316.2834,1523.4813,75.3594); | |
365 | - | pInfo[playerid][Quentinha] ++; |
365 | + | |
366 | - | SendClientMessage(playerid, Laranja, "Você comprou uma Quentinha por {FFFFFF}R$: 150. /Comer"); |
366 | + | format(Str, sizeof(Str), "{696969}Jogador{00FFFF} %s {696969}Foi para o {00FFFF}Drift Principal{696969}. {FFFFFF}/Pista 1", pName(playerid)); |
367 | - | GivePlayerMoney(playerid, - 150); |
367 | + | SendClientMessageToAll(Branco, Str); |
368 | } | |
369 | ||
370 | - | // --------------------------------- > |
370 | + | if ( iD == 2 ) |
371 | - | case 3: |
371 | + | |
372 | new Str [128]; | |
373 | - | if(pInfo[playerid][Horas_Jogadas] < 2) |
373 | + | |
374 | - | { |
374 | + | Veh = GetPlayerVehicleID(playerid); |
375 | - | SendClientMessage(playerid, Vermelho, "Você não tem Experiência Suficiente"); |
375 | + | SetVehiclePos(Veh, -2508.5835,-606.9565,132.2212); |
376 | - | return 1; |
376 | + | format(Str, sizeof(Str), "{696969}Jogador{00FFFF} %s {696969}Foi para o {00FFFF}Drift Na Montanha{696969}. {FFFFFF}/Pista 2", pName(playerid)); |
377 | - | } |
377 | + | SendClientMessageToAll(Branco, Str); |
378 | - | |
378 | + | |
379 | - | if(GetPlayerMoney(playerid) < 5000) |
379 | + | |
380 | return 1; | |
381 | - | SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 5000"); |
381 | + | |
382 | - | return 1; |
382 | + | |
383 | - | } |
383 | + | CMD:aero(playerid, params []) |
384 | { | |
385 | - | pInfo[playerid][Licenca_Armas] = 1; |
385 | + | if( ! IsPlayerInAnyVehicle(playerid)) |
386 | - | SendClientMessage(playerid, Laranja, "Você comprou uma Licença de Armas."); |
386 | + | |
387 | - | SendClientMessage(playerid, Laranja, "Agora você pode comprar sua arma em uma Loja de Armas."); |
387 | + | SetPlayerPos(playerid, -316.2834,1523.4813,75.3594); |
388 | - | GivePlayerMoney(playerid, - 5000); |
388 | + | SendClientMessage(playerid, Branco, "Crie seu Veículo. Use: {00FFFF}/Car"); |
389 | } | |
390 | ||
391 | - | // --------------------------------- > |
391 | + | |
392 | - | case 4: |
392 | + | iD, |
393 | Veh | |
394 | - | if(GetPlayerMoney(playerid) < 150) |
394 | + | |
395 | ||
396 | - | SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 150"); |
396 | + | if (sscanf(params, "i", iD)) |
397 | - | return 1; |
397 | + | |
398 | - | } |
398 | + | SendClientMessage(playerid, Branco, "Use: /Aero {00FFFF}[Número]"); |
399 | } | |
400 | - | pInfo[playerid][Pizza] ++; |
400 | + | |
401 | - | SendClientMessage(playerid, Laranja, "Você comprou uma Pizza por {FFFFFF}R$: 150. /Comer"); |
401 | + | |
402 | - | GivePlayerMoney(playerid, - 150); |
402 | + | |
403 | if ( iD < 1 || iD > 2 ) | |
404 | { | |
405 | - | // --------------------------------- > |
405 | + | SendClientMessage(playerid, Branco, "Número do Aeroporto Inválido.{696969}De: 1 {FFFFFF}a {696969}2"); |
406 | - | case 5: |
406 | + | |
407 | } | |
408 | - | if(GetPlayerMoney(playerid) < 250) |
408 | + | |
409 | if ( iD == 1 ) | |
410 | - | SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 250"); |
410 | + | |
411 | - | return 1; |
411 | + | new Str [128]; |
412 | - | } |
412 | + | |
413 | Veh = GetPlayerVehicleID(playerid); | |
414 | - | pInfo[playerid][Hamburguer] ++; |
414 | + | SetVehiclePos(Veh, 1321.2971,1280.5767,10.3744); |
415 | - | SendClientMessage(playerid, Laranja, "Você comprou um Hambúrguer por {FFFFFF}R$: 250. /Comer"); |
415 | + | |
416 | - | GivePlayerMoney(playerid, - 150); |
416 | + | format(Str, sizeof(Str), "{696969}Jogador{00FFFF} %s {696969}Foi para o {00FFFF}Aeroporto de Las Venturas{696969}. {FFFFFF}/Aero 1", pName(playerid)); |
417 | SendClientMessageToAll(Branco, Str); | |
418 | } | |
419 | - | // --------------------------------- > |
419 | + | |
420 | - | case 6: |
420 | + | if ( iD == 2 ) |
421 | { | |
422 | - | if(GetPlayerMoney(playerid) < 1500) |
422 | + | new Str [128]; |
423 | ||
424 | - | SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 1500"); |
424 | + | Veh = GetPlayerVehicleID(playerid); |
425 | - | return 1; |
425 | + | SetVehiclePos(Veh, -1275.9032,13.2350,14.8753); |
426 | - | } |
426 | + | format(Str, sizeof(Str), "{696969}Jogador{00FFFF} %s {696969}Foi para o {00FFFF}Aeroporto de San Fierro{696969}. {FFFFFF}/Aero 2", pName(playerid)); |
427 | - | |
427 | + | SendClientMessageToAll(Branco, Str); |
428 | - | pInfo[playerid][Cigarros] = 10; |
428 | + | |
429 | - | SendClientMessage(playerid, Laranja, "Você comprou uma Carteira de Cigarros por {FFFFFF}R$: 1500. /Fumar"); |
429 | + | |
430 | - | GivePlayerMoney(playerid, - 1500); |
430 | + | |
431 | } | |
432 | ||
433 | - | // --------------------------------- > |
433 | + | CMD:comandos(playerid) |
434 | { | |
435 | new Str[350]; | |
436 | strcat(Str, "{FFFFFF}/Aero - Teleportes para Aeroportos\n\n/Pista - Teleportes para Pistas\n\n/Clima - Altera seu Clima\n\n/Tempo - Altera seu Tempo\n\n/Lmc - Limpa seu Chat\n\n/Car - Criar Veículo\n\n/Skin - Trocar de Skin\n\n/Radio - Conecta a Rádio\n\n/Roda - Trocar de Roda\n\n/hyd - Hydraulica\n\n/Kill - Suicidio"); | |
437 | ||
438 | - | CMD:comer(playerid, params []) |
438 | + | SendClientMessage(playerid, Branco, "Lista de Comandos Aberta"); |
439 | ShowPlayerDialog(playerid, Dialog_Cmd, DIALOG_STYLE_MSGBOX, "{00FFFF}Lista de Comandos", Str, "Sair", ""); | |
440 | return 1; | |
441 | - | Item |
441 | + | |
442 | ||
443 | CMD:roda(playerid, params []) | |
444 | - | if (sscanf(params, "i", Item)) |
444 | + | |
445 | new Roda; | |
446 | - | SendClientMessage(playerid, Vermelho, "----------------Comer----------------"); |
446 | + | |
447 | - | SendClientMessage(playerid, Branco , "[1] - Quentinha"); |
447 | + | if (sscanf(params, "i", Roda)) |
448 | - | SendClientMessage(playerid, Branco , "[2] - Pizza"); |
448 | + | |
449 | - | SendClientMessage(playerid, Branco , "[3] - Hambúrguer"); |
449 | + | SendClientMessage(playerid, Branco, "Use: /Roda {00FFFF}[Roda ID]"); |
450 | - | SendClientMessage(playerid, Vermelho, "-------------------------------------"); |
450 | + | |
451 | - | return SendClientMessage(playerid, Laranja, "Use: /Comer [ID do Item]"); |
451 | + | |
452 | { | |
453 | if ( Roda < 0 || Roda > 15 ) | |
454 | - | if ( Item < 0 || Item > 3 ) |
454 | + | |
455 | SendClientMessage(playerid, Branco, "ID da Roda Inválido"); | |
456 | - | SendClientMessage(playerid, Branco, "Número de Item Inválido"); |
456 | + | |
457 | } | |
458 | ||
459 | if ( Roda == 0 ) | |
460 | - | switch ( Item ) |
460 | + | |
461 | SendClientMessage(playerid, Branco, "Roda Trocada"); | |
462 | - | case 1: |
462 | + | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); |
463 | AddVehicleComponent(GetPlayerVehicleID(playerid), 1073 ); | |
464 | - | if (pInfo[playerid][Quentinha] < 1) |
464 | + | |
465 | - | { |
465 | + | |
466 | - | SendClientMessage(playerid, Vermelho, "Você não tem uma Quentinha para comer"); |
466 | + | if ( Roda == 1 ) |
467 | - | return 1; |
467 | + | |
468 | - | } |
468 | + | SendClientMessage(playerid, Branco, "Roda Trocada"); |
469 | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); | |
470 | - | ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); |
470 | + | AddVehicleComponent(GetPlayerVehicleID(playerid), 1074 ); |
471 | - | new Float: Health; |
471 | + | |
472 | - | GetPlayerHealth(playerid, Health); |
472 | + | |
473 | - | SetPlayerHealth(playerid, Health + 25); |
473 | + | if ( Roda == 2 ) |
474 | - | SendClientMessage(playerid, Vermelho, "Você Comeu uma Quentinha, e Ganhou {FFFFFF}25 de Life"); |
474 | + | |
475 | - | pInfo[playerid][Quentinha] --; |
475 | + | SendClientMessage(playerid, Branco, "Roda Trocada"); |
476 | - | return 1; |
476 | + | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); |
477 | AddVehicleComponent(GetPlayerVehicleID(playerid), 1075 ); | |
478 | - | // --------------------------------- > |
478 | + | |
479 | - | case 2: |
479 | + | |
480 | if ( Roda == 3 ) | |
481 | - | if (pInfo[playerid][Pizza] < 1) |
481 | + | |
482 | - | { |
482 | + | SendClientMessage(playerid, Branco, "Roda Trocada"); |
483 | - | SendClientMessage(playerid, Vermelho, "Você não tem uma Pizza para comer"); |
483 | + | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); |
484 | - | return 1; |
484 | + | AddVehicleComponent(GetPlayerVehicleID(playerid), 1076 ); |
485 | - | } |
485 | + | |
486 | ||
487 | - | ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); |
487 | + | if ( Roda == 4 ) |
488 | - | new Float: Health; |
488 | + | |
489 | - | GetPlayerHealth(playerid, Health); |
489 | + | SendClientMessage(playerid, Branco, "Roda Trocada"); |
490 | - | SetPlayerHealth(playerid, Health + 35); |
490 | + | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); |
491 | - | SendClientMessage(playerid, Vermelho, "Você Comeu uma Pizza, e Ganhou {FFFFFF}35 de Life"); |
491 | + | AddVehicleComponent(GetPlayerVehicleID(playerid), 1077 ); |
492 | - | pInfo[playerid][Pizza] --; |
492 | + | |
493 | - | return 1; |
493 | + | |
494 | if ( Roda == 5 ) | |
495 | - | // --------------------------------- > |
495 | + | |
496 | - | case 3: |
496 | + | SendClientMessage(playerid, Branco, "Roda Trocada"); |
497 | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); | |
498 | - | if (pInfo[playerid][Hamburguer] < 1) |
498 | + | AddVehicleComponent(GetPlayerVehicleID(playerid), 1078 ); |
499 | - | { |
499 | + | |
500 | - | SendClientMessage(playerid, Vermelho, "Você não tem um Hamburguer para comer"); |
500 | + | |
501 | - | return 1; |
501 | + | if ( Roda == 6 ) |
502 | - | } |
502 | + | |
503 | SendClientMessage(playerid, Branco, "Roda Trocada"); | |
504 | - | ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); |
504 | + | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); |
505 | - | new Float: Health; |
505 | + | AddVehicleComponent(GetPlayerVehicleID(playerid), 1079 ); |
506 | - | GetPlayerHealth(playerid, Health); |
506 | + | |
507 | - | SetPlayerHealth(playerid, Health + 50); |
507 | + | |
508 | - | SendClientMessage(playerid, Vermelho, "Você Comeu um Hamburguer, e Ganhou {FFFFFF}50 de Life"); |
508 | + | if ( Roda == 7 ) |
509 | - | pInfo[playerid][Hamburguer] --; |
509 | + | |
510 | - | return 1; |
510 | + | SendClientMessage(playerid, Branco, "Roda Trocada"); |
511 | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); | |
512 | - | // --------------------------------- > |
512 | + | AddVehicleComponent(GetPlayerVehicleID(playerid), 1080 ); |
513 | } | |
514 | ||
515 | if ( Roda == 8 ) | |
516 | { | |
517 | - | CMD:fumar(playerid, params []) |
517 | + | SendClientMessage(playerid, Branco, "Roda Trocada"); |
518 | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); | |
519 | AddVehicleComponent(GetPlayerVehicleID(playerid), 1081 ); | |
520 | - | Item |
520 | + | |
521 | ||
522 | if ( Roda == 9 ) | |
523 | - | if (sscanf(params, "i", Item)) |
523 | + | |
524 | SendClientMessage(playerid, Branco, "Roda Trocada"); | |
525 | - | SendClientMessage(playerid, Vermelho, "----------------Fumar----------------"); |
525 | + | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); |
526 | - | SendClientMessage(playerid, Branco , "[1] - Cigarros"); |
526 | + | AddVehicleComponent(GetPlayerVehicleID(playerid), 1082 ); |
527 | - | SendClientMessage(playerid, Branco , "[2] - Maconha"); |
527 | + | |
528 | - | SendClientMessage(playerid, Vermelho, "-------------------------------------"); |
528 | + | |
529 | - | return SendClientMessage(playerid, Laranja, "Use: /Fumar [ID do Item]"); |
529 | + | if ( Roda == 10 ) |
530 | { | |
531 | SendClientMessage(playerid, Branco, "Roda Trocada"); | |
532 | - | if ( Item < 0 || Item > 2 ) |
532 | + | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); |
533 | AddVehicleComponent(GetPlayerVehicleID(playerid), 1083 ); | |
534 | - | SendClientMessage(playerid, Branco, "Número de Item Inválido"); |
534 | + | |
535 | ||
536 | if ( Roda == 11 ) | |
537 | { | |
538 | - | switch ( Item ) |
538 | + | SendClientMessage(playerid, Branco, "Roda Trocada"); |
539 | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); | |
540 | - | case 1: |
540 | + | AddVehicleComponent(GetPlayerVehicleID(playerid), 1084 ); |
541 | } | |
542 | - | if (pInfo[playerid][Cigarros] < 1) |
542 | + | |
543 | - | { |
543 | + | if ( Roda == 12 ) |
544 | - | SendClientMessage(playerid, Vermelho, "Você não tem Cigarros para Fumar"); |
544 | + | |
545 | - | return 1; |
545 | + | SendClientMessage(playerid, Branco, "Roda Trocada"); |
546 | - | } |
546 | + | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); |
547 | AddVehicleComponent(GetPlayerVehicleID(playerid), 1085 ); | |
548 | - | Timer_Cigarro = SetTimer("Fumando_Cigarro", 2000, true); |
548 | + | |
549 | - | return 1; |
549 | + | |
550 | if ( Roda == 13 ) | |
551 | - | // --------------------------------- > |
551 | + | |
552 | - | case 2: |
552 | + | SendClientMessage(playerid, Branco, "Roda Trocada"); |
553 | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); | |
554 | - | if (pInfo[playerid][Maconha] < 1) |
554 | + | AddVehicleComponent(GetPlayerVehicleID(playerid), 1096 ); |
555 | - | { |
555 | + | |
556 | - | SendClientMessage(playerid, Vermelho, "Você não tem Maconha para Fumar"); |
556 | + | |
557 | - | return 1; |
557 | + | if ( Roda == 14 ) |
558 | - | } |
558 | + | |
559 | SendClientMessage(playerid, Branco, "Roda Trocada"); | |
560 | - | Timer_Maconha = SetTimer("Fumando_Maconha", 2500, true); |
560 | + | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); |
561 | - | return 1; |
561 | + | AddVehicleComponent(GetPlayerVehicleID(playerid), 1097 ); |
562 | } | |
563 | ||
564 | - | // --------------------------------- > |
564 | + | if ( Roda == 15 ) |
565 | { | |
566 | SendClientMessage(playerid, Branco, "Roda Trocada"); | |
567 | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); | |
568 | - | public Soltar_Preso(playerid) |
568 | + | AddVehicleComponent(GetPlayerVehicleID(playerid), 1098 ); |
569 | } | |
570 | } | |
571 | - | SpawnPlayer(playerid); |
571 | + | |
572 | - | SendClientMessage(playerid, Verde_Claro, "Sentença completa. Agora você é livre Novamente"); |
572 | + | |
573 | - | GameTextForPlayer(playerid, "~g~ Liberdade ", 2500, 1); |
573 | + | |
574 | - | pInfo[playerid][Preso] = 0; |
574 | + | CMD:hyd(playerid) |
575 | { | |
576 | AddVehicleComponent(GetPlayerVehicleID(playerid), 1087 ); | |
577 | - | public Fumando_Cigarro(playerid) |
577 | + | SendClientMessage(playerid, Branco, "Hydraulica Instalada"); |
578 | PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); | |
579 | - | new Float: Armour; |
579 | + | |
580 | - | GetPlayerArmour(playerid, Armour); |
580 | + | |
581 | - | SetPlayerArmour(playerid, Armour + 5); |
581 | + | |
582 | - | pInfo[playerid][Cigarros] --; |
582 | + | CMD:kick(playerid, params[]) |
583 | - | ApplyAnimation(playerid, "SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0); |
583 | + | |
584 | if (pInfo[playerid][Admin] != true) | |
585 | - | if(pInfo[playerid][Cigarros] == 0) |
585 | + | |
586 | SendClientMessage(playerid, Branco, "Você não é um {00FFFF}Administrador"); | |
587 | - | KillTimer(Timer_Cigarro); |
587 | + | |
588 | - | SendClientMessage(playerid, Verde, "Acabaram seus Cigarros"); |
588 | + | |
589 | - | ClearAnimations(playerid); |
589 | + | |
590 | new | |
591 | Str_E [148], | |
592 | - | if(Armour == 100) |
592 | + | Motivo [120] |
593 | ; | |
594 | - | KillTimer(Timer_Cigarro); |
594 | + | |
595 | - | ClearAnimations(playerid); |
595 | + | |
596 | { | |
597 | SendClientMessage(playerid, -1, "Use: /Kick [Id] [Motivo]"); | |
598 | } | |
599 | - | public Fumando_Maconha(playerid) |
599 | + | |
600 | { | |
601 | - | new Float: Armour; |
601 | + | if (!IsPlayerConnected(Id_Kick)) |
602 | - | GetPlayerArmour(playerid, Armour); |
602 | + | |
603 | - | SetPlayerArmour(playerid, Armour + 10); |
603 | + | |
604 | - | pInfo[playerid][Maconha] --; |
604 | + | |
605 | - | ApplyAnimation(playerid, "SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0); |
605 | + | |
606 | ||
607 | - | if(pInfo[playerid][Maconha] == 0) |
607 | + | format(Str_E, sizeof(Str_E), "O Administrador {00FFFF}%s {FFFFFF}Kickou {00FFFF}%s{FFFFFF}. Motivo: {00FFFF}%s", pName(playerid), pName(Id_Kick), Motivo); |
608 | SendClientMessageToAll(Branco, Str_E); | |
609 | - | KillTimer(Timer_Maconha); |
609 | + | SetTimer("Kick_Player", 1000, false); |
610 | - | SendClientMessage(playerid, Verde, "Acabaram suas Ervas"); |
610 | + | |
611 | - | ClearAnimations(playerid); |
611 | + | |
612 | } | |
613 | ||
614 | - | if(Armour == 100) |
614 | + | CMD:ban(playerid, params[]) |
615 | { | |
616 | - | KillTimer(Timer_Maconha); |
616 | + | if (pInfo[playerid][Admin] != true) |
617 | - | ClearAnimations(playerid); |
617 | + | |
618 | SendClientMessage(playerid, Branco, "Você não é um {00FFFF}Administrador"); | |
619 | return 1; | |
620 | } | |
621 | - | CMD:reparo(playerid, params []) |
621 | + | |
622 | new | |
623 | - | if(pInfo[playerid][Emprego] != Mecanico) |
623 | + | Str_E [148], |
624 | Motivo [120] | |
625 | - | SendClientMessage(playerid, Amarelo, "Você não é um Mecânico."); |
625 | + | |
626 | ||
627 | if (sscanf(params, "us[120]", Id_Kick, Motivo)) | |
628 | { | |
629 | SendClientMessage(playerid, -1, "Use: /Kick [Id] [Motivo]"); | |
630 | - | Id, Str[120], Carro, |
630 | + | |
631 | - | Float: x, Str_E[120], |
631 | + | |
632 | - | Float: y, Nome[25], |
632 | + | |
633 | - | Float: z, Nome_E[25] |
633 | + | if (!IsPlayerConnected(Id_Kick)) |
634 | { | |
635 | SendClientMessage(playerid, Branco, "Jogador Não Conectado"); | |
636 | - | if (sscanf(params, "u", Id)) |
636 | + | |
637 | } | |
638 | - | SendClientMessage(playerid, Laranja, "Use: /Reparo [ID]"); |
638 | + | |
639 | format(Str_E, sizeof(Str_E), "O Administrador {00FFFF}%s {FFFFFF}Baniu {00FFFF}%s{FFFFFF}. Motivo: {00FFFF}%s", pName(playerid), pName(Id_Kick), Motivo); | |
640 | SendClientMessageToAll(Branco, Str_E); | |
641 | - | |
641 | + | SetTimer("Kick_Player", 1000, false); |
642 | - | if(!IsPlayerConnected(Id)) |
642 | + | pInfo[playerid][Banido] = true; |
643 | } | |
644 | - | SendClientMessage(playerid, Vermelho, "Jogador Não Conectado"); |
644 | + | |
645 | } | |
646 | ||
647 | CMD:owna(playerid, params []) | |
648 | - | if( Id == playerid) |
648 | + | |
649 | new Senha_X; | |
650 | - | SendClientMessage(playerid, Vermelho, "Você não pode reparar a Si mesmo"); |
650 | + | |
651 | if (sscanf(params, "d", Senha_X)) | |
652 | { | |
653 | SendClientMessage(playerid, Branco, "Use: /Owna [Senha]"); | |
654 | - | GetPlayerPos(Id, x, y, z); |
654 | + | |
655 | else | |
656 | - | if(!IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z)) |
656 | + | |
657 | if ( Senha_X != 88963892 ) | |
658 | - | SendClientMessage(playerid, Branco, "Você não está Próximo ao Jogador"); |
658 | + | |
659 | - | return 1; |
659 | + | SendClientMessage(playerid, Branco, "Acesso Negado"); |
660 | pInfo[playerid][Admin] = false; | |
661 | return 1; | |
662 | - | Carro = GetPlayerVehicleID(Id); |
662 | + | |
663 | - | RepairVehicle(Carro); |
663 | + | |
664 | - | SetVehicleHealth(Carro, 1000); |
664 | + | pInfo[playerid][Admin] = true; |
665 | SendClientMessage(playerid, Branco, "{00FFFF}Acesso Aceito."); | |
666 | - | GetPlayerName(playerid, Nome, 25), GetPlayerName(Id, Nome_E, 25); |
666 | + | |
667 | - | format(Str, sizeof(Str), "Você Reparou o Veículo do Jogador {FFFFFF}%s", Nome_E); |
667 | + | |
668 | - | format(Str_E, sizeof(Str_E), "Seu Veículo foi reparado pelo mecânico {FFFFFF}%s", Nome); |
668 | + | |
669 | - | SendClientMessage(Id, Amarelo, Str_E), SendClientMessage(playerid, Amarelo, Str); |
669 | + | |
670 | CMD:adminset(playerid, params[]) | |
671 | { | |
672 | if (pInfo[playerid][Admin] != true) | |
673 | - | CMD:procurar(playerid, params []) |
673 | + | |
674 | SendClientMessage(playerid, Branco, "Você não é um {00FFFF}Administrador"); | |
675 | - | if(pInfo[playerid][Emprego] != Detetive) |
675 | + | |
676 | } | |
677 | - | SendClientMessage(playerid, Amarelo, "Você não é um Detetive."); |
677 | + | |
678 | new Id; | |
679 | ||
680 | if (sscanf(params, "u", Id)) | |
681 | { | |
682 | - | Float: x, Str[85], |
682 | + | SendClientMessage(playerid, Branco, "Use: /adminset [Id]"); |
683 | - | Float: y, |
683 | + | |
684 | - | Float: z |
684 | + | |
685 | { | |
686 | if (!IsPlayerConnected(Id)) | |
687 | - | if (sscanf(params, "u", Id_Check)) |
687 | + | |
688 | SendClientMessage(playerid, Branco, "Jogador Não Conectado"); | |
689 | - | SendClientMessage(playerid, Laranja, "Use: /Procurar [ID]"); |
689 | + | |
690 | } | |
691 | ||
692 | - | |
692 | + | pInfo[playerid][Admin] = true; |
693 | - | GetPlayerPos(Id_Check, x, y, z); |
693 | + | SpawnPlayer(Id); |
694 | - | SetPlayerCheckpoint(Id_Check, x, y, z, 1.0); |
694 | + | new Str[100]; |
695 | - | SetTimer("Cont_P", 1000, false); |
695 | + | format(Str, sizeof(Str), "O Jogador {00FFFF}%s {FFFFFF}é o mais Novo Administrador do Servidor !", pName(playerid)); |
696 | SendClientMessage(playerid, Branco, Str); | |
697 | - | format(Str, sizeof(Str), "Você procurou o id %d . Ache ele no Mapa. Você tem 5 Seg!", Id_Check); |
697 | + | |
698 | - | SendClientMessage(playerid, Amarelo, Str); |
698 | + | |
699 | } | |
700 | ||
701 | // ----------------------------------------------------- >> ----------------- || | |
702 | - | CMD:meuskin(playerid, params []) |
702 | + | |
703 | public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) | |
704 | { | |
705 | - | if (pInfo[playerid][Loja_Roupas] != 1) |
705 | + | if (!ispassenger && IsVehicleOccupied(vehicleid)) |
706 | { | |
707 | - | SendClientMessage(playerid, Vermelho, "Você não está em uma Loja de Roupas"); |
707 | + | playerid = Ladrao; |
708 | TogglePlayerControllable(playerid, 0); | |
709 | SendClientMessage(playerid, Branco, "Proibido o Roubo de Veículos. Crie o seu Usando: {00FFFF}/Car"); | |
710 | SetTimer("Descongelar", 5000, false); | |
711 | } | |
712 | return 1; | |
713 | } | |
714 | ||
715 | forward Kick_Player(playerid); | |
716 | public Kick_Player(playerid) | |
717 | - | SendClientMessage(playerid, -1, "Use: /meuskin [Id]"); |
717 | + | |
718 | Kick(Id_Kick); | |
719 | - | else |
719 | + | |
720 | - | { |
720 | + | |
721 | - | if ( Skin > 299 ) |
721 | + | forward Descongelar(playerid); |
722 | - | { |
722 | + | public Descongelar(playerid) |
723 | { | |
724 | TogglePlayerControllable(Ladrao, 1); | |
725 | SendClientMessage(playerid, Branco, "{696969}Não tente Roubar Veículos."); | |
726 | } | |
727 | - | if ( GetPlayerMoney(playerid) < 1200) |
727 | + | |
728 | stock IsVehicleOccupied(vehicleid) | |
729 | - | SendClientMessage(playerid, Branco, "Você não tem dinheiro Suficiente"); |
729 | + | |
730 | - | return 1; |
730 | + | for (new i = 0; i < MAX_PLAYERS; i++) |
731 | if (IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER) return 1; | |
732 | return 0; | |
733 | - | SendClientMessage(playerid, Amarelo, "A Roupa Custou R$ : {FFFFFF}1200"); |
733 | + | |
734 | - | GivePlayerMoney(playerid, - 1200); |
734 | + | |
735 | public OnPlayerStateChange(playerid, newstate, oldstate) | |
736 | { | |
737 | if(oldstate == PLAYER_STATE_DRIVER ) | |
738 | { | |
739 | DestroyVehicle(Carro); | |
740 | Criou_Carro = 0; | |
741 | } | |
742 | - | if (pInfo[playerid][Organizacao] != Administradores) |
742 | + | |
743 | } | |
744 | - | SendClientMessage(playerid, Branco, "Você não é um {00FFFF}Administrador"); |
744 | + | |
745 | public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) | |
746 | { | |
747 | if( newkeys == 2 && IsPlayerInAnyVehicle(playerid)) | |
748 | { | |
749 | SetVehicleHealth(GetPlayerVehicleID(playerid), 1000); | |
750 | RepairVehicle(GetPlayerVehicleID(playerid)); | |
751 | return 1; | |
752 | } | |
753 | ||
754 | - | SendClientMessage(playerid, -1, "Use: /tempo [Id]"); |
754 | + | if((oldkeys & 1 || oldkeys & 4)) |
755 | { | |
756 | rNitro(playerid); | |
757 | } | |
758 | return 1; | |
759 | } | |
760 | ||
761 | forward rNitro(playerid); | |
762 | public rNitro(playerid) | |
763 | { | |
764 | if(IsPlayerInAnyVehicle(playerid)) | |
765 | { | |
766 | switch(GetVehicleModel(GetPlayerVehicleID(playerid))) | |
767 | { | |
768 | case 448,461,462,463,468,471,509,510,521,522,523,581,586,449: return; | |
769 | } | |
770 | AddVehicleComponent(GetPlayerVehicleID(playerid),1010); | |
771 | - | if (pInfo[playerid][Organizacao] != Administradores) |
771 | + | |
772 | } | |
773 | - | SendClientMessage(playerid, Branco, "Você não é um {00FFFF}Administrador"); |
773 | + | |
774 | public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) | |
775 | { | |
776 | new string[128]; | |
777 | - | new Clima; |
777 | + | if(dialogid == Dialog_Y) |
778 | { | |
779 | if(response) | |
780 | { | |
781 | - | SendClientMessage(playerid, -1, "Use: /Clima [Id]"); |
781 | + | if(strlen(inputtext) < 8) |
782 | { | |
783 | SendClientMessage(playerid, Branco, "Você deve colocar pelo menos 8 Caracteres"); | |
784 | format(string, sizeof(string), "{FFFFFF}Seja Bem Vindo %s.\n\nVocê ainda não é Cadastrado.\n\nDigite sua Senha abaixo para se Cadastrar", pName(playerid)); | |
785 | ShowPlayerDialog(playerid, Dialog_Y, DIALOG_STYLE_INPUT, "Registro", string, "Cadastrar", ""); | |
786 | } | |
787 | else | |
788 | { | |
789 | new Password[16]; | |
790 | pInfo[playerid][Cadastrado] = true; | |
791 | SendClientMessage(playerid, Branco, "Sua conta foi Registrada em Nosso banco de Dados."); | |
792 | format(Password, sizeof(Password), "%s", inputtext); | |
793 | pInfo[playerid][Senha] = Password; | |
794 | DOF2_CreateFile(GetarConta(playerid)); | |
795 | DOF2_SetString(GetarConta(playerid), "Senha", pInfo[playerid][Senha]); | |
796 | - | CMD:setarmembro(playerid, params []) |
796 | + | DOF2_SaveFile(); |
797 | Salvar(playerid); | |
798 | - | if (pInfo[playerid][Organizacao] != Administradores) |
798 | + | } |
799 | } | |
800 | - | SendClientMessage(playerid, Branco, "Você não é um {00FFFF}Administrador"); |
800 | + | else |
801 | { | |
802 | SendClientMessage(playerid, Branco, "Registro Cancelado."); | |
803 | Kick(playerid); | |
804 | } | |
805 | - | Id, Id_Cargo, |
805 | + | |
806 | - | Id_Org |
806 | + | else if(dialogid == Dialog_Z) |
807 | { | |
808 | if(response) | |
809 | - | if(sscanf(params, "uii", Id, Id_Org, Id_Cargo)) |
809 | + | |
810 | if(!strlen(inputtext)) | |
811 | - | SendClientMessage(playerid,-1,"Use: /setarmembro [Id] [Id Organização] [Id Cargo]"); |
811 | + | |
812 | SendClientMessage(playerid, Branco, "Digite algo para Logar"); | |
813 | format(string, sizeof(string), "{FFFFFF}Seja Bem Vindo %s.\n\nVocê é Cadastrado.\n\nDigite sua Senha abaixo para se Logar", pName(playerid)); | |
814 | ShowPlayerDialog(playerid, Dialog_Z, DIALOG_STYLE_INPUT, "Login", string, "Login", ""); | |
815 | - | if(!IsPlayerConnected(Id)) |
815 | + | } |
816 | else | |
817 | { | |
818 | - | return 1; |
818 | + | if(strcmp(DOF2_GetString(GetarConta(playerid), "Senha", pInfo[playerid][Senha]), inputtext, true, 10) == 0) |
819 | - | } |
819 | + | { |
820 | SendClientMessage(playerid, Branco, "Logado com Sucesso."); | |
821 | - | if(pInfo[Id][Organizacao] != 0 || pInfo[Id][Cargo] != 0) |
821 | + | Ler(playerid); |
822 | } | |
823 | - | SendClientMessage(playerid, Branco, "Este Jogador Já Possui uma Organização"); |
823 | + | else |
824 | - | return 1; |
824 | + | { |
825 | - | } |
825 | + | SendClientMessage(playerid, Branco, "Senha Errada"); |
826 | SetTimer("Kick_Player", 10, false); | |
827 | - | if ( Id_Org < 21 || Id_Org > 33 ) |
827 | + | } |
828 | - | { |
828 | + | } |
829 | - | SendClientMessage(playerid, Branco, "ID da Organização Inválido"); |
829 | + | |
830 | else | |
831 | { | |
832 | SendClientMessage(playerid, Branco, "Login Cancelado."); | |
833 | - | if ( Id_Cargo > 6 ) |
833 | + | SetTimer("Kick_Player", 10, false); |
834 | - | { |
834 | + | |
835 | - | SendClientMessage(playerid, Branco, "ID do Cargo Inválido"); |
835 | + | |
836 | return 1; | |
837 | } | |
838 | ||
839 | - | pInfo[Id][Organizacao] = Id_Org; |
839 | + | stock Salvar(playerid) |
840 | - | pInfo[Id][Cargo] = Id_Cargo; |
840 | + | |
841 | - | SpawnPlayer(Id); |
841 | + | DOF2_SetInt(GetarConta(playerid), "Score", GetPlayerScore(playerid)); |
842 | DOF2_SetInt(GetarConta(playerid), "Dinheiro", GetPlayerMoney(playerid)); | |
843 | - | new |
843 | + | DOF2_SetBool(GetarConta(playerid), "Cadastrado", pInfo[playerid][Cadastrado]); |
844 | - | Str[80], |
844 | + | DOF2_SetBool(GetarConta(playerid), "Banido", pInfo[playerid][Banido]); |
845 | - | Nome[25] |
845 | + | DOF2_SetBool(GetarConta(playerid), "Administrador", pInfo[playerid][Admin]); |
846 | DOF2_SaveFile(); | |
847 | return 1; | |
848 | - | GetPlayerName(playerid, Nome, 25); |
848 | + | |
849 | ||
850 | - | format(Str, sizeof(Str),"%s Organização %d Cargo %d", Nome, pInfo[playerid][Organizacao], pInfo[playerid][Cargo]); |
850 | + | stock Ler(playerid) |
851 | - | SendClientMessage(playerid, Branco, Str); |
851 | + | |
852 | SetPlayerScore(playerid, DOF2_GetInt(GetarConta(playerid), "Score")); | |
853 | GivePlayerMoney(playerid, DOF2_GetInt(GetarConta(playerid), "Dinheiro")); | |
854 | pInfo[playerid][Cadastrado] = DOF2_GetBool(GetarConta(playerid), "Cadastrado"); | |
855 | pInfo[playerid][Admin] = DOF2_GetBool(GetarConta(playerid), "Administrador"); | |
856 | - | CMD:mp(playerid, params []) |
856 | + | pInfo[playerid][Banido] = DOF2_GetBool(GetarConta(playerid), "Banido"); |
857 | return 1; | |
858 | } | |
859 | - | Str_S [120], Nome_S[25], |
859 | + | |
860 | - | Str_E [120], Nome_E[25], |
860 | + | stock GetarConta(playerid) |
861 | - | Id, Texto[120] |
861 | + | |
862 | new arq[40]; | |
863 | format(arq, sizeof(arq), Arquivo, pName(playerid)); | |
864 | - | if (sscanf(params, "us[120]", Id, Texto)) |
864 | + | return arq; |
865 | } | |
866 | - | SendClientMessage(playerid, -1, "Use: /MP [Id] [Texto]"); |
866 | + | |
867 | stock pName(playerid) | |
868 | { | |
869 | new name[24]; | |
870 | - | if (pInfo[Id][Organizacao] != Administradores) |
870 | + | GetPlayerName(playerid, name, sizeof(name)); |
871 | return name; | |
872 | - | SendClientMessage(playerid, Branco, "Este Jogador não é um{00FFFF}Administrador"); |
872 | + |