Os nomes dos veнculos nгo convкm. -
Fiz uma variбvel para identificar o ъltimo veнculo que o jogador esteve...
Veнculos como.
Onibus/caminhхes.
e fiz um sistema de multa. para caso um agente de profissгo multar o jogador e o determinador jogador nгo estiver dentro do veнculo. ele serб multado e a multa irб ir para o ъltimo veнculo que ele esteve.
O problema й que a variбvel de identificar o ъltimo veнculo nгo estб reconhecendo o ъltimo veнculo.
O que irб setar o nome do tipo de veнculo.
pawn Код:
CMD:multar(playerid, params[])
{
getdate(Ano, Mes, Dia);
gettime(Horas, Minutos, Segundos);
if(INFO_P[playerid][PROFISSAO_P] == 2)
{
new ID_2PESSOA, Desc[10], Inf[30], InfV[70];
//if(Bateu_Ponto[playerid] == false) return SendClientMessage(playerid,VERMELHO_BEM_CLARO,"Vocк precisa bater o ponto para poder usar este comando!");
if(sscanf(params, "us[70]", ID_2PESSOA, Desc)) return SendClientMessage(playerid, COR_CINZA, "USE: /multar [ID/NOME] [DESCRIЗГO]");
if(!IsPlayerConnected(ID_2PESSOA)) return SendClientMessage(playerid, VERMELHO_BEM_CLARO , "Jogador(a) nгo estб conectado.");
//if(ID_2PESSOA == playerid) return SendClientMessage(playerid, VERMELHO_BEM_CLARO, "Vocк nгo pode multar si mesmo.");
if(Verificar_Modo_ADM[ID_2PESSOA] == 1 && INFO_P[ID_2PESSOA][ADMIN_P] >= 1) return SendClientMessage(playerid, VERMELHO_BEM_CLARO, "Vocк nгo pode multar um admin em modo de trabalho.");
if(strcmp(Desc,"TNC",true) == 0) // TNC
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_AEREA_P] != 0
|| BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_NAUTICA_P] != 0
|| MotoLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_MOTOS_P] != 0
|| CarroLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_CARROS_P] != 0
|| Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] != 0)
{
if(Ultimo_Veiculo[ID_2PESSOA] == AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Aйrea";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Nautica";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Motocicletas";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Automуveis";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Veнculos de grande porte";
}
Inf = "Trafegando na Calзada";
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------ [MULTADO] ------------------------------------------------------------ |");
PlayerPlaySound(ID_2PESSOA, 1132, 0, 0, 0);
GameTextForPlayer(ID_2PESSOA, "~r~~h~MULTADO", 3000, 3);
INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] += 7;
INFO_P[ID_2PESSOA][MULTA_TNC_P] += 1;
format(String,sizeof(String), " - %s Multou %s no valor de R$724, Infraзгo: %s", Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
Log_Chat_Profissoes(INFO_P[playerid][PROFISSAO_P], ROXO_BEM_CLARO, String);
format(String,sizeof(String), " - Infraзгo: {ED4848}%s {FFFFFF}- Funcionario: {61FF90}%s", Inf, Nome_Conta(playerid));
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
format(String,sizeof(String), " - Valor da multa: {7DDE86}R$724 {FFFFFF}- Pontos: {FFA500}%d/20", INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P]);
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
SendClientMessage(ID_2PESSOA, -1, " - Foram acrescentado 7 Pontos em sua carteira.");
SendClientMessage(ID_2PESSOA, -1, " - Se os seus pontos passarem de 20, vocк perde a carteira de habilitaзгo.");
SendClientMessage(ID_2PESSOA, -1, " - Em um Detran vocк pode pagar as multas e limpar seus pontos.");
if(INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] > 20)
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Aйrea por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_AEREA_P] = 0;
}
else if(BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Nautica por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_NAUTICA_P] = 0;
}
else if(MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Motocicletas por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_MOTOS_P] = 0;
}
else if(CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Automуveis por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_CARROS_P] = 0;
}
else if(Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de veнculos de grande porte por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] = 0;
}
Salvar_Contas(ID_2PESSOA);
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------------------------------------------------------------------------------- |");
format(String,sizeof(String),"(%s): %s Multou %s, Motivo: %s | Data: [%d/%d/%d] Horбrio: [%d:%d:%d]", Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf, Dia, Mes, Ano, Horas, Minutos, Segundos);
Log_Multou_Jogador(String);
printf(" - [%d/%d/%d]: (%s): %s Multou %s, Motivo: %s", Dia, Mes, Ano, Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
}
}
else
{
format(String,sizeof(String), " Esse jogador nгo tem 'licenзas/carteira' de %s .", InfV);
SendClientMessage(playerid, VERMELHO_BEM_CLARO , String);
}
}
else if(strcmp(Desc,"DP",true) == 0) // DP
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_AEREA_P] != 0
|| BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_NAUTICA_P] != 0
|| MotoLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_MOTOS_P] != 0
|| CarroLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_CARROS_P] != 0
|| Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] != 0)
{
if(Ultimo_Veiculo[ID_2PESSOA] == AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Aйrea";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Nautica";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Motocicletas";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Automуveis";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Veнculos de grande porte";
}
Inf = "Direзгo Perigosa";
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------ [MULTADO] ------------------------------------------------------------ |");
PlayerPlaySound(ID_2PESSOA, 1132, 0, 0, 0);
GameTextForPlayer(ID_2PESSOA, "~r~~h~MULTADO", 3000, 3);
INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] += 7;
INFO_P[ID_2PESSOA][MULTA_DP_P] += 1;
format(String,sizeof(String), " - %s Multou %s no valor de R$1930, Infraзгo: %s", Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
Log_Chat_Profissoes(INFO_P[playerid][PROFISSAO_P], ROXO_BEM_CLARO, String);
format(String,sizeof(String), " - Infraзгo: {ED4848}%s {FFFFFF}- Funcionario: {61FF90}%s", Inf, Nome_Conta(playerid));
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
format(String,sizeof(String), " - Valor da multa: {7DDE86}R$1930 {FFFFFF}- Pontos: {FFA500}%d/20", INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P]);
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
SendClientMessage(ID_2PESSOA, -1, " - Foram acrescentado 7 Pontos em sua carteira.");
SendClientMessage(ID_2PESSOA, -1, " - Se os seus pontos passarem de 20, vocк perde a carteira de habilitaзгo.");
SendClientMessage(ID_2PESSOA, -1, " - Em um Detran vocк pode pagar as multas e limpar seus pontos.");
if(INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] > 20)
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Aйrea por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_AEREA_P] = 0;
}
else if(BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Nautica por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_NAUTICA_P] = 0;
}
else if(MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Motocicletas por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_MOTOS_P] = 0;
}
else if(CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Automуveis por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_CARROS_P] = 0;
}
else if(Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de veнculos de grande porte por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] = 0;
}
Salvar_Contas(ID_2PESSOA);
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------------------------------------------------------------------------------- |");
format(String,sizeof(String),"(%s): %s Multou %s, Motivo: %s | Data: [%d/%d/%d] Horбrio: [%d:%d:%d]", Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf, Dia, Mes, Ano, Horas, Minutos, Segundos);
Log_Multou_Jogador(String);
printf(" - [%d/%d/%d]: (%s): %s Multou %s, Motivo: %s", Dia, Mes, Ano, Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
}
}
else
{
format(String,sizeof(String), " Esse jogador nгo tem 'licenзas/carteira' de %s .", InfV);
SendClientMessage(playerid, VERMELHO_BEM_CLARO , String);
}
}
else if(strcmp(Desc,"EI",true) == 0) // EI
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_AEREA_P] != 0
|| BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_NAUTICA_P] != 0
|| MotoLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_MOTOS_P] != 0
|| CarroLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_CARROS_P] != 0
|| Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] != 0)
{
if(Ultimo_Veiculo[ID_2PESSOA] == AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Aйrea";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Nautica";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Motocicletas";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Automуveis";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Veнculos de grande porte";
}
Inf = "Estacionamento Indevido";
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------ [MULTADO] ------------------------------------------------------------ |");
PlayerPlaySound(ID_2PESSOA, 1132, 0, 0, 0);
GameTextForPlayer(ID_2PESSOA, "~r~~h~MULTADO", 3000, 3);
INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] += 5;
INFO_P[ID_2PESSOA][MULTA_EI_P] += 1;
format(String,sizeof(String), " - %s Multou %s no valor de R$200, Infraзгo: %s", Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
Log_Chat_Profissoes(INFO_P[playerid][PROFISSAO_P], ROXO_BEM_CLARO, String);
format(String,sizeof(String), " - Infraзгo: {ED4848}%s {FFFFFF}- Funcionario: {61FF90}%s", Inf, Nome_Conta(playerid));
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
format(String,sizeof(String), " - Valor da multa: {7DDE86}R$200 {FFFFFF}- Pontos: {FFA500}%d/20", INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P]);
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
SendClientMessage(ID_2PESSOA, -1, " - Foram acrescentado 5 Pontos em sua carteira.");
SendClientMessage(ID_2PESSOA, -1, " - Se os seus pontos passarem de 20, vocк perde a carteira de habilitaзгo.");
SendClientMessage(ID_2PESSOA, -1, " - Em um Detran vocк pode pagar as multas e limpar seus pontos.");
if(INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] > 20)
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Aйrea por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_AEREA_P] = 0;
}
else if(BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Nautica por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_NAUTICA_P] = 0;
}
else if(MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Motocicletas por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_MOTOS_P] = 0;
}
else if(CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Automуveis por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_CARROS_P] = 0;
}
else if(Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de veнculos de grande porte por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] = 0;
}
Salvar_Contas(ID_2PESSOA);
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------------------------------------------------------------------------------- |");
format(String,sizeof(String),"(%s): %s Multou %s, Motivo: %s | Data: [%d/%d/%d] Horбrio: [%d:%d:%d]", Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf, Dia, Mes, Ano, Horas, Minutos, Segundos);
Log_Multou_Jogador(String);
printf(" - [%d/%d/%d]: (%s): %s Multou %s, Motivo: %s", Dia, Mes, Ano, Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
}
}
else
{
format(String,sizeof(String), " Esse jogador nгo tem 'licenзas/carteira' de %s .", InfV);
SendClientMessage(playerid, VERMELHO_BEM_CLARO , String);
}
}
else if(strcmp(Desc,"CM",true) == 0) // CM
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_AEREA_P] != 0
|| BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_NAUTICA_P] != 0
|| MotoLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_MOTOS_P] != 0
|| CarroLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_CARROS_P] != 0
|| Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] != 0)
{
if(Ultimo_Veiculo[ID_2PESSOA] == AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Aйrea";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Nautica";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Motocicletas";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Automуveis";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Veнculos de grande porte";
}
Inf = "Contra Mгo";
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------ [MULTADO] ------------------------------------------------------------ |");
PlayerPlaySound(ID_2PESSOA, 1132, 0, 0, 0);
GameTextForPlayer(ID_2PESSOA, "~r~~h~MULTADO", 3000, 3);
INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] += 5;
INFO_P[ID_2PESSOA][MULTA_CM_P] += 1;
format(String,sizeof(String), " - %s Multou %s no valor de R$900, Infraзгo: %s", Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
Log_Chat_Profissoes(INFO_P[playerid][PROFISSAO_P], ROXO_BEM_CLARO, String);
format(String,sizeof(String), " - Infraзгo: {ED4848}%s {FFFFFF}- Funcionario: {61FF90}%s", Inf, Nome_Conta(playerid));
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
format(String,sizeof(String), " - Valor da multa: {7DDE86}R$900 {FFFFFF}- Pontos: {FFA500}%d/20", INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P]);
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
SendClientMessage(ID_2PESSOA, -1, " - Foram acrescentado 5 Pontos em sua carteira.");
SendClientMessage(ID_2PESSOA, -1, " - Se os seus pontos passarem de 20, vocк perde a carteira de habilitaзгo.");
SendClientMessage(ID_2PESSOA, -1, " - Em um Detran vocк pode pagar as multas e limpar seus pontos.");
if(INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] > 20)
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Aйrea por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_AEREA_P] = 0;
}
else if(BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Nautica por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_NAUTICA_P] = 0;
}
else if(MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Motocicletas por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_MOTOS_P] = 0;
}
else if(CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Automуveis por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_CARROS_P] = 0;
}
else if(Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de veнculos de grande porte por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] = 0;
}
Salvar_Contas(ID_2PESSOA);
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------------------------------------------------------------------------------- |");
format(String,sizeof(String),"(%s): %s Multou %s, Motivo: %s | Data: [%d/%d/%d] Horбrio: [%d:%d:%d]", Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf, Dia, Mes, Ano, Horas, Minutos, Segundos);
Log_Multou_Jogador(String);
printf(" - [%d/%d/%d]: (%s): %s Multou %s, Motivo: %s", Dia, Mes, Ano, Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
}
}
else
{
format(String,sizeof(String), " Esse jogador nгo tem 'licenзas/carteira' de %s .", InfV);
SendClientMessage(playerid, VERMELHO_BEM_CLARO , String);
}
}
else if(strcmp(Desc,"DB",true) == 0) // DB
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_AEREA_P] != 0
|| BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_NAUTICA_P] != 0
|| MotoLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_MOTOS_P] != 0
|| CarroLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_CARROS_P] != 0
|| Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] != 0)
{
if(Ultimo_Veiculo[ID_2PESSOA] == AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Aйrea";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Nautica";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Motocicletas";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Automуveis";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Veнculos de grande porte";
}
Inf = "Dirigindo Bкbado";
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------ [MULTADO] ------------------------------------------------------------ |");
PlayerPlaySound(ID_2PESSOA, 1132, 0, 0, 0);
GameTextForPlayer(ID_2PESSOA, "~r~~h~MULTADO", 3000, 3);
INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] += 7;
INFO_P[ID_2PESSOA][MULTA_DB_P] += 1;
format(String,sizeof(String), " - %s Multou %s no valor de R$1915, Infraзгo: %s", Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
Log_Chat_Profissoes(INFO_P[playerid][PROFISSAO_P], ROXO_BEM_CLARO, String);
format(String,sizeof(String), " - Infraзгo: {ED4848}%s {FFFFFF}- Funcionario: {61FF90}%s", Inf, Nome_Conta(playerid));
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
format(String,sizeof(String), " - Valor da multa: {7DDE86}R$1915 {FFFFFF}- Pontos: {FFA500}%d/20", INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P]);
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
SendClientMessage(ID_2PESSOA, -1, " - Foram acrescentado 7 Pontos em sua carteira.");
SendClientMessage(ID_2PESSOA, -1, " - Se os seus pontos passarem de 20, vocк perde a carteira de habilitaзгo.");
SendClientMessage(ID_2PESSOA, -1, " - Em um Detran vocк pode pagar as multas e limpar seus pontos.");
if(INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] > 20)
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Aйrea por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_AEREA_P] = 0;
}
else if(BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Nautica por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_NAUTICA_P] = 0;
}
else if(MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Motocicletas por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_MOTOS_P] = 0;
}
else if(CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Automуveis por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_CARROS_P] = 0;
}
else if(Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de veнculos de grande porte por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] = 0;
}
Salvar_Contas(ID_2PESSOA);
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------------------------------------------------------------------------------- |");
format(String,sizeof(String),"(%s): %s Multou %s, Motivo: %s | Data: [%d/%d/%d] Horбrio: [%d:%d:%d]", Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf, Dia, Mes, Ano, Horas, Minutos, Segundos);
Log_Multou_Jogador(String);
printf(" - [%d/%d/%d]: (%s): %s Multou %s, Motivo: %s", Dia, Mes, Ano, Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
}
}
else
{
format(String,sizeof(String), " Esse jogador nгo tem 'licenзas/carteira' de %s .", InfV);
SendClientMessage(playerid, VERMELHO_BEM_CLARO , String);
}
}
else if(strcmp(Desc,"FD",true) == 0) // FD
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_AEREA_P] != 0
|| BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_NAUTICA_P] != 0
|| MotoLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_MOTOS_P] != 0
|| CarroLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_CARROS_P] != 0
|| Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] != 0)
{
if(Ultimo_Veiculo[ID_2PESSOA] == AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Aйrea";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Nautica";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Motocicletas";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Automуveis";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Veнculos de grande porte";
}
Inf = "Farol Desligado";
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------ [MULTADO] ------------------------------------------------------------ |");
PlayerPlaySound(ID_2PESSOA, 1132, 0, 0, 0);
GameTextForPlayer(ID_2PESSOA, "~r~~h~MULTADO", 3000, 3);
INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] += 5;
INFO_P[ID_2PESSOA][MULTA_FD_P] += 1;
format(String,sizeof(String), " - %s Multou %s no valor de R$250, Infraзгo: %s", Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
Log_Chat_Profissoes(INFO_P[playerid][PROFISSAO_P], ROXO_BEM_CLARO, String);
format(String,sizeof(String), " - Infraзгo: {ED4848}%s {FFFFFF}- Funcionario: {61FF90}%s", Inf, Nome_Conta(playerid));
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
format(String,sizeof(String), " - Valor da multa: {7DDE86}R$250 {FFFFFF}- Pontos: {FFA500}%d/20", INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P]);
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
SendClientMessage(ID_2PESSOA, -1, " - Foram acrescentado 5 Pontos em sua carteira.");
SendClientMessage(ID_2PESSOA, -1, " - Se os seus pontos passarem de 20, vocк perde a carteira de habilitaзгo.");
SendClientMessage(ID_2PESSOA, -1, " - Em um Detran vocк pode pagar as multas e limpar seus pontos.");
if(INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] > 20)
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Aйrea por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_AEREA_P] = 0;
}
else if(BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Nautica por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_NAUTICA_P] = 0;
}
else if(MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Motocicletas por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_MOTOS_P] = 0;
}
else if(CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Automуveis por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_CARROS_P] = 0;
}
else if(Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de veнculos de grande porte por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] = 0;
}
Salvar_Contas(ID_2PESSOA);
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------------------------------------------------------------------------------- |");
format(String,sizeof(String),"(%s): %s Multou %s, Motivo: %s | Data: [%d/%d/%d] Horбrio: [%d:%d:%d]", Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf, Dia, Mes, Ano, Horas, Minutos, Segundos);
Log_Multou_Jogador(String);
printf(" - [%d/%d/%d]: (%s): %s Multou %s, Motivo: %s", Dia, Mes, Ano, Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
}
}
else
{
format(String,sizeof(String), " Esse jogador nгo tem 'licenзas/carteira' de %s .", InfV);
SendClientMessage(playerid, VERMELHO_BEM_CLARO , String);
}
}
else if(strcmp(Desc,"EDV",true) == 0) // EDV
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_AEREA_P] != 0
|| BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_NAUTICA_P] != 0
|| MotoLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_MOTOS_P] != 0
|| CarroLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_CARROS_P] != 0
|| Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] != 0)
{
if(Ultimo_Veiculo[ID_2PESSOA] == AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Aйrea";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Nautica";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Motocicletas";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Automуveis";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Veнculos de grande porte";
}
Inf = "Excesso de Velocidade";
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------ [MULTADO] ------------------------------------------------------------ |");
PlayerPlaySound(ID_2PESSOA, 1132, 0, 0, 0);
GameTextForPlayer(ID_2PESSOA, "~r~~h~MULTADO", 3000, 3);
INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] += 7;
INFO_P[ID_2PESSOA][MULTA_EDV_P] += 1;
format(String,sizeof(String), " - %s Multou %s no valor de R$574, Infraзгo: %s", Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
Log_Chat_Profissoes(INFO_P[playerid][PROFISSAO_P], ROXO_BEM_CLARO, String);
format(String,sizeof(String), " - Infraзгo: {ED4848}%s {FFFFFF}- Funcionario: {61FF90}%s", Inf, Nome_Conta(playerid));
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
format(String,sizeof(String), " - Valor da multa: {7DDE86}R$574 {FFFFFF}- Pontos: {FFA500}%d/20", INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P]);
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
SendClientMessage(ID_2PESSOA, -1, " - Foram acrescentado 7 Pontos em sua carteira.");
SendClientMessage(ID_2PESSOA, -1, " - Se os seus pontos passarem de 20, vocк perde a carteira de habilitaзгo.");
SendClientMessage(ID_2PESSOA, -1, " - Em um Detran vocк pode pagar as multas e limpar seus pontos.");
if(INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] > 20)
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Aйrea por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_AEREA_P] = 0;
}
else if(BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Nautica por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_NAUTICA_P] = 0;
}
else if(MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Motocicletas por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_MOTOS_P] = 0;
}
else if(CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Automуveis por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_CARROS_P] = 0;
}
else if(Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de veнculos de grande porte por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] = 0;
}
Salvar_Contas(ID_2PESSOA);
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------------------------------------------------------------------------------- |");
format(String,sizeof(String),"(%s): %s Multou %s, Motivo: %s | Data: [%d/%d/%d] Horбrio: [%d:%d:%d]", Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf, Dia, Mes, Ano, Horas, Minutos, Segundos);
Log_Multou_Jogador(String);
printf(" - [%d/%d/%d]: (%s): %s Multou %s, Motivo: %s", Dia, Mes, Ano, Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
}
}
else
{
format(String,sizeof(String), " Esse jogador nгo tem 'licenзas/carteira' de %s .", InfV);
SendClientMessage(playerid, VERMELHO_BEM_CLARO , String);
}
}
else if(strcmp(Desc,"DSH",true) == 0) // DSH
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_AEREA_P] != 0
|| BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_NAUTICA_P] != 0
|| MotoLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_MOTOS_P] != 0
|| CarroLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_CARROS_P] != 0
|| Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] != 0)
{
if(Ultimo_Veiculo[ID_2PESSOA] == AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Aйrea";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Nautica";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Motocicletas";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Automуveis";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Veнculos de grande porte";
}
Inf = "Dirigindo sem Habilitaзгo";
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------ [MULTADO] ------------------------------------------------------------ |");
INFO_P[ID_2PESSOA][MULTA_DSH_P] += 1;
PlayerPlaySound(ID_2PESSOA, 1132, 0, 0, 0);
GameTextForPlayer(ID_2PESSOA, "~r~~h~MULTADO", 3000, 3);
format(String,sizeof(String), " - %s Multou %s no valor de R$700, Infraзгo: %s", Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
Log_Chat_Profissoes(INFO_P[playerid][PROFISSAO_P], ROXO_BEM_CLARO, String);
format(String,sizeof(String), " - Infraзгo: {ED4848}%s {FFFFFF}- Funcionario: {61FF90}%s", Inf, Nome_Conta(playerid));
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
SendClientMessage(ID_2PESSOA, -1, " - Valor da multa: {7DDE86}R$700 ");
SendClientMessage(ID_2PESSOA, -1, " - Vocк nгo possui a habilitaзгo para conduzir o seu veнculo, vocк foi apenas multado!");
SendClientMessage(ID_2PESSOA, -1, " - Em um Detran vocк pode pagar as multas e limpar seus pontos.");
if(INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] > 20)
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Aйrea por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_AEREA_P] = 0;
}
else if(BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Nautica por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_NAUTICA_P] = 0;
}
else if(MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Motocicletas por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_MOTOS_P] = 0;
}
else if(CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Automуveis por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_CARROS_P] = 0;
}
else if(Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de veнculos de grande porte por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] = 0;
}
Salvar_Contas(ID_2PESSOA);
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------------------------------------------------------------------------------- |");
format(String,sizeof(String),"(%s): %s Multou %s, Motivo: %s | Data: [%d/%d/%d] Horбrio: [%d:%d:%d]", Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf, Dia, Mes, Ano, Horas, Minutos, Segundos);
Log_Multou_Jogador(String);
printf(" - [%d/%d/%d]: (%s): %s Multou %s, Motivo: %s", Dia, Mes, Ano, Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
}
}
else
{
format(String,sizeof(String), " Esse jogador nгo tem 'licenзas/carteira' de %s .", InfV);
SendClientMessage(playerid, VERMELHO_BEM_CLARO , String);
}
}
else if(strcmp(Desc,"TSC",true) == 0) // TSC
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_AEREA_P] != 0
|| BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_NAUTICA_P] != 0
|| MotoLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_MOTOS_P] != 0
|| CarroLIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_CARROS_P] != 0
|| Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)) && INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] != 0)
{
if(Ultimo_Veiculo[ID_2PESSOA] == AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Aйrea";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Nautica";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Motocicletas";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Automуveis";
}
else if(Ultimo_Veiculo[ID_2PESSOA] == Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
InfV = "Veнculos de grande porte";
}
Inf = "Trafegando sem Capacete";
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------ [MULTADO] ------------------------------------------------------------ |");
PlayerPlaySound(ID_2PESSOA, 1132, 0, 0, 0);
GameTextForPlayer(ID_2PESSOA, "~r~~h~MULTADO", 3000, 3);
INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] += 7;
INFO_P[ID_2PESSOA][MULTA_TSC_P] += 1;
format(String,sizeof(String), " - %s Multou %s no valor de R$200, Infraзгo: %s", Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
Log_Chat_Profissoes(INFO_P[playerid][PROFISSAO_P], ROXO_BEM_CLARO, String);
format(String,sizeof(String), " - Infraзгo: {ED4848}%s {FFFFFF}- Funcionario: {61FF90}%s", Inf, Nome_Conta(playerid));
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
format(String,sizeof(String), " - Valor da multa: {7DDE86}R$200 {FFFFFF}- Pontos: {FFA500}%d/20", INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P]);
SendClientMessage(ID_2PESSOA, 0xFFFFFFFF , String);
SendClientMessage(ID_2PESSOA, -1, " - Foram acrescentado 7 Pontos em sua carteira.");
SendClientMessage(ID_2PESSOA, -1, " - Se os seus pontos passarem de 20, vocк perde a carteira de habilitaзгo.");
SendClientMessage(ID_2PESSOA, -1, " - Em um Detran vocк pode pagar as multas e limpar seus pontos.");
if(INFO_P[ID_2PESSOA][PONTOS_CARTEIRA_P] > 20)
{
if(AeronavesLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Aйrea por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_AEREA_P] = 0;
}
else if(BarcosLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa Nautica por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_NAUTICA_P] = 0;
}
else if(MotoLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Motocicletas por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_MOTOS_P] = 0;
}
else if(CarroLIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de Automуveis por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_CARROS_P] = 0;
}
else if(Veiculos_Grande_Porte_LIC(GetPlayerVehicleID(ID_2PESSOA)))
{
SendClientMessage(ID_2PESSOA, 0xE23737FF, " - Vocк perdeu sua licenзa de veнculos de grande porte por seus pontos terem passado de +20/20.");
INFO_P[ID_2PESSOA][LIC_V_GRANDE_PORTE_P] = 0;
}
Salvar_Contas(ID_2PESSOA);
SendClientMessage(ID_2PESSOA, 0xD2D2D2FF, "| ------------------------------------------------------------------------------------------------------------------------------------- |");
format(String,sizeof(String),"(%s): %s Multou %s, Motivo: %s | Data: [%d/%d/%d] Horбrio: [%d:%d:%d]", Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf, Dia, Mes, Ano, Horas, Minutos, Segundos);
Log_Multou_Jogador(String);
printf(" - [%d/%d/%d]: (%s): %s Multou %s, Motivo: %s", Dia, Mes, Ano, Nome_Profissao(playerid), Nome_Conta(playerid), Nome_Conta(ID_2PESSOA), Inf);
}
}
else
{
format(String,sizeof(String), " Esse jogador nгo tem 'licenзas/carteira' de %s .", InfV);
SendClientMessage(playerid, VERMELHO_BEM_CLARO , String);
}
}
else
{
SendClientMessage(playerid,ROXO_BEM_CLARO,"---- Descriзхes de Multas. ----"),
SendClientMessage(playerid,COR_CINZA,"USE: TNC, DP, EI, CM, DB, FD, EDV, DSH, TSC .");
}
}
return true;
}
A identificaзгo de cada modelo de vйiculo... sendo motos, carros etc...
Re: Os nomes dos veнculos nгo convкm. -
O primeiro problema que percebi e que vocк armazenou se o veiculo e ou nгo o especificado entгo esta sempre retornando o valor zero ou um tenta dessa forma embaixo
Re: Os nomes dos veнculos nгo convкm. -
, etc sгo booleanas e, por isso, nгo devem ter seus valores de retorno comparados a IDs de veнculos
Bem, como o que interessa й apenas o ID do ъltimo veнculo, entгo isto bastaria no
Para o cуdigo que definiria o tipo do ъltimo veнculo, deveria ser feito isto no lugar do cуdigo que vocк postou:
Se a ideia й que o jogador possa ser multado sem estar em nenhum veнculo no momento da multa, entгo nгo se deve aplicar a funзгo
. Em vez do cуdigo acima, deveria ser usado sempre:
De modo que, pelo acesso а variбvel, sempre o ID do ъltimo veнculo do jogador fosse obtido.
Re: Os nomes dos veнculos nгo convкm. -
Obrigado aos dois.... o erro era o que vocкs tinha dito... agradecido!