public OnPlayerConnect(playerid) { MEGAString[0]=EOS; MEGAString2[0]=EOS; MEGAString3[0]=EOS; new nome[MAX_PLAYER_NAME]; GetPlayerName(playerid, nome, sizeof(nome)); if(strfind(nome , "(" , true) != -1 || strfind( nome , ")" , true ) != -1 || strfind( nome , "[" , true ) != -1 || strfind( nome , "]" , true ) != -1 || strfind( nome , "{" , true ) != -1 || strfind( nome , "}" , true ) != -1 || strfind( nome , "$" , true ) != -1 || strfind( nome , "=" , true ) != -1 || strfind( nome , "@" , true) != -1 || strfind( nome , "#" , true ) != -1 || strfind( nome , "." , true ) != -1 || strfind( nome , "," , true ) != -1 || strfind( nome , ":" , true ) != -1) { SendClientMessage(playerid, TEAM_GROVE_COLOR, "==========================================NOME INCORRETO=========================================="); SendClientMessage(playerid, COLOR_YELLOW, "Me desculpe mais seu nick deverб conter apenas um '_' Underline e nгo poderб conter simbolos."); SendClientMessage(playerid, COLOR_YELLOW, "Seu nick deverб ser em formato de Nome_Sobrenome, relogue e volte novamente com Nome_Sobrenome"); SendClientMessage(playerid, COLOR_YELLOW, "caso voltar com os mesmos carбcteres poderб ser kickado novamente."); SendClientMessage(playerid, TEAM_BALLAS_COLOR, "Exemplos de Simbolos Incorretos: (), [], #, $, Ponto, Virgula, @, :, {}, =."); SendClientMessage(playerid, TEAM_BALLAS_COLOR, "Exemplos de Nicks Corretos: Real_Live, Joгo_Maria, Palhaco_Loko."); SendClientMessage(playerid, TEAM_BALLAS_COLOR, "Exemplos de Nicks Incorretos: {BRL}zFall, [Joao]Santos, M@guila=."); TextDrawShowForPlayer(playerid, TextKick); Kick(playerid); return 1; } if(strfind(nome, "con", true) != -1 || strfind(nome, "com", true) != -1 || strfind(nome, "ipt", true) != -1 || strfind(nome, "bat", true) != -1 || strfind(nome, "taws", true) != -1 || strfind(nome, "Clock$", true) != -1 || strfind(nome, "stust", true) != -1 || strfind(nome, "sup", true) != -1 || strfind(nome, "sup", true) != -1|| strfind(nome, "exe.", true) != -1 || strfind(nome, "nul", true) != -1|| strfind(nome, "aux", true) != -1 || strfind(nome, "nbstat", true) != -1 || strfind(nome, "prn", true) != -1) { SetPlayerName(playerid, "Sistema_de_Protecao"); SendClientMessage(playerid, 0xFF0000AA, "[Fly-Protector]{FFA500} Vocк foi banido por tentativa de congelamento do servidor."); BanEx(playerid,"Proteзгo Contra nome proibidos."); return 1; } if(strlen(nome) < 5 || strlen(nome) > 23 || NomeValidoEx(nome)) { SendClientMessage(playerid, COLOR_GRAD2, "Nick Invalido! Use EX: Nome_SobreNome"); SendClientMessage(playerid, COLOR_GRAD2, "Ele deve possuir entre 5 atй 24 caracteres."); TextDrawShowForPlayer(playerid, TextKick); Kick(playerid); return 1; } for(new p=0;p<26;p++) ItemSlotA[playerid][p] = -1; PlayerLogado[playerid] = 1; PlayeLogado[playerid] = 0; EscolhaV[playerid] = 0; TextDrawShowForPlayer(playerid, Carregamendo1); TextDrawShowForPlayer(playerid, Carregamendo2); TextDrawShowForPlayer(playerid, Carregamendo3); TextDrawShowForPlayer(playerid, Carregamendo4); TextDrawShowForPlayer(playerid, Carregamendo5); TextDrawShowForPlayer(playerid, Carregamendo6); TextDrawShowForPlayer(playerid, textTelaLogin); //RODAPE TextDrawShowForPlayer(playerid, TexDrawRodapeA); TextDrawShowForPlayer(playerid, TexDrawRodapeB); TextDrawShowForPlayer(playerid, TexDrawRodapeC); TextDrawShowForPlayer(playerid, TexDrawRodapeD); TextDrawShowForPlayer(playerid, TexDrawRodapeE); TextDrawShowForPlayer(playerid, TexDrawRodapeF); TextDrawShowForPlayer(playerid, TexDrawRodape1); TextDrawShowForPlayer(playerid, TexDrawRodape2); TextDrawShowForPlayer(playerid, TexDrawRodape3); PlayAudioStreamForPlayer(playerid, "https://dl.dropboxusercontent.com/s/cdmi1ciky87scwq/magic.mp3"); for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++) { if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i); PosicionarObjetos(playerid, i, 0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); }
aparentemente esta ok, mande OnPlayerUpdate, e algum timer com mesmo fim!
|
//================================================================================================================ return 0; } public OnPlayerUpdate(playerid) { switch(GetPlayerWeapon(playerid)) { case 44, 45: { new keys, ud, lr; GetPlayerKeys(playerid, keys, ud, lr); if((keys & KEY_FIRE))return 0; } } if(PlayerInfo[playerid][pRadio] && PlayerInfo[playerid][pComRadio]) { SetPlayerArmedWeapon(playerid, 0); } //Tempo AFK TempoAFK[playerid] = gettime(); //Anti CarSmasher if(IsPlayerInAnyVehicle(playerid)) { if(GetPlayerVehicleID(playerid) != LastVeh[playerid]){ if(GetTickCount() < GetPVarInt(playerid, "timeLastVeh")){ CallLocalFunction("PlayerCheater","id", playerid, Car_Smasher); } SetPVarInt(playerid, "timeLastVeh", GetTickCount()+1200); LastVeh[playerid] = GetPlayerVehicleID(playerid); } }