pawn Код:
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, Faixa0[playerid]);
TextDrawShowForPlayer(playerid, Faixa1[playerid]);
if(strfind(Nome(playerid),"clock$",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"prn",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"Carl",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"con",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"SgtPepper",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"Pepe",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"nul",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"Pepno",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"Pepsi",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"Rocky",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"Carl",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"Vino_Toro",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"Zoquete",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"AquilesBrinco",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"Azucar",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"Manfrey",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"Papirola",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"[ViP]Labrik",true) != -1)Ban(playerid);
if(strfind(Nome(playerid),"Sony",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"Pacman",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"Batman",true) != -1)Ban(playerid);
if(strfind(Nome(playerid),"aux",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"com1",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"com2",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"com3",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"com4",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"com5",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"com6",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"com7",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"com8",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"com9",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"lpt1",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"lpt2",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"lpt3",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"lpt4",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"lpt5",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"lpt6",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"lpt8",true) != -1) Ban(playerid);
if(strfind(Nome(playerid),"lpt9",true) != -1) Ban(playerid);
Pergunta[playerid] = "Nenhuma";
SetTimerEx("TocarSom", 1000, false, "i", playerid);
PlayersOnline++;
PlayerDados[playerid][Logado] = false;
PlayerDados[playerid][Admin] = 0;
PlayerDados[playerid][Helper] = false;
PlayerDados[playerid][Vip] = false;
PlayerDados[playerid][Sexo] = 0;
Pagamento[playerid] = 0;
NoFuel[playerid] = 0;
PlayerDados[playerid][Organizacao] = 0;
InviteOffer[playerid] = 999;
TextShow[playerid] = false;
PlayerDados[playerid][Emprego] = 0;
pBarreira[playerid] = 0;
pBarreira2[playerid] = 0;
pBarreira3[playerid] = 0;
pBarreira4[playerid] = 0;
pBarreira5[playerid] = 0;
Amarradoo[playerid] = 0;
ArmadeChoque[playerid] = 0; BaterCartao[playerid] = 0; JogadorImo[playerid] = 0; JogadorImoTempo[playerid] = 0;
pBancoDasOrgs[playerid] = 0; Algemado[playerid] = 0;
PlayerDados[playerid][Cargo] = 0;
PlayerDados[playerid][Respeito] = 0;
SetPlayerSkin(playerid,PlayerDados[playerid][pSkin]);
SetPlayerWantedLevel(playerid, PlayerDados[playerid][Procurado]);
SetPlayerScore(playerid, PlayerDados[playerid][pLevel]);
PlayerDados[playerid][pSkin] = GetPlayerSkin(playerid);
VariosEmpregos[playerid] = 0;
PlayerDados[playerid][Tutorial] = false;
new strConta[80];
new Ip[25];
for(new t = 0; t < 100; ++t)
{
SendClientMessage(playerid, -1, " ");
}
format(strConta, sizeof(strConta), "EuroRPG/Banidos/Contas/%s.txt", Nome(playerid));
if(DOF2_FileExists(strConta))
{
format(String, sizeof(String), "{FFFFFF}Vocк estб banido deste servidor!\n\n Dados do Banimento:\n\n{45F75A}Admin: {FFFFFF}%s \n{45F75A}Motivo: {FFFFFF}%s", DOF2_GetString(strConta, "Admin"), DOF2_GetString(strConta, "Motivo"));
format(String, sizeof(String), "%s\n{45F75A}Data: {FFFFFF}%d/%d/%d \n{45F75A}Hora: {FFFFFF}%d:%d", String, DOF2_GetInt(strConta, "Dia"), DOF2_GetInt(strConta, "Mes"), DOF2_GetInt(strConta, "Ano"), DOF2_GetInt(strConta, "Hora"), DOF2_GetInt(strConta, "Minuto"));
ShowPlayerDialog(playerid, DIALOG_BANIDO, DIALOG_STYLE_MSGBOX, "Banido!", String, "Fechar", "");
return 1;
}
GetPlayerIp(playerid, Ip, 25);
if(strcmp(Ip ,"255.255.255.255", true) == 0)
{
Ban(playerid);
}
if(DOF2_IsSet("EuroRPG/Banidos/Ips.txt", Ip))
{
format(String, sizeof(String), "{FFFFFF} Seu IP estб banido deste Servidor!\n\nDados:\nIP:%s\n%s", Ip, DOF2_GetString("EuroRPG/Banidos/Ips.txt", Ip));
ShowPlayerDialog(playerid, DIALOG_BANIDO, DIALOG_STYLE_MSGBOX, "Banido!", String, "Fechar", "");
return 1;
}
if(DOF2_IsSet("EuroRPG/Fodidos.txt", Ip))
{
SetTimerEx("FoderSpawn", 1000, false, "i", playerid);
return 1;
}
format(String, sizeof(String), "{00FFFF}%s {FFFFFF}Conectou ao servidor", Nome(playerid));
SendClientMessageToAll(VERDE_CLARO, String);
format(StringContas, sizeof(StringContas), "EuroRPG/Contas/%s.txt", Nome(playerid));
#if (USAR_TEXT == 1) && (USAR_SISTEMA_REGISTRO == 1)
TextFundo(playerid);
#endif
#if USAR_SISTEMA_REGISTRO == 1
if(!DOF2_FileExists(StringContas))
{
SetPlayerCameraPos(playerid,1460.0, -1324.0, 287.2);
SetPlayerCameraLookAt(playerid,1374.5, -1291.1, 239.0);
Camera[playerid] = 1;
CameraX[playerid] = 1460.0;
CameraY[playerid] = -1324.0;
CameraZ[playerid] = 287.2;
format(String, sizeof(String), "{FFFFFF}Conta: {FF0000}%s\n{FFFFFF}Nгo {FF0000}Registrada.\n\n{FFFFFF}Digite uma senha para se {FF0000}Registrar\n{FFFFFF}Em nosso Banco de Dados.", Nome(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "{1EB2FC}Registrando...", String, "Registrar", "Sair");
return 1;
}
else
{
#if AUTO_LOGIN == true
new ip[25];
GetPlayerIp(playerid, ip, sizeof ip);
if(strcmp(ip, DOF2_GetString(StringContas, "IP"), true) == 0) {
PlayerDados[playerid][Matou] = DOF2_GetInt(StringContas, "Matou");
PlayerDados[playerid][Morreu] = DOF2_GetInt(StringContas, "Morreu");
PlayerDados[playerid][Sexo] = DOF2_GetInt(StringContas, "Sexo");
PlayerDados[playerid][Organizacao] = DOF2_GetInt(StringContas, "Organizacao");
PlayerDados[playerid][Emprego] = DOF2_GetInt(StringContas, "Emprego");
PlayerDados[playerid][Cargo] = DOF2_GetInt(StringContas, "Cargo");
new str[50];
format(str, 50, "EuroRPG/Admins/%s.sav", Nome(playerid));
if(DOF2_FileExists(str)) {
if(DOF2_IsSet(str, "Admin")) {
PlayerDados[playerid][Admin] = DOF2_GetInt(str, "Admin");
}
if(DOF2_IsSet(str, "Helper")) {
PlayerDados[playerid][Helper] = DOF2_GetBool(str, "Helper");
}
if(DOF2_IsSet(str, "Vip")) {
PlayerDados[playerid][Vip] = DOF2_GetBool(str, "Vip");
}
}
PlayerDados[playerid][Advertencias] = DOF2_GetInt(StringContas, "Advertencias");
PlayerDados[playerid][Respeito] = DOF2_GetInt(StringContas, "Respeito");
GivePlayerMoney(playerid, DOF2_GetInt(StringContas, "Grana"));
GetPlayerSkin(playerid, DOF2_GetInt(StringContas, "pSkin"));
SetPlayerWantedLevel(playerid, DOF2_GetInt(StringContas, "Procurado"));
SetPlayerScore(playerid, DOF2_GetInt(StringContas, "pLevel"));
PlayerDados[playerid][Preso] = DOF2_GetInt(StringContas, "Preso");
PlayerDados[playerid][Motorista] = DOF2_GetInt(StringContas, "Motorista");
SendClientMessage(playerid, VERDE_CLARO, "Vocк foi logado altomaticamente atravйs de seu IP.");
#if USAR_TEXT == 1
TextDrawDestroy(Inicio[playerid]);
#endif
if(PlayerDados[playerid][Admin] > 0)
{
format(String, sizeof(String), "Logado de Admin Nнvel {FF0000}%d", PlayerDados[playerid][Admin]);
SendClientMessage(playerid, AZUL_CLARO, String);
format(String, sizeof(String), "~w~Admin ~g~%s ~y~Online", Nome(playerid));
GameTextForAll(String, 1000, 1);
PlayerDados[playerid][Trabalhando] = true;
SendClientMessage(playerid, AZUL_CLARO, "Vocк estб trabalhando, para jogar use /jogar");
SetPlayerSkin(playerid, 211);
SetPlayerColor(playerid, COR_ROSA);
SetPlayerHealth(playerid, 999999);
}
return 1;
}
#endif
SetPlayerCameraPos(playerid,1460.0, -1324.0, 287.2);
SetPlayerCameraLookAt(playerid,1374.5, -1291.1, 239.0);
Camera[playerid] = 1;
CameraX[playerid] = 1460.0;
CameraY[playerid] = -1324.0;
CameraZ[playerid] = 287.2;
format(String, sizeof(String), "{FFFFFF}Conta: {FF0000}%s\n{FFFFFF}Conta {FF0000}Registrada.\n\n{FFFFFF}Digite sua senha para {FF0000}Logar", Nome(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FC14E9}Logando...", String, "Logar", "Sair");
return 1;
}
#else
return 1;
#endif
}