[Ajuda] Bug no hospital
#1

tipo Galera os mlk entra no server e ja aparece no hospital aguel me ajuda Pv.
Reply
#2

Cola aqui sua public OnPlayerConnect ou OnPlayerLogin na moral.
Reply
#3

Sem o code acho quase impossivel saber
Reply
#4

posta a linha dos spawns XD talvez eu ajude ^^
Reply
#5

pawn Code:
public OnPlayerConnect(playerid)
{
    new connecting_ip[32+1];
    GetPlayerIp(playerid,connecting_ip,32);
    new num_players_on_ip = GetNumberOfPlayersOnThisIP(connecting_ip);
    if(num_players_on_ip > MAX_CONNECTIONS_FROM_IP)
    {
        printf("MAXIPs: Connecting player(%d) exceeded %d IP connections from %s.", playerid, MAX_CONNECTIONS_FROM_IP, connecting_ip);
        SendClientMessageToAll(0xFF0000AA, "[AVISO]{FFFFFF} Bots tentaram atacar o servidor e tomaram {FF0000}BAN{FFFFFF}! Ass: {FF0000}Infinity City{FFFFFF}.");
        Ban(playerid);
        return 1;
    }
    SetPlayerColor(playerid,COLOR_GREY);
    //gPlayerLogged[playerid] = 0;
    new banfile[256]; banfile = GetBannedFile(playerid);
    new IP[24];
    GetPlayerIp(playerid,IP,sizeof(IP));
    SetPlayerTeam(playerid, 1);

    if(!strcmp(IP, "255.255.255.255"))
        Ban(playerid);

    new string[300];
    format(string,128,"(CONECTED) %s conectou no servidor! (ID %d - IP %s)!", ReturnPlayer(playerid), playerid, IP);
    WriteLog("connections", string);
    if(strcmp(ReturnPlayer(playerid),"Sombra",true)==0)
        goto Join;
    if(strcmp(ReturnPlayer(playerid),"Sombra",true)==0)
        goto Join;
    if(DOF2_FileExists(banfile))
    {
        new nome[52], admin[52], motivo[52], data[52], tempban[128];
        format(nome,52,"%s", DOF2_GetString(banfile,"PlayerName"));
        format(admin,52,"%s", DOF2_GetString(banfile,"AdminName"));
        format(motivo,52,"%s", DOF2_GetString(banfile,"Motivo"));
        format(data,52,"%s", DOF2_GetString(banfile,"Data"));

        new tick = DOF2_GetInt(banfile,"BanTime");
        if(tick > 0)
        {
            if(tick > GetTickCount())
                format(tempban,128,"|| Ban temporбrio - acaba em %s!", Convert(tick-GetTickCount()));

            else
            {
                SendClientMessage(playerid, COLOR_RED,"(ADMIN BOT) Seu ban temporбrio acabou!");
                new accfile[128];
                format(accfile,128,"/RPG/bans/%s.ini", DOF2_GetString(banfile,"PlayerName"));
                DOF2_RemoveFile(accfile);
                format(accfile,128,"/RPG/users/%s.ini", DOF2_GetString(banfile,"PlayerName"));
                DOF2_SetInt(accfile, "Banned", 0);
                DOF2_RemoveFile(banfile);
                goto Join;
            }
        }

        SendClientMessage(playerid, COLOR_BLUE,"===============================================================");
        format(string,128,"Seu IP '%s' foi banido com o nick %s pelo %s %s em '%s'!", IP, nome, AccountName(playerid), admin, data);
        SendClientMessage(playerid, COLOR_WHITE, string);
        format(string,128,"(Motivo): '%s' %s!", motivo, tempban);
        SendClientMessage(playerid, COLOR_WHITE, string);
        SendClientMessage(playerid, COLOR_ORANGE,"Visite a pбgina '...', leia as regras e crie seu tуpico com esta imagem (F8 para capturб-la)!");
        SendClientMessage(playerid, COLOR_BLUE,"===============================================================");

        return Kick(playerid);
    }
    Join:
    for(new i = 0; pInfo:i < pInfo; pInfo:i++)
        Player[playerid][pInfo:i] = 0;

    if(playerid >= HighestID+1)
        HighestID = playerid;

    if(Online > Recorde)
    {
        if(!DOF2_FileExists(RECORD_FILE))
            DOF2_CreateFile(RECORD_FILE);

        format(string,128,"(RECORDE) O recorde de usuбrios foi batido, novo recorde: %d!", HighestID);
        SendClientMessageToAll(COLOR_YELLOW, string);

        new hour, minute, second, day, month, year;
        gettime(hour, minute, second);
        getdate(year, month, day);


        format(Record,2,"(Recorde): %d  -  %02d/%02d аs %02d:%02d!", HighestID , day, month, hour, minute);
        DOF2_SetString(RECORD_FILE, "Recorde", Record);
        Recorde = Online+1;
        DOF2_SetInt(RECORD_FILE,"Nъmero",Recorde);
    }

    Player[playerid][FirstSpawn] = true;

    new xString[128], xNome[MAX_PLAYER_NAME], rIP[20];
    GetPlayerIp(playerid, rIP, sizeof(rIP));
    GetPlayerName(playerid, xNome, MAX_PLAYER_NAME);
    format(xString, sizeof(xString), "[INFO] %s(ID:%d) acabou de entrar. (IP: %s)", xNome, playerid, IP);
    SendAdminMessage(COLOR_GREY, xString);
    SendClientMessage(playerid, 0x00FFFFAA,"==========================================");
    format(xString, sizeof(xString), " Sejб bem vindo, %s, ao Infinity City RPG. ", xNome);
    SendClientMessage(playerid, -1, xString);
    SendClientMessage(playerid, -1, "- Para mais informaзхes, use: '/ajuda'");
    SendClientMessage(playerid, 0x00FFFFAA,"==========================================");
    if(IsPlayerNPC(playerid))
    {
        SpawnPlayer(playerid);
    }

    SetTimerEx("MovePlayer",1000,false,"i",playerid);
    ResetPlayerMoney(playerid);


    if(strfind(ReturnPlayer(playerid), "_", true) == -1)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "[Imigracгo Infinity City RPG] Seu nome nгo foi aceito em nosso servidor. Seu nick deve estar no formato: Nome_Sobrenome.");
        Kick(playerid);
        return 1;
    }
    escondendo[playerid] = 0;
    multa[playerid] = 0;
    if(Player[playerid][pPhousekey] != 255)
        Incasa[playerid] = Player[playerid][pPhousekey];
    else
        Incasa[playerid] = Player[playerid][pPaluguelkey];

    Player[playerid][gSpectateID] = INVALID_PLAYER_ID;
    Player[playerid][TransferID] = INVALID_PLAYER_ID;
    Player[playerid][pConce] = INVALID_VEHICLE_ID;
    Player[playerid][pConce2] = INVALID_VEHICLE_ID;
    Player[playerid][pConce3] = INVALID_VEHICLE_ID;
    Player[playerid][pConce4] = INVALID_VEHICLE_ID;
    Player[playerid][pConce5] = INVALID_VEHICLE_ID;
    CCasa[playerid] = false;
    RemixTempo[playerid] = false;
    RemixTempo2[playerid] = false;
    RemixTempo3[playerid] = false;
    ComprouGas[playerid] = false;
    RemixSombra[playerid] = false;
    Pixando[playerid] = false;
    Player[playerid][Spawned] = false;
    SendoProcurado[playerid] = false;
    Procurando[playerid] = false;
    glitchfez[playerid] = false;
    nobangu[playerid] = false;
    noteste[playerid] = false;
    noevento[playerid] = false;
    dbfez[playerid] = false;
    dbsofreu[playerid] = false;
    DarNota[playerid] = false;
    InGZ[playerid] = 0;
    Player[playerid][CMD] = 0;
    PlayerOnMission[playerid] = 0;
    GPSPos[playerid] = 0;
    RouboPos[playerid] = 0;
    votou[playerid] = false;
    Conce[playerid] = 0;
    rRemixTemp[playerid] = gettime() - 120;
    FicarRoco[playerid] = false;
    Player[playerid][pCash] = 0;
    nowh[playerid] = 0;
    InModShop[playerid] = false;
    pegar1[playerid] = 0;
    venderv[playerid] = 0;

    SetPlayerTeam(playerid, playerid*2);
    SetPlayerMapIcon(playerid, 1, 2424.3491,-1922.7054,13.5469,17,0); // 24-7 lowrider
    SetPlayerMapIcon(playerid, 2, 1352.3300,-1755.7100,13.3530,17,0); // 24-7 DP
    SetPlayerMapIcon(playerid, 3, 1315.4900,-900.8430,39.5781,17,0); // 24-7 Banco
    SetPlayerMapIcon(playerid, 4, 2501.8171,-1495.0284,24.0000,17,0); // 24-7 CV
    SetPlayerMapIcon(playerid, 5, 374.5654,-2055.4023,8.0156,17,0); // 24-7 Pier
    SetPlayerMapIcon(playerid, 6, 952.5583,-909.3518,45.7656,36,0);//autoescola
    SetPlayerMapIcon(playerid, 7, 1750.9022,-2054.1663,14.1010,51,0);//caminhao
    SetPlayerMapIcon(playerid, 8, 1933.4171,-1864.4463,13.5619,6,0);//Lojas de armas
    SetPlayerMapIcon(playerid, 9, 1117.4230,-2037.0621,78.7500, 56, 0 );//pref
    SetPlayerMapIcon(playerid, 10, 2029.9769,-1406.1050,17.2170,22,0);//Hospital
    SetPlayerMapIcon(playerid, 11, 1561.4166,-1665.8405,28.3956,30,0);//DP
    SetPlayerMapIcon(playerid, 12, 1450.629882,-1095.147338,17.687129,22,0);//Farmбcia
    SetPlayerMapIcon(playerid, 13, 2247.4268,-1458.0986,24.0171,58,0);// aztecas
    SetPlayerMapIcon(playerid, 14, 2245.7581,-1660.3862,15.2865,45,0);// Lojas D.s
    SetPlayerMapIcon(playerid, 15, 1462.3883,-1010.1879,26.8438,52,0);//Banco
    SetPlayerMapIcon(playerid, 16, 375.3680,-2087.7510,7.8359,9,0);//pesca
    SetPlayerMapIcon(playerid, 17, 1631.9384,-1170.1406,24.0781,25,0);//Loteria
    SetPlayerMapIcon(playerid, 18, 1257.6265,-785.2055,92.0302,43,0); // Yakuza
    SetPlayerMapIcon(playerid, 18, 1257.6265,-785.2055,92.0302,44,0); // Russa
    SetPlayerMapIcon(playerid, 19, 1229.1362,-1257.3083,13.8538,55,0);//conce
    SetPlayerMapIcon(playerid, 20, 338.8566,-1809.3798,4.5179,27,0);//mecanica
    SetPlayerMapIcon(playerid, 23, 641.2360,-1355.3855,13.3958,35,0); // anuncio
    SetPlayerMapIcon(playerid, 24, 2648.7905,-2018.9167,69.0208, 27, 0); // transfender
    SetPlayerMapIcon(playerid, 25, 1040.1967,-1039.0023,69.0938, 27, 0); // transfender
    SetPlayerMapIcon(playerid, 26, -2707.3838,220.8588,42.8703, 27, 0); // transfender
    SetPlayerMapIcon(playerid, 27, 1426.0469,-967.5060,37.4308,48,0);//Alhambra
    SetPlayerMapIcon(playerid, 28, 1022.4554,-1121.7389,23.8718,48,0);//Boate Pimp
    SetPlayerMapIcon(playerid, 29, 1310.0320,-1367.6229,13.5382,23,0);// paintball
    SetPlayerMapIcon(playerid, 30, 1830.4603,-1768.1846,13.5469,24,0);// paintball
    SetPlayerMapIcon(playerid, 31, 1280.9172,-1340.4066,13.3751,42,0);// taxi
    SetPlayerMapIcon(playerid, 32, 1771.9641,-1855.4810,13.4141,42,0);// taxi
    SetPlayerMapIcon(playerid, 33, 2807.9265,-1189.6147,25.3489,60,0);// Vagos
    SetPlayerMapIcon(playerid, 34, 2491.0566,-1669.9467,13.3359,62,0);// Grove
    SetPlayerMapIcon(playerid, 35, 991.1287,-1342.6512,13.3828,27,0);// Oficina
    SetPlayerMapIcon(playerid, 36, 2071.2786,-2045.2224,13.8562,20,0);// Bombeiro

    GangZoneShowForPlayer(playerid, GZesc1, COLOR_ORANGE);
    GangZoneShowForPlayer(playerid, GZesc2, COLOR_ORANGE);
    GangZoneShowForPlayer(playerid, GZesc3, COLOR_ORANGE);
    GangZoneShowForPlayer(playerid, GZesc4, COLOR_ORANGE);
    GangZoneShowForPlayer(playerid, GZesc5, COLOR_ORANGE);
    GangZoneShowForPlayer(playerid, GZPesca, 0xFFFFFF88);

    //mexer
    for(new i = 0; i < sizeof(TurfsCoords); i ++)
        GangZoneShowForPlayer(playerid, Turfs[i], OrgsColors[gZonesData[i][ZoneOwner]]);

    if(Player[playerid][pMember] == 4)
        for(new j=0; j<50; j++)
            if(fogo[j] > 0)
                SetPlayerMapIcon(playerid, j+33, fogoposX[j],fogoposY[j],fogoposZ[j],20,2,MAPICON_GLOBAL);

    TruckMission[playerid] = 0; AviaoMission[playerid] = 0; FuneMission[playerid] = 0; BusMission[playerid] = 0; GasMission[playerid] = 0; PaperMission[playerid] = 0; LixoMission[playerid] = 0;
    HidePM[playerid] = 0; PhoneOnline[playerid] = 0;
    AdvOffer[playerid] = 999; AdvPrice[playerid] = 0; SorvetePrice[playerid] = 0;
    CallLawyer[playerid] = 0; WantLawyer[playerid] = 0;
    CurrentMoney[playerid] = 0;
    CP[playerid] = 0;   CarOffer[playerid] = 999; CarPrice[playerid] = 0; CarID[playerid] = 0; CarCalls[playerid] = 0;
    MoneyMessage[playerid] = 0; Condom[playerid] = 0; Pedagio[playerid] = 0;
    STDPlayer[playerid] = 0; SexOffer[playerid] = 999; SexPrice[playerid] = 0;
    RepairOffer[playerid] = 999; RepairPrice[playerid] = 0; RepairCar[playerid] = 0;
    TalkingLive[playerid] = 255; LiveOffer[playerid] = 999; TakingLesson[playerid] = 0;
    RefillOffer[playerid] = 999; RefillPrice[playerid] = 0;
    DrugOffer[playerid] = 999; PlayerCuffed[playerid] = 0; PlayerCuffedTime[playerid] = 0;
    Invite[playerid] = 0; InviteJob[playerid] = 0;
    DrugPrice[playerid] = 0; OnCK[playerid] = 999; GettingCK[playerid] = 999;
    DrugGram[playerid] = 0; ConnectedToLaptop[playerid] = false; ConnectedToNoteBook[playerid] = false;
    JailPrice[playerid] = 0; MedicTime[playerid] = 0; NeedMedicTime[playerid] = 0;
    WantedPoints[playerid] = 0; OnDuty[playerid] = 0; BoxWaitTime[playerid] = 0;
    SafeTime[playerid] = 60; TaxistaIn[playerid] = false; PlayerTied[playerid] = 0;
    TempoPedido[playerid] = 0; JobDuty[playerid] = 0;
    Mobile[playerid] = 255; Music[playerid] = 0; BoxOffer[playerid] = 999; PlayerBoxing[playerid] = 0;
    Spectate[playerid] = 255; PlayerDrunk[playerid] = 0; PlayerDrunkTime[playerid] = 0;
    Unspec[playerid][sLocal] = 255; FishCount[playerid] = 0;
    WritingPaper[playerid] = 0; WritingPaperNumber[playerid] = 999; WritingLine[playerid] = 0; BringingPaper[playerid] = 0; GotPaper[playerid] = 0;
    PaperOffer[playerid] = 999; ConsumingMoney[playerid] = 0; SorveteOffer[playerid] = 999;
    gLastCar[playerid] = 0; laser[playerid] = 0; SafeBan[playerid] = 0;
    gNews[playerid] = 0; BigEar[playerid] = 0; BigCW[playerid] = 0; BigSms[playerid] = 0; BigMp[playerid] = 0; gDice[playerid] = 0; gFam[playerid] = 0;
    gPlayerLogged[playerid] = 0; gPlayerLogTries[playerid] = 0; gPlayerAccount[playerid] = 0; PlayerKarting[playerid] = 0; PlayerInKart[playerid] = 0;
    PlayerTazeTime[playerid] = 0; PlayerStoned[playerid] = 0;
    TicketOffer[playerid] = 999; TicketMoney[playerid] = 0;
    MatsHolding[playerid] = 0;
    PedidoAceito[playerid] = 900;
    NoFuel[playerid] = 0;
    HireCar[playerid] = 299; PlayersChannel[playerid] = 999; sPizza[playerid] = 0; bPizza[playerid] = 0;
    PlayerPaintballing[playerid] = 0; PlayerPaintballKills[playerid] = 0; ChatVIP[playerid] = 0;
    ReduceTimeArmas[playerid] = 0; ReduceTime[playerid] = 0; RefinariaTime[playerid] = 0; AtentadoTime[playerid] = 0; BombTime[playerid] = 0;
    CarroBombaTime[playerid] = 0; JornalTime[playerid] = 0; SairTime[playerid] = 0; PuxarTime[playerid] = 0;
    Fishes[playerid][pLastFish] = 0; Fishes[playerid][pFishID] = 0; CuraAcc[playerid] = 999;
    ProposeOffer[playerid] = 999; MarryWitness[playerid] = 999; MarryWitnessOffer[playerid] = 999; MarriageCeremoney[playerid] = 0; ProposedTo[playerid] = 999; GotProposedBy[playerid] = 999; DivorceOffer[playerid] = 999; BlindFold[playerid] = 0;
    Player[playerid][pLevel] = 0; AdminDuty[playerid] = 0; AdminAfk[playerid] = 0; Player[playerid][pPedagio] = 0;
    InAFoodPlace[playerid] = 0;
    Player[playerid][pAdmin] = 0;
    Player[playerid][pVIP] = 0;
    Player[playerid][pVIPTime] = 0;
    Player[playerid][gPupgrade] = 0;
    Player[playerid][pConnectTime] = 0;
    Player[playerid][pReg] = 0;
    Player[playerid][pSex] = 0;
    Player[playerid][pAge] = 0;
    Player[playerid][pOrigin] = 0;
    Player[playerid][pExp] = 0;
    Player[playerid][pBank] = 0;
    Player[playerid][pCrimes] = 0;
    Player[playerid][pDeaths] = 0;
    Player[playerid][pArrested] = 0;
    Player[playerid][pWantedDeaths] = 0;
    Player[playerid][pPhoneBook] = 0;
    Player[playerid][pPhone] = 0;
    Player[playerid][pLottoNr] = 0;
    Player[playerid][pBiggestFish] = 0;
    Player[playerid][pJob] = DESEMPREGADO;
    Player[playerid][pHeadValue] = 0;
    Player[playerid][pJailed] = 0;
    Player[playerid][pJailTime] = 0;
    Player[playerid][pJailTimetotal] = 0;
    Player[playerid][pMats] = 0;
    Player[playerid][pPlano] = 0;
    Player[playerid][pPedagio] = 0;
    Player[playerid][pDrugs] = 0;
    Player[playerid][pLuta] = 0;
    Player[playerid][pCigarro] = 0;
    Player[playerid][pPC] = 0;
    Player[playerid][pCorda] = 0;
    Player[playerid][pVotou] = 0;
    Player[playerid][pLeader] = 0;
    Player[playerid][pMember] = 0;
    Player[playerid][pFMember] = 255;
    Player[playerid][pRank] = 0;
    Player[playerid][pChar] = 23;
    Player[playerid][pContractTime] = 0;
    Player[playerid][pDetSkill] = 0;
    Player[playerid][pSexSkill] = 0;
    Player[playerid][pBoxSkill] = 0;
    Player[playerid][pLawSkill] = 0;
    Player[playerid][pMechSkill] = 0;
    Player[playerid][pJackSkill] = 0;
    Player[playerid][pCarSkill] = 0;
    Player[playerid][pNewsSkill] = 0;
    Player[playerid][pDrugsSkill] = 0;
    Player[playerid][pCookSkill] = 0;
    Player[playerid][pFishSkill] = 0;
    Player[playerid][pSHealth] = 0.0;
    Player[playerid][pHealth] = 50.0;
    Player[playerid][pInt] = 0;
    Player[playerid][pLocal] = 255;
    Player[playerid][pTeam] = 3;
    Player[playerid][pModel] = 60;
    VehicleInfo[vInfo][vLock] = 1;
    Player[playerid][pPhousekey] = 255;
    Player[playerid][pAtend] = 0;
    Player[playerid][pPaluguelkey] = 255;
    Player[playerid][pPbiskey] = 255;
    Player[playerid][pCarLic] = 0;
    Player[playerid][pFlyLic] = 0;
    Player[playerid][pBoatLic] = 0;
    Player[playerid][pFishLic] = 0;
    Player[playerid][pGunLic] = 0;
    Player[playerid][pGun1] = 0;
    Player[playerid][pGun2] = 0;
    Player[playerid][pGun3] = 0;
    Player[playerid][pGun4] = 0;
    Player[playerid][pAmmo1] = 0;
    Player[playerid][pAmmo2] = 0;
    Player[playerid][pAmmo3] = 0;
    Player[playerid][pAmmo4] = 0;
    Player[playerid][pCarTime] = 0;
    Player[playerid][pPayDayHad] = 0;
    Player[playerid][pCDPlayer] = 0;
    Player[playerid][pWins] = 0;
    Player[playerid][pLoses] = 0;
    Player[playerid][pAlcoholPerk] = 0;
    Player[playerid][pDrugPerk] = 0;
    Player[playerid][pMiserPerk] = 0;
    Player[playerid][pPainPerk] = 0;
    Player[playerid][pTraderPerk] = 0;
    Player[playerid][pTut] = 0;
    Player[playerid][pWarns] = 0;
    Player[playerid][pVirWorld] = 0;
    Player[playerid][pFuel] = 0;
    Player[playerid][pInvWeapon] = 0;
    Player[playerid][pInvAmmo] = 0;
    Player[playerid][pSpeaker] = 0;
    Player[playerid][pMaskuse] = 0;
    Player[playerid][pRequestingBackup] = 0;
    Player[playerid][pRoadblock] = -1;
    Player[playerid][pCone] = 0;
    Player[playerid][pCorrente] = 0;
    Player[playerid][pAdjustable] = 0;
    strmid(Player[playerid][pLastLogin], "0/0/0/0/0/0", 0, strlen("0/0/0/0/0/0"),255);
    ClearCrime(playerid);
    ClearFishes(playerid);
    ClearCooking(playerid);
    ClearGroceries(playerid);
    ClearMarriage(playerid);
    //GameTextForPlayer(playerid, "~w~Infinity~n~~b~City", 15000, 6);

    //Player[playerid][pName] = ReturnPlayer(playerid);
    format(Player[playerid][pName],MAX_PLAYER_NAME,ReturnPlayer(playerid));
    new str[24];
    /* rand = randomEx(1, 14);
    format(str, sizeof(str), "loadsc%d:loadsc%d", rand, rand);
    TextDrawSetString(BackGroundLogin, str);
    TextDrawShowForPlayer(playerid, BackGroundLogin);*/


    TextDrawShowForPlayer(playerid, rUserBox);
    TextDrawShowForPlayer(playerid, rUserBox2);
    TextDrawShowForPlayer(playerid, rBorda);
    TextDrawShowForPlayer(playerid, rBorda2);
    TextDrawShowForPlayer(playerid, rLogoType);
    TextDrawShowForPlayer(playerid, rWelcome);

    SetTimerEx("rCameraLogin", 100, false, "d", playerid);

    format(string, sizeof(string), "RPG/users/%s.ini", Player[playerid][pName]);
    PlaySoundForPlayer(playerid, 1183);

    SeeHUD[playerid] = false;
    if(fexist(string))
    {
        gPlayerAccount[playerid] = 1;
        if(DOF2_GetInt(string, "DonateRank") == 1) format(str, sizeof(str), "{D78400}Bronze");
        else if(DOF2_GetInt(string, "DonateRank") == 2) format(str, sizeof(str), "{BBBAB8}Prata");
        else if(DOF2_GetInt(string, "DonateRank") == 3) format(str, sizeof(str), "{FFD700}Ouro");
        else format(str, sizeof(str), "{B91D1D}Nгo");
        format(string,sizeof(string),"{B9BCCC}Bem Vindo ao {6495ED}Infinity City {B9BCCC}Roleplay.\n\nNome: {6495ED}%s.\n{B9BCCC}Status da conta: {6495ED}Registrada.\n{B9BCCC}Vip: %s\n{B9BCCC}Avisos: {6495ED}%d\n{B9BCCC}Data de Registro: {6495ED}%s.\n{B9BCCC}Sua senha:",Player[playerid][pName], str, DOF2_GetInt(string, "Warnings"), DOF2_GetString(string, "RegisterDate"));
        ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Infinity City RolePlay - LOGIN",string,"Logar","Sair");
    }
    else
    {
        new UL = 0;
        for(new x=0; x < strlen(Player[playerid][pName]); x++)
        {
            if(Player[playerid][pName][x] == 95)
            {
                UL++;
                if(UL > 1)
                {
                    SendClientMessage(playerid, 0xFFFFFFFF, "Seu nick deve conter apenas um '_' (Underline)");
                    SetTimerEx("OnKick",500,false, "i", playerid);
                }
            }
            if((Player[playerid][pName][x] < 65 || Player[playerid][pName][x] > 90) && (Player[playerid][pName][x] < 97 || Player[playerid][pName][x] > 122) && Player[playerid][pName][x] != 95)
            {
                format(string, sizeof(string), "O caracter %c contido em seu nick nгo й permitido neste servidor.", Player[playerid][pName][x]);
                SendClientMessage(playerid, 0xFFFFFFFF, string);
                SetTimerEx("OnKick",500,false, "i", playerid);
            }
        }

        gPlayerAccount[playerid] = 0;
        format(string,sizeof(string),""ESBRANCO"Bem Vindo ao Infinity City Roleplay.\nA conta %s "AVERMELHADO"nгo estб registrada.\n"ESBRANCO"Por favor insira uma senha para registrб-la:",Player[playerid][pName]);
        ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Infinity City RolePlay - REGISTRO",string,"Registrar","Sair");
    }
    NoHospital[playerid] = 0;
    //cancelas
    Cancela[playerid][0] = CreatePlayerObject(playerid, 968, 51.4352, -1529.0492, 5.0217, 0.0000, 90.0000, 80.0000, 300.0); //pedagioLS
    Cancela[playerid][1] = CreatePlayerObject(playerid, 968, 49.4293, -1533.9283, 5.0217, 0.0000, 270.0000, 80.0000, 300.0); //pedagioLS
    Cancela[playerid][2] = CreatePlayerObject(playerid, 968, -1520.55, -825.35, 58.09, 0.0000, 270.0000, 260.2000, 300.0); //PedagioTunel
    Cancela[playerid][3] = CreatePlayerObject(playerid, 968, -1518.88, -810.69, 57.98, 0.0000, 90.0000, 266.9600, 300.0); //PedagioTunel
    Cancela[playerid][4] = CreatePlayerObject(playerid, 968, -1404.76, 799.09, 47.27, 359.0000, 270.0000, 315.0000, 300.0); //PedagioLVSF
    Cancela[playerid][5] = CreatePlayerObject(playerid, 968, -1413.75, 807.92, 47.32, 359.0000, 90.0000, 315.0000, 300.0); //PedagioLVSF
    Cancela[playerid][6] = CreatePlayerObject(playerid, 968, -1426.92, 819.59, 47.29, 0.0000, 90.0000, 316.0000, 300.0); //PedagioLVSF
    Cancela[playerid][7] = CreatePlayerObject(playerid, 968, -1417.69, 810.71, 47.17, 0.0000, 270.0000, 315.0000, 300.0); //PedagioLVSF
    Cancela[playerid][8] = CreatePlayerObject(playerid, 968, 521.62, 473.35, 18.75, 0.0000, 270.0000, 215.0000, 300.0); //Pedagio2LVLS
    Cancela[playerid][9] = CreatePlayerObject(playerid, 968, 519.83, 471.29, 18.75, 0.0000, 90.0000, 215.0000, 300.0); //Pedagio2LVLS
    Cancela[playerid][10] = CreatePlayerObject(playerid, 968, 1739.22, 556.01, 25.80, 0.0000, 270.0000, 341.0000, 300.0); //Pedagio1LVLSS
    Cancela[playerid][11] = CreatePlayerObject(playerid, 968, 1747.69, 553.23, 26.02, 0.0000, 270.0000, 341.0000, 300.0); //Pedagio1LVLSS
    Cancela[playerid][12] = CreatePlayerObject(playerid, 968, 1749.80, 552.57, 26.02, 0.0000, 90.0000, 342.0000, 300.0); //Pedagio1LVLSS
    Cancela[playerid][13] = CreatePlayerObject(playerid, 968, 1758.39, 549.75, 26.02, 0.0000, 90.0000, 342.0000, 300.0); //Pedagio1LVLSS
    Cancela[playerid][14] = CreatePlayerObject(playerid, 968, -2872.93, -952.80, 9.12, 0.0000, 90.0000, 352.0000, 300.0); //PedagioChilliad
    Cancela[playerid][15] = CreatePlayerObject(playerid, 968, -2877.73, -952.83, 9.12, 0.0000, 270.0000, 352.0000, 300.0); //PedagioChilliad
    Cancela[playerid][16] = CreatePlayerObject(playerid, 968, -2692.01, 1268.81, 55.23, 0.0000, 270.0000, 0.0000, 300.0); //PedagioSF
    Cancela[playerid][17] = CreatePlayerObject(playerid, 968, -2682.21, 1268.92, 55.23, 0.0000, 270.0000, 0.0000, 300.0); //PedagioSF
    Cancela[playerid][18] = CreatePlayerObject(playerid, 968, -2680.70, 1281.64, 55.23, 0.0000, 90.0000, 0.0000, 300.0); //PedagioSF
    Cancela[playerid][19] = CreatePlayerObject(playerid, 968, -2670.81, 1281.46, 55.23, 0.0000, 90.0000, 0.0000, 300.0); //PedagioSF
    Cancela[playerid][20] = CreatePlayerObject(playerid, 968, 87.96, -1259.35, 14.20, 0.0000, 270.0000, -55.0000, 300.0); //TunelLS
    Cancela[playerid][21] = CreatePlayerObject(playerid, 968, 103.25, -1281.01, 13.85, 3.0000, 270.0000, -55.0000, 300.0); //TunelLS
    Cancela[playerid][22] = CreatePlayerObject(playerid, 968, -157.85, 402.09, 11.79, 0.0000, 270.0000, -194.0000, 300.0); //Pedagio3LVLS
    Cancela[playerid][23] = CreatePlayerObject(playerid, 968, -159.58, 403.08, 11.81, 0.0000, 270.0000, -14.0000, 300.0); //Pedagio3LVLS
    RemoveBuildingForPlayer(playerid, 4024, 1479.8672, -1790.3984, 56.0234, 0.25);
    RemoveBuildingForPlayer(playerid, 4026, 1497.7969, -1543.7109, 17.5547, 0.25);
    RemoveBuildingForPlayer(playerid, 4044, 1481.1875, -1785.0703, 22.3828, 0.25);
    RemoveBuildingForPlayer(playerid, 4218, 1497.7031, -1546.6172, 43.9922, 0.25);
    RemoveBuildingForPlayer(playerid, 4002, 1479.8672, -1790.3984, 56.0234, 0.25);
    RemoveBuildingForPlayer(playerid, 3980, 1481.1875, -1785.0703, 22.3828, 0.25);
    RemoveBuildingForPlayer(playerid, 4003, 1481.0781, -1747.0313, 33.5234, 0.25);
    RemoveBuildingForPlayer(playerid, 4016, 1497.7969, -1543.7109, 17.5547, 0.25);
    RemoveBuildingForPlayer(playerid, 3761, 2783.7813, -2463.8203, 14.6328, 0.25);
    RemoveBuildingForPlayer(playerid, 3761, 2783.7813, -2448.4766, 14.6328, 0.25);
    RemoveBuildingForPlayer(playerid, 3761, 2791.9531, -2463.8203, 14.6328, 0.25);
    RemoveBuildingForPlayer(playerid, 3761, 2797.5156, -2448.3438, 14.6328, 0.25);
    RemoveBuildingForPlayer(playerid, 3761, 2791.9531, -2448.4766, 14.6328, 0.25);
    RemoveBuildingForPlayer(playerid, 3761, 2791.9531, -2425.3516, 14.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 3761, 2791.9531, -2410.2109, 14.6563, 0.25);
    RemoveBuildingForPlayer(playerid, 5544, 1873.7422, -1682.4766, 34.7969, 0.25);
    RemoveBuildingForPlayer(playerid, 1537, 1837.4375, -1683.9688, 12.3047, 0.25);
    RemoveBuildingForPlayer(playerid, 1533, 1837.4375, -1683.9531, 12.3047, 0.25);
    RemoveBuildingForPlayer(playerid, 1537, 1837.4375, -1686.9844, 12.3125, 0.25);
    RemoveBuildingForPlayer(playerid, 1533, 1837.4375, -1677.9219, 12.2969, 0.25);
    RemoveBuildingForPlayer(playerid, 1537, 1837.4375, -1680.9531, 12.2969, 0.25);
    RemoveBuildingForPlayer(playerid, 1533, 1837.4375, -1680.9375, 12.2969, 0.25);
    RemoveBuildingForPlayer(playerid, 5408, 1873.7422, -1682.4766, 34.7969, 0.25);
    RemoveBuildingForPlayer(playerid, 5955, 1301.1875, -1257.0625, 21.5078, 0.25);
    RemoveBuildingForPlayer(playerid, 5956, 1288.0469, -1203.7734, 17.6875, 0.25);
    RemoveBuildingForPlayer(playerid, 5957, 1278.4688, -1189.5078, 11.8984, 0.25);
    RemoveBuildingForPlayer(playerid, 5967, 1259.4375, -1246.8125, 17.1094, 0.25);
    RemoveBuildingForPlayer(playerid, 6003, 954.6875, -1305.7734, 30.1406, 0.25);
    RemoveBuildingForPlayer(playerid, 5818, 954.6875, -1305.7734, 30.1406, 0.25);
    RemoveBuildingForPlayer(playerid, 1388, 1238.3750, -1258.2813, 57.2031, 0.25);
    RemoveBuildingForPlayer(playerid, 1391, 1238.3750, -1258.2734, 44.6641, 0.25);
    RemoveBuildingForPlayer(playerid, 5857, 1259.4375, -1246.8125, 17.1094, 0.25);
    RemoveBuildingForPlayer(playerid, 5740, 1278.4688, -1189.5078, 11.8984, 0.25);
    RemoveBuildingForPlayer(playerid, 5739, 1288.0469, -1203.7734, 17.6875, 0.25);
    RemoveBuildingForPlayer(playerid, 5709, 1301.1875, -1257.0625, 21.5078, 0.25);
    RemoveBuildingForPlayer(playerid, 8240, 1586.2578, 1189.5938, 23.4453, 0.25);
    RemoveBuildingForPlayer(playerid, 8241, 1586.2578, 1189.5938, 23.4453, 0.25);
    RemoveBuildingForPlayer(playerid, 8334, 1621.7813, 1316.9922, 13.8203, 0.25);
    RemoveBuildingForPlayer(playerid, 8378, 1586.2578, 1222.7031, 19.7500, 0.25);
    RemoveBuildingForPlayer(playerid, 8379, 1586.2578, 1222.7031, 19.7500, 0.25);
    RemoveBuildingForPlayer(playerid, 8335, 1621.7813, 1316.9922, 13.8203, 0.25);
    RemoveBuildingForPlayer(playerid, 8489, 1932.7813, 1177.3984, 39.9219, 0.25);
    RemoveBuildingForPlayer(playerid, 8700, 1932.7813, 1177.3984, 39.9219, 0.25);
    RemoveBuildingForPlayer(playerid, 1527, 1448.2344, -1755.8984, 14.5234, 0.25);
    RemoveBuildingForPlayer(playerid, 1524, 1837.6641, -1640.3828, 13.7578, 0.25);
    RemoveBuildingForPlayer(playerid, 5945, 988.2734, -1289.6328, 15.3750, 0.25);      //Oficina LS
    RemoveBuildingForPlayer(playerid, 6003, 954.6875, -1305.7734, 30.1406, 0.25);      //Oficina LS
    RemoveBuildingForPlayer(playerid, 1266, 952.6406, -1293.7578, 19.2500, 0.25);      //Oficina LS
    RemoveBuildingForPlayer(playerid, 1266, 996.7109, -1295.4766, 20.2500, 0.25);      //Oficina LS
    RemoveBuildingForPlayer(playerid, 1261, 953.4922, -1232.5703, 24.1328, 0.25);      //Oficina LS
    RemoveBuildingForPlayer(playerid, 1261, 1038.5547, -1300.3984, 24.1328, 0.25);     //Oficina LS
    RemoveBuildingForPlayer(playerid, 5818, 954.6875, -1305.7734, 30.1406, 0.25);      //Oficina LS
    RemoveBuildingForPlayer(playerid, 1267, 1038.5547, -1300.3984, 24.1328, 0.25);     //Oficina LS
    RemoveBuildingForPlayer(playerid, 1260, 996.7109, -1295.4766, 20.2500, 0.25);      //Oficina LS
    RemoveBuildingForPlayer(playerid, 1260, 952.6406, -1293.7578, 19.2500, 0.25);      //Oficina LS
    RemoveBuildingForPlayer(playerid, 5784, 988.2734, -1289.6328, 15.3750, 0.25);      //Oficina LS
    RemoveBuildingForPlayer(playerid, 5820, 1010.8828, -1270.2656, 18.6250, 0.25);     //Oficina LS
    RemoveBuildingForPlayer(playerid, 1267, 953.4922, -1232.5703, 24.1328, 0.25);      //Oficina LS
    RemoveBuildingForPlayer(playerid, 5199, 1982.6406, -2038.1641, 14.7891, 0.25);       // HQ Bombeiro
    RemoveBuildingForPlayer(playerid, 5313, 2043.9922, -2016.8672, 25.0547, 0.25);       // HQ Bombeiro
    RemoveBuildingForPlayer(playerid, 5316, 2043.9922, -2016.8672, 25.0547, 0.25);       // HQ Bombeiro
    RemoveBuildingForPlayer(playerid, 5337, 1995.4375, -2066.1484, 18.5313, 0.25);       // HQ Bombeiro
    RemoveBuildingForPlayer(playerid, 1532, 1977.0547, -2035.8906, 12.5391, 0.25);       // HQ Bombeiro
    RemoveBuildingForPlayer(playerid, 5140, 1982.6406, -2038.1641, 14.7891, 0.25);       // HQ Bombeiro
    RemoveBuildingForPlayer(playerid, 1306, 2001.0234, -2024.2891, 19.7500, 0.25);       // HQ Bombeiro
    RemoveBuildingForPlayer(playerid, 5312, 2068.9609, -2013.4766, 24.1563, 0.25);       // HQ Bombeiro
    RemoveBuildingForPlayer(playerid, 17947, 2815.4063, -1188.5000, 26.6016, 0.25);      //Vagos
    RemoveBuildingForPlayer(playerid, 634, 856.3203, -1747.4297, 12.1328, 0.25);         //spawn
    RemoveBuildingForPlayer(playerid, 8229, 1142.0313, 1362.5000, 12.4844, 0.25);        // HQ afac
    return 1;
}
=======================================================================================================================
public OnPlayerLogin(playerid,password[], cleanpw[])
{
    new file[128];
    format(file, sizeof(file), "/RPG/users/%s.ini", Player[playerid][pName]);
    if(DOF2_FileExists(file))
    {
        format(Player[playerid][pKey], 128, "%s", DOF2_GetString(file, "Key"));
        if(IsStringSame(Player[playerid][pKey],password, 128))
        {
            DOF2_SetString(file,"Password", MD5_Hash(cleanpw));
            new built = DOF2_GetInt(file,"GMBuilt");
            if(built < BUILT)
            {
                Player[playerid][pVotou] = 0;
                DOF2_SetInt(file, "Votou", 0);
                Player[playerid][pRoadblock] = -1;
                if(built < 531)
                {
                    SendClientMessage(playerid, 0x00FFFFAA,"=======================================================================");
                    SendClientMessage(playerid, 0xA9A9A9AA," ");
                    SendClientMessage(playerid, COLOR_WHITE,"» Modificaзгo feita por: Sombra, Remix.");
                    SendClientMessage(playerid, COLOR_WHITE,"» Participaзгo: Sombra, Remix e Equipe Do Infinity RPG");
                    SendClientMessage(playerid, COLOR_WHITE," ");
                    SendClientMessage(playerid, 0x00FFFFAA,"=======================================================================");

                    new car = GetOwnedVehicleID(playerid, 1);
                    if(car != INVALID_VEHICLE_ID)
                    {
                        SetVehicleNumberPlateEx(car,"SemPlaca");
                        SetVehicleToRespawn(car);
                    }
                }
                if(built == 0)
                {
                    if(DOF2_GetInt(file, "PhoneNr") < 10000)
                        DOF2_SetInt(file, "PhoneNr", 10000 + random(89999));

                    new string[128];
                    format(string,128,"**Seu nъmero de telefone foi modificado para: %d",DOF2_GetInt(file, "PhoneNr"));
                    SendClientMessage(playerid, COLOR_WHITE, string);

                    if(DOF2_GetInt(file, "AdminLevel") == 5000 || DOF2_GetInt(file, "AdminLevel") == 5001)
                        DOF2_SetInt(file, "AdminLevel", 7);
                    else if(DOF2_GetInt(file, "AdminLevel") == 3000)
                        DOF2_SetInt(file, "AdminLevel", 6);
                }
                if(Player[playerid][pTut] == 1)
                    SetTimerEx("ShowNews",1500, false, "i", playerid);
                DOF2_SetInt(file, "GMBuilt", BUILT);
            }
            DOF2_SetInt(file, "Online", 1);
            Player[playerid][pLevel] = DOF2_GetInt(file, "Level");
            Player[playerid][pAdmin] = DOF2_GetInt(file, "AdminLevel");
            Player[playerid][pVIP] = DOF2_GetInt(file, "DonateRank");
            Player[playerid][pVIPTime] = DOF2_GetInt(file, "VipTime");
            Player[playerid][gPupgrade] = DOF2_GetInt(file, "UpgradePoints");
            Player[playerid][pConnectTime] = DOF2_GetInt(file, "ConnectedTime");
            Player[playerid][pReg] = DOF2_GetInt(file, "Registered");
            Player[playerid][pSex] = DOF2_GetInt(file, "Sex");
            Player[playerid][pAge] = DOF2_GetInt(file, "Age");
            Player[playerid][pOrigin] = DOF2_GetInt(file, "Origin");
            Player[playerid][pExp] = DOF2_GetInt(file, "Respect");
            Player[playerid][pCash] = DOF2_GetInt(file, "Money");
            Player[playerid][pBank] = DOF2_GetInt(file, "Bank");
            Player[playerid][pCrimes] = DOF2_GetInt(file, "Crimes");
            Player[playerid][pCrimes2] = DOF2_GetInt(file, "Crimes2");
            Player[playerid][pKills] = DOF2_GetInt(file, "Kills");

            Player[playerid][pDeaths] = DOF2_GetInt(file, "Deaths");
            Player[playerid][pArrested] = DOF2_GetInt(file, "Arrested");
            Player[playerid][pWantedDeaths] = DOF2_GetInt(file, "WantedDeaths");
            Player[playerid][pPhoneBook] = DOF2_GetInt(file, "Phonebook");
            Player[playerid][pPhone] = DOF2_GetInt(file, "Phone");
            Player[playerid][pMask] = DOF2_GetInt(file, "Mask");
            Player[playerid][pLottoNr] = DOF2_GetInt(file, "LottoNr");
            Player[playerid][pFishes] = DOF2_GetInt(file, "Fishes");
            Player[playerid][pBiggestFish] = DOF2_GetInt(file, "BiggestFish");
            Player[playerid][pJob] = DOF2_GetInt(file, "Job");
            Player[playerid][pHeadValue] = DOF2_GetInt(file, "HeadValue");
            Player[playerid][pJailed] = DOF2_GetInt(file, "Jailed");
            Player[playerid][pJailTime] = DOF2_GetInt(file, "JailTime");
            Player[playerid][pMats] = DOF2_GetInt(file, "Materials");
            Player[playerid][pDrugs] = DOF2_GetInt(file, "Drugs");
            Player[playerid][pCigarro] = DOF2_GetInt(file, "Cigarro");
            Player[playerid][pPC] = DOF2_GetInt(file, "PC");
            Player[playerid][pLuta] = DOF2_GetInt(file, "Luta");
            Player[playerid][pCorda] = DOF2_GetInt(file, "Corda");
            Player[playerid][pVotou] = DOF2_GetInt(file, "Votou");
            Player[playerid][pBan] = DOF2_GetInt(file, "Ban");
            Player[playerid][pLeader] = DOF2_GetInt(file, "Leader");
            Player[playerid][pMember] = DOF2_GetInt(file, "Member");
            Player[playerid][pFMember] = DOF2_GetInt(file, "FMember");
            Player[playerid][pRank] = DOF2_GetInt(file, "Rank");
            Player[playerid][pChar] = DOF2_GetInt(file, "Char");
            Player[playerid][pContractTime] = DOF2_GetInt(file, "ContractTime");
            Player[playerid][pDetSkill] = DOF2_GetInt(file, "DetSkill");
            Player[playerid][pSexSkill] = DOF2_GetInt(file, "SexSkill");
            Player[playerid][pBoxSkill] = DOF2_GetInt(file, "BoxSkill");
            Player[playerid][pLawSkill] = DOF2_GetInt(file, "LawSkill");
            Player[playerid][pMechSkill] = DOF2_GetInt(file, "MechSkill");
            Player[playerid][pJackSkill] = DOF2_GetInt(file, "JackSkill");
            Player[playerid][pCarSkill] = DOF2_GetInt(file, "CarSkill");
            Player[playerid][pNewsSkill] = DOF2_GetInt(file, "NewsSkill");
            Player[playerid][pDrugsSkill] = DOF2_GetInt(file, "DrugsSkill");
            Player[playerid][pCookSkill] = DOF2_GetInt(file, "CookSkill");
            Player[playerid][pFishSkill] = DOF2_GetInt(file, "FishSkill");
            Player[playerid][pSHealth] = DOF2_GetFloat(file, "pSHealth");
            Player[playerid][pHealth] = DOF2_GetFloat(file, "pHealth");
            Player[playerid][pLocalX] = DOF2_GetFloat(file, "LocalX");
            Player[playerid][pLocalY] = DOF2_GetFloat(file, "LocalY");
            Player[playerid][pLocalZ] = DOF2_GetFloat(file, "LocalZ");
            Player[playerid][pInt] = DOF2_GetInt(file, "Int");
            Player[playerid][pLocal] = DOF2_GetInt(file, "Local");
            Player[playerid][pTeam] = DOF2_GetInt(file, "Team");
            Player[playerid][pModel] = DOF2_GetInt(file, "Model");
            Player[playerid][pPnumber] = DOF2_GetInt(file, "PhoneNr");
            Player[playerid][pPhousekey] = DOF2_GetInt(file, "House");
            Player[playerid][pPaluguelkey] = DOF2_GetInt(file, "Aluguel");
            Player[playerid][pAtend] = DOF2_GetInt(file, "Atendimentos");
            Player[playerid][pNota] = DOF2_GetInt(file, "Nota");
            Player[playerid][pLocalSpawn] = DOF2_GetInt(file, "LocalSpawn");
            Player[playerid][pEnigma] = DOF2_GetInt(file, "Enigma");
            Player[playerid][pPbiskey] = DOF2_GetInt(file, "Bizz");
            Player[playerid][pCarLic] = DOF2_GetInt(file, "CarLic");
            Player[playerid][pFlyLic] = DOF2_GetInt(file, "FlyLic");
            Player[playerid][pBoatLic] = DOF2_GetInt(file, "BoatLic");
            Player[playerid][pFishLic] = DOF2_GetInt(file, "FishLic");
            Player[playerid][pGunLic] = DOF2_GetInt(file, "GunLic");
            Player[playerid][pGun1] = DOF2_GetInt(file, "Gun1");
            Player[playerid][pGun2] = DOF2_GetInt(file, "Gun2");
            Player[playerid][pGun3] = DOF2_GetInt(file, "Gun3");
            Player[playerid][pGun4] = DOF2_GetInt(file, "Gun4");
            Player[playerid][pAmmo1] = DOF2_GetInt(file, "Ammo1");
            Player[playerid][pAmmo2] = DOF2_GetInt(file, "Ammo2");
            Player[playerid][pAmmo3] = DOF2_GetInt(file, "Ammo3");
            Player[playerid][pInvWeapon] = DOF2_GetInt(file, "InvWeapon");
            Player[playerid][pInvAmmo] = DOF2_GetInt(file, "InvAmmo");
            Player[playerid][pAmmo4] = DOF2_GetInt(file, "Ammo4");
            Player[playerid][pCarTime] = DOF2_GetInt(file, "CarTime");
            Player[playerid][pPayDayHad] = DOF2_GetInt(file, "PayDayHad");
            Player[playerid][pCDPlayer] = DOF2_GetInt(file, "CDPlayer");
            Player[playerid][pWins] = DOF2_GetInt(file, "Wins");
            Player[playerid][pLoses] = DOF2_GetInt(file, "Loses");
            Player[playerid][pAlcoholPerk] = DOF2_GetInt(file, "AlcoholPerk");
            Player[playerid][pDrugPerk] = DOF2_GetInt(file, "DrugPerk");
            Player[playerid][pMiserPerk] = DOF2_GetInt(file, "MiserPerk");
            Player[playerid][pPainPerk] = DOF2_GetInt(file, "PainPerk");
            Player[playerid][pTraderPerk] = DOF2_GetInt(file, "TraderPerk");
            Player[playerid][pTut] = DOF2_GetInt(file, "Tutorial");
            Player[playerid][pWarns] = DOF2_GetInt(file, "Warnings");
            Player[playerid][pAdjustable] = DOF2_GetInt(file, "Adjustable");
            Player[playerid][pFuel] = DOF2_GetInt(file, "Fuel");
            Player[playerid][pMarried] = DOF2_GetInt(file, "Married");
            format(pMarriedTo[playerid],128,"%s", DOF2_GetString(file, "MarriedTo"));
            format(Player[playerid][pDest],32,"%s", DOF2_GetString(file, "Dest"));
            format(Player[playerid][pAviso1],32,"%s", DOF2_GetString(file, "Aviso1"));
            format(Player[playerid][pAviso2],32,"%s", DOF2_GetString(file, "Aviso2"));
            format(Player[playerid][JailReason],32,"%s", DOF2_GetString(file, "Prisao"));

            format(Player[playerid][pLastLogin],24,"%s", DOF2_GetString(file, "LU"));
            Player[playerid][pLastSave] = DOF2_GetInt(file, "LS");
            Player[playerid][pLogedTime] = DOF2_GetInt(file, "LogedTime");
            Player[playerid][pPedagio] = DOF2_GetInt(file, "Pedagio");
            gPlayerLogged[playerid] = 1;
            TextDrawHideForPlayer(playerid, rUserBox);
            TextDrawHideForPlayer(playerid, rUserBox2);
            TextDrawHideForPlayer(playerid, rBorda);
            TextDrawHideForPlayer(playerid, rBorda2);
            TextDrawHideForPlayer(playerid, rLogoType);
            TextDrawHideForPlayer(playerid, rWelcome);

        }
        else
        {
            gPlayerLogTries[playerid] += 1;
            new string[128];
            format(string,sizeof(string),""AVERMELHADO"SENHA INCORRETA\n\n"AVERMELHADO"A senha inserida estб incorreta.\n"ESBRANCO"Se vocк nгo registrou a conta %s re-conecte com outro nick.\nErros consecutivos implicarгo ban do seu IP (%d/%d)",Player[playerid][pName],gPlayerLogTries[playerid],MAX_LOGIN_FAILS);
            ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Infinity City RolePlay - LOGIN",string,"Logar","Sair");

            if(gPlayerLogTries[playerid] >= MAX_LOGIN_FAILS)
                Kick(playerid);  //mexer

            return 1;
        }

        if(Player[playerid][pPbiskey] >= 100 && Player[playerid][pPbiskey] != 255)
            if(strfind(sbOwner[Player[playerid][pPbiskey]-100], Player[playerid][pName], true) != 0)
                Player[playerid][pPbiskey] = 255;

        if(Player[playerid][pPbiskey] < 100)
            if(strfind(bOwner[Player[playerid][pPbiskey]], Player[playerid][pName], true) != 0)
                Player[playerid][pPbiskey] = 255;

        Player[playerid][pAdjustable] = 0;
        ResetPlayerMoney(playerid);
        Morrendo[playerid] = 0;
        FixBug[playerid] = 60;
        ConsumingMoney[playerid] = 1;
        GivePlayerMoney(playerid,Player[playerid][pCash]);

        new Info[6][10];
        split(Player[playerid][pLastLogin],Info,'/');

        new string[128];

        if(strval(Info[0])==0)
            format(string, sizeof(string), "[Infinity City RPG]  Bem vindo %s!",Player[playerid][pName]);
        else
            format(string, sizeof(string), "[Infinity City RPG]  Bem vindo %s. Seu ъltimo login foi no dia %02d/%02d/%d аs %02d:%02d:%02d",Player[playerid][pName],strval(Info[0]),strval(Info[1]),strval(Info[2]),strval(Info[3]),strval(Info[4]),strval(Info[5]));
        SendClientMessage(playerid, 0xFFA500AA,string);

        if(Player[playerid][pLastSave] > 7200)
            Player[playerid][pLastSave] = 7200;

        if(Player[playerid][pLastSave] <= 20)
        {
            Player[playerid][pLastSave] = 2*3600;
            format(string, sizeof(string), "%s : Banco:%d | Mгo:%d | Level:%d | Respeito:%d | Casa:%d | Empresa:%d ", Player[playerid][pName], Player[playerid][pBank],
            Player[playerid][pCash], Player[playerid][pLevel], Player[playerid][pExp], Player[playerid][pPhousekey], Player[playerid][pPbiskey]);


            WriteLog("Backup", string);
        }

        format(Player[playerid][pLastLogin], 24,"%d/%d/%d/%d/%d/%d",ClockTime[dDay],ClockTime[dMonth],ClockTime[dYear],ClockTime[tHour],ClockTime[tMinute],ClockTime[tSecond]);

        new IP[24];
        GetPlayerIp(playerid,IP,sizeof(IP));
        FormatLog("logins", "%s logou no servidor. IP: %s",Player[playerid][pName],IP);
        LoadPlayerVehicle(playerid);
        if(Player[playerid][pAdmin] > 0)
        {
            format(string, sizeof(string), "[Infinity City RPG] Vocк estб logado como %s level %d",AccountName(playerid), Player[playerid][pAdmin]);
            SendClientMessage(playerid, 0xA9A9A9AA,string);
            AdminDuty[playerid] = 0;
            SendClientMessage(playerid, COLOR_WHITE,"[INFO]Se Vocк encontrar algum bug relate usando /bug ou /relato ! Bom jogo.");
        }

        if(Player[playerid][pVIP]) if(gettime() >= Player[playerid][pVIPTime]) { Player[playerid][pVIP] = 0; SendClientMessage(playerid, 0xFF0000FF, "[INFO] Seu VIP expirou!!"); }

        if(Player[playerid][pAdmin] > 7)
        {
//          SafeSetPlayerPos(playerid, 1964.5733,1912.7291,131.0000);
            SetSpawnInfo(playerid, Player[playerid][pTeam], Player[playerid][pModel], 1964.5733, 1912.7291, 131.0000, 1.0, -1, -1, -1, -1, -1, -1);
        }
        else
        {
        //  SafeSetPlayerPos(playerid, 1791.126586.-1920.45617613.408773);
            new asd = random(sizeof(CivilSpawns));
            SetSpawnInfo(playerid, Player[playerid][pTeam], Player[playerid][pModel], CivilSpawns[asd][0], CivilSpawns[asd][1], CivilSpawns[asd][2], 1.0, -1, -1, -1, -1, -1, -1);
        }
        if(gTeam[playerid] == 0)
            gTeam[playerid] = 3;
        else
            gTeam[playerid] = Player[playerid][pTeam];

        SetTimerEx("Reloguer",5000,false, "i", playerid);
        BigSms[playerid] = 1;
        BigCW[playerid] = 1;
        BigMp[playerid] = 1;

        new vehicleid = GetOwnedVehicleID(playerid, 1);
        if(vehicleid != INVALID_VEHICLE_ID)
            VehicleInfo[vehicleid][vLock] = 1;


        SetCameraBehindPlayer(playerid);
        format(string, sizeof(string), "~w~Bem Vindo ~n~~b~   %s", Player[playerid][pName]);
        DateProp(playerid);
        GameTextForPlayer(playerid, string, 5000, 1);

        if(Player[playerid][pMember] == 4)
            for(new j=0; j<50; j++)
                if(fogo[j] > 0)
                    SetPlayerMapIcon(playerid, j+33, fogoposX[j],fogoposY[j],fogoposZ[j],20,2,MAPICON_GLOBAL);
        SpawnPlayer(playerid);
    }

    return 1;
}

ta ai mano
Reply
#6

Й uma treta mas, cria uma variбvel pro player que for hospitalizado pra carregar no login. Tipo [pHospitalizado]. Depois tu pхe na Public OnPlayerSpawn: if(Player[playerid][pHospitalizado] != 0) (0 - Nгo hospitalizado \ 1 = Hospitalizado).

PHP Code:
        if(Player[playerid][pHospitalizado] != 0)
        {
            
SendClientMessage(playerid0xA9A9A9AAVocк estб hospitalizado!);
            
SetPlayerPos(playerid,0.0,0.0,3.0); //Local do hospital
        

Vocк pode setar o interior tbm.
Reply
#7

Quote:
Originally Posted by TugaBR
View Post
Й uma treta mas, cria uma variбvel pro player que for hospitalizado pra carregar no login. Tipo [pHospitalizado]. Depois tu pхe na Public OnPlayerSpawn: if(Player[playerid][pHospitalizado] != 0) (0 - Nгo hospitalizado \ 1 = Hospitalizado).

PHP Code:
        if(Player[playerid][pHospitalizado] != 0)
        {
            
SendClientMessage(playerid0xA9A9A9AAVocк estб hospitalizado!);
            
SetPlayerPos(playerid,0.0,0.0,3.0); //Local do hospital
        

Vocк pode setar o interior tbm.
Isso pode ser feito com booleanas, й mais apropriado.
Exemplo:

PHP Code:
new bool:EstaNoHospital[MAX_PLAYERS];
if(
EstaNoHospital[playerid] == true//Significa que ele estб hospitalizado
if(EstaNoHospital[playerid] == false//Significa que ele nгo esta hospitalizado 
Para mais detalhes veja esse tutorial: https://sampforum.blast.hk/showthread.php?tid=292185
Reply
#8

Quote:
Originally Posted by EditPawn
View Post
Isso pode ser feito com booleanas, й mais apropriado.
Exemplo:

PHP Code:
new bool:EstaNoHospital[MAX_PLAYERS];
if(
EstaNoHospital[playerid] == true//Significa que ele estб hospitalizado
if(EstaNoHospital[playerid] == false//Significa que ele nгo esta hospitalizado 
Para mais detalhes veja esse tutorial: https://sampforum.blast.hk/showthread.php?tid=292185
Com bool й melhor memo. Mas pra ele nгo ter dъvidas futuras ele pode usar a variбvel, se tiver dъvidas pode usar as outras variбveis da prуpria gm pra se basear.
Reply
#9

Pode fazer o Code para mi mano
Reply
#10

Quote:
Originally Posted by #Coringa
View Post
Pode fazer o Code para mi mano
O sistema de hospital apenas seta a posiзгo no hospital ?

se for faz uma bool de hospitalizado '-'
Reply
#11

O mais importante seria ele postar o on player spawn gente '-'
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)