[GameMode] Loucos por drift v2 [Final]
#1


LDP v2 [Final]

Antes de tudo vou explicar o porque estou postando este GameMode hoje.
Ontem um noob chamado yagopirano veio no meu skype chorando , que queria editar um Game Mode
de drift , ele jurou que nгo ia passar para ninguem.
Chega hoje de manha ja veio gente pedindo ajuda como fazer as coisas que tem no meu GameMode
E ate mando os codes igualzinho . Entгo o que dizer de uma pessoa assim


Ta agora sobre o GameMode
Ele contem
2 Opзoes de jogo (Jogar com conta/ Jogar sem conta)
Seleзгo de skin
Rank(Somente o Melhor do servidor [/reidoscore - /reidodrift])
Sistema neon
Sistema de administraзгo basica (3 Niveis)
Mensagem Random
Anti-Bot
Color Random
Sistema Record
Um super sistema de drift baseado em uma FS do IpsBruno
Um Anti-Roubo de veiґculo de outro usuario
Um anti-flood criado por mim
Dialogґs trabalhadas em switch
Utilizaзгo do geo_ip (By IpsBruno)
Sistema de temperatura (Gera a temperatura da sua cidade [By IpsBruno] Tem que upar o code )

Nгo possui pista de drift[Final]


Prints

















Tudo organizado no GameMode .

pawn Код:
#include           a_samp
#include           DOF2
#include           zcmd
#include           sscanf2
#include           geo_ip
#include           a_http

#define            PING_PADRAO               500
#define            MAX_AVISOS                10

#define            LOCALSALVO                "Contas/%s.ini"
#define            SAVERECORD                "Record.ini"

// -_-_-_-_-_-_-_-_| Dialog |-_-_-_-_-_-_-_-_
#define            DIALOG_SELECAO            1
#define            DIALOG_REGISTRO           2
#define            DIALOG_LOGAR              3
#define            DIALOG_SKIN               4
#define            DIALOG_RANK               5
#define            DIALOG_ADMINS             6
#define            DIALOG_CONTATO            7
#define            DIALOG_NEON               8
#define            DIALOG_AJUDADM            9
#define            DIALOG_AJUDAPL            10

// -_-_-_-_-_-_-_-_|  Cores  |-_-_-_-_-_-_-_-_
#define            COLOR_RED                 0xFF0000FF
#define            COLOR_BLUE                0x0000FFFF
#define            COLOR_GREE                0x00FF00FF
#define            COLOR_AMARELO             0xFFFF00FF
#define            COLOR_AZULFRACO           0x80FFFFFF
#define            COR_BRANCO                0xFFFFFFAA
#define            COR_VERDE                 0x009700AA
#define            COR_CINZA                 0xAFAFAFAA
#define            COR_VERMELHA              0xFF69B4AA

enum TD{
   Text:pAdm,
   Text:Log1,
   Text:Log2,
   Text:Log3,
   Text:Log4,
   Text:Log5,
   Text:Reg,
   Text:Pts,
   Text:SCP,
   Text:DRP,
   Text:Site,
   Text:MSG
}
new PlayerText[MAX_PLAYERS][TD];

enum pInfo{
     pCash,
     pScore,
     pAdmin,
     pPoint,
     pSkin,
     pFlood,
     pTimer,
     pCont,
     pCity[20],
     pName[40],
     bool:pLog
}
new PlayerInfo[MAX_PLAYERS][pInfo];

new ANome [][38] ={    {"Colaborador"}, {"Administrador"}, {"Dono/Scripter"}        };
       
new MinhasMensagens[5][100]={
{"~r~DonSpeed - ~w~ Perdido ? /ajuda /admins /reportar"},
 {"~r~DonSpeed - ~w~ Chame seus amigos e ajude o servidor a crescer"},
  {"~r~DonSpeed - ~w~ Capotou seu veiculo ? /virar"},
   {"~r~DonSpeed - ~w~Veja os mais foda do servidor ! /reidoscore /reidodrift"},
    {"~r~DonSpeed - ~w~Servidor construido por DonSpeed"}
};
new NomesProibidos[34][MAX_PLAYER_NAME] =
{
"com1","com2","com3","com4","com5","com6","com7","com8","com9","lpt1","lpt2","lpt3",
"lpt4","lpt5","lpt6","lpt7","lpt8","lpt9","Carl","Rocky","Sony","clock$","prn","nul",
"con","Azucar","CON","con","con1","aux","aux1","prn","PRN","AUX"
};

new PlayerColors[200] = {
     0xFF8C13FF,0xC715FFFF,0x20B2AAFF,0xDC143CFF,0x6495EDFF,0xf0e68cFF,0x778899FF,0xFF1493FF,0xF4A460FF,
     0xEE82EEFF,0xFFD720FF,0x8b4513FF,0x4949A0FF,0x148b8bFF,0x14ff7fFF,0x556b2fFF,0x0FD9FAFF,0x10DC29FF,
     0x534081FF,0x0495CDFF,0xEF6CE8FF,0xBD34DAFF,0x247C1BFF,0x0C8E5DFF,0x635B03FF,0xCB7ED3FF,0x65ADEBFF,
     0x5C1ACCFF,0xF2F853FF,0x11F891FF,0x7B39AAFF,0x53EB10FF,0x54137DFF,0x275222FF,0xF09F5BFF,0x3D0A4FFF,
     0x22F767FF,0xD63034FF,0x9A6980FF,0xDFB935FF,0x3793FAFF,0x90239DFF,0xE9AB2FFF,0xAF2FF3FF,0x057F94FF,
     0xB98519FF,0x388EEAFF,0x028151FF,0xA55043FF,0x0DE018FF,0x93AB1CFF,0x95BAF0FF,0x369976FF,0x18F71FFF,
     0x4B8987FF,0x491B9EFF,0x829DC7FF,0xBCE635FF,0xCEA6DFFF,0x20D4ADFF,0x2D74FDFF,0x3C1C0DFF,0x12D6D4FF,
     0x48C000FF,0x2A51E2FF,0xE3AC12FF,0xFC42A8FF,0x2FC827FF,0x1A30BFFF,0xB740C2FF,0x42ACF5FF,0x2FD9DEFF,
     0xFAFB71FF,0x05D1CDFF,0xC471BDFF,0x94436EFF,0xC1F7ECFF,0xCE79EEFF,0xBD1EF2FF,0x93B7E4FF,0x3214AAFF,
     0x184D3BFF,0xAE4B99FF,0x7E49D7FF,0x4C436EFF,0xFA24CCFF,0xCE76BEFF,0xA04E0AFF,0x9F945CFF,0xDCDE3DFF,
     0x10C9C5FF,0x70524DFF,0x0BE472FF,0x8A2CD7FF,0x6152C2FF,0xCF72A9FF,0xE59338FF,0xEEDC2DFF,0xD8C762FF,
     0xD8C762FF,0xFF8C13FF,0xC715FFFF,0x20B2AAFF,0xDC143CFF,0x6495EDFF,0xf0e68cFF,0x778899FF,0xFF1493FF,
     0xF4A460FF,0xEE82EEFF,0xFFD720FF,0x8b4513FF,0x4949A0FF,0x148b8bFF,0x14ff7fFF,0x556b2fFF,0x0FD9FAFF,
     0x10DC29FF,0x534081FF,0x0495CDFF,0xEF6CE8FF,0xBD34DAFF,0x247C1BFF,0x0C8E5DFF,0x635B03FF,0xCB7ED3FF,
     0x65ADEBFF,0x5C1ACCFF,0xF2F853FF,0x11F891FF,0x7B39AAFF,0x53EB10FF,0x54137DFF,0x275222FF,0xF09F5BFF,
     0x3D0A4FFF,0x22F767FF,0xD63034FF,0x9A6980FF,0xDFB935FF,0x3793FAFF,0x90239DFF,0xE9AB2FFF,0xAF2FF3FF,
     0x057F94FF,0xB98519FF,0x388EEAFF,0x028151FF,0xA55043FF,0x0DE018FF,0x93AB1CFF,0x95BAF0FF,0x369976FF,
     0x18F71FFF,0x4B8987FF,0x491B9EFF,0x829DC7FF,0xBCE635FF,0xCEA6DFFF,0x20D4ADFF,0x2D74FDFF,0x3C1C0DFF,
     0x12D6D4FF,0x48C000FF,0x2A51E2FF,0xE3AC12FF,0xFC42A8FF,0x2FC827FF,0x1A30BFFF,0xB740C2FF,0x42ACF5FF,
     0x2FD9DEFF,0xFAFB71FF,0x05D1CDFF,0xC471BDFF,0x94436EFF,0xC1F7ECFF,0xCE79EEFF,0xBD1EF2FF,0x93B7E4FF,
     0x3214AAFF,0x184D3BFF,0xAE4B99FF,0x7E49D7FF,0x4C436EFF,0xFA24CCFF,0xCE76BEFF,0xA04E0AFF,0x9F945CFF,
     0xDCDE3DFF,0x10C9C5FF,0x70524DFF,0x0BE472FF,0x8A2CD7FF,0x6152C2FF,0xCF72A9FF,0xE59338FF,0xEEDC2DFF,
     0xD8C762FF,0xD8C762FF
};

new arquivo[40],
    dstring[150],
    ADMS,
    ID,
    Ping,
    Record,
    PlayersOn,
    bruno[MAX_PLAYERS],
    playerDrift[MAX_PLAYERS],
    Sumir[MAX_PLAYERS];
main()
{
                                                          print(#Em Contruзгo);
}
public OnGameModeInit()
{
    SetGameModeText(#LPD v2.0);
    SendRconCommand(#hostname [LPD] Loucos por drift [v-2.0]);
    SendRconCommand(#password 01);
    UsePlayerPedAnims();
   
    CreateVehicle(475, -314.7671, 1514.8269, 74.9569, 0.0000, 3, 5, -1);
    CreateVehicle(475, -321.0193, 1514.7738, 74.9569, 0.0000, 3, 5, -1);
    CreateVehicle(475, -327.2918, 1514.8643, 74.9661, 0.0000, 3, 5, -1);
    CreateVehicle(475, -333.6411, 1514.7469, 74.8847, 0.0000, 3, 5, -1);
    CreateVehicle(475, -339.9123, 1514.5653, 74.8692, 0.0000, 3, 5, -1);
    CreateVehicle(562, -317.6368, 1514.3484, 74.9750, 0.0000, 3, 5, -1);
    CreateVehicle(562, -324.1552, 1514.5232, 74.9750, 0.0000, 3, 5, -1);
    CreateVehicle(562, -330.3815, 1514.5057, 74.9750, 0.0000, 3, 5, -1);
    CreateVehicle(562, -336.5720, 1514.3864, 74.9750, 0.0000, 3, 5, -1);
    CreateVehicle(562, -342.7576, 1514.3839, 74.9750, 0.0000, 3, 5, -1);
    SetTimer("DriftCounter", 850, true);
   
    if(!DOF2_FileExists(SAVERECORD))
    {
        DOF2_CreateFile(SAVERECORD);
        DOF2_SetInt(SAVERECORD, "Players", 0);
        Record = DOF2_GetInt(SAVERECORD, "Players");
    }
    else
    {
        Record = DOF2_GetInt(SAVERECORD, "Players");
    }
    Ping = PING_PADRAO;
    return 1;
}

public OnGameModeExit()
{
    for(new x=0; x< MAX_PLAYERS; x++)
    {
        if(IsPlayerConnected(x)){
       
        format(arquivo, 40, LOCALSALVO, Nome(x));
               
        DOF2_SetInt(arquivo, "Cash",  PlayerInfo[x][pCash]);
        DOF2_SetInt(arquivo, "Score", PlayerInfo[x][pScore]);
        DOF2_SetInt(arquivo, "Admin", PlayerInfo[x][pAdmin]);
        DOF2_SetInt(arquivo, "Point", PlayerInfo[x][pPoint]);
       
        PlayerInfo[x][pLog] = false;
        }
    }
   
    if(DOF2_FileExists(SAVERECORD))
    {
         DOF2_SetInt(SAVERECORD, "Players", Record);
         DOF2_SaveFile();
    }
    DOF2_Exit();
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerCameraPos(playerid, 1175.9861, -631.1458, 250.4576);
    SetPlayerCameraLookAt(playerid, 1176.3455, -632.0833, 249.9975);
   
    return SpawnPlayer(playerid);
}

public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid,-1,"                   {FF0000}Loucos Por Drift v2.0       ");
    SendClientMessage(playerid,-1,"             {0000FF}GameMode Desenvolvido por DonSpeed");
    SendClientMessage(playerid,-1,"                   {00FF00}Sistemas inovadores");
    SendClientMessage(playerid,-1,"                     {FFFF00}Quem pode cria !");
    for(new i; i<sizeof(NomesProibidos); i++)
    {
        if(!strcmp(Nome(playerid), NomesProibidos[i], true))
        {
            DSKick(playerid);
        }
    }
    PlayerText[playerid][pAdm] = TextDrawCreate(11.000000, 439.000000, " ");
    TextDrawBackgroundColor(PlayerText[playerid][pAdm], 255);
    TextDrawFont(PlayerText[playerid][pAdm], 2);
    TextDrawLetterSize(PlayerText[playerid][pAdm], 0.230000, 1.000000);
    TextDrawColor(PlayerText[playerid][pAdm], -16776961);
    TextDrawSetOutline(PlayerText[playerid][pAdm], 1);
    TextDrawSetProportional(PlayerText[playerid][pAdm], 1);
    TextDrawSetSelectable(PlayerText[playerid][pAdm], 0);

    PlayerText[playerid][Log1] = TextDrawCreate(506.000000, 407.000000, "Loucos");
    TextDrawBackgroundColor(PlayerText[playerid][Log1], 255);
    TextDrawFont(PlayerText[playerid][Log1], 2);
    TextDrawLetterSize(PlayerText[playerid][Log1], 0.409999, 1.299998);
    TextDrawColor(PlayerText[playerid][Log1], -16776961);
    TextDrawSetOutline(PlayerText[playerid][Log1], 1);
    TextDrawSetProportional(PlayerText[playerid][Log1], 1);
    TextDrawSetSelectable(PlayerText[playerid][Log1], 0);

    PlayerText[playerid][Log2] = TextDrawCreate(563.000000, 418.000000, "por");
    TextDrawBackgroundColor(PlayerText[playerid][Log2], 255);
    TextDrawFont(PlayerText[playerid][Log2], 2);
    TextDrawLetterSize(PlayerText[playerid][Log2], 0.419999, 1.299999);
    TextDrawColor(PlayerText[playerid][Log2], -16776961);
    TextDrawSetOutline(PlayerText[playerid][Log2], 1);
    TextDrawSetProportional(PlayerText[playerid][Log2], 1);
    TextDrawSetSelectable(PlayerText[playerid][Log2], 0);

    PlayerText[playerid][Log3] = TextDrawCreate(587.000000, 428.000000, "Drift");
    TextDrawBackgroundColor(PlayerText[playerid][Log3], 255);
    TextDrawFont(PlayerText[playerid][Log3], 2);
    TextDrawLetterSize(PlayerText[playerid][Log3], 0.430000, 1.200000);
    TextDrawColor(PlayerText[playerid][Log3], -16776961);
    TextDrawSetOutline(PlayerText[playerid][Log3], 1);
    TextDrawSetProportional(PlayerText[playerid][Log3], 1);
    TextDrawSetSelectable(PlayerText[playerid][Log3], 0);

    PlayerText[playerid][Log4] = TextDrawCreate(507.000000, 426.000000, "~w~V 2.0");
    TextDrawBackgroundColor(PlayerText[playerid][Log4], 255);
    TextDrawFont(PlayerText[playerid][Log4], 2);
    TextDrawLetterSize(PlayerText[playerid][Log4], 0.219999, 0.899999);
    TextDrawColor(PlayerText[playerid][Log4], -16776961);
    TextDrawSetOutline(PlayerText[playerid][Log4], 1);
    TextDrawSetProportional(PlayerText[playerid][Log4], 1);
    TextDrawSetSelectable(PlayerText[playerid][Log4], 0);

    PlayerText[playerid][Log5] = TextDrawCreate(506.000000, 397.000000, "_");
    TextDrawBackgroundColor(PlayerText[playerid][Log5], 255);
    TextDrawFont(PlayerText[playerid][Log5], 1);
    TextDrawLetterSize(PlayerText[playerid][Log5], 0.500000, 5.399999);
    TextDrawColor(PlayerText[playerid][Log5], -1);
    TextDrawSetOutline(PlayerText[playerid][Log5], 0);
    TextDrawSetProportional(PlayerText[playerid][Log5], 1);
    TextDrawSetShadow(PlayerText[playerid][Log5], 1);
    TextDrawUseBox(PlayerText[playerid][Log5], 1);
    TextDrawBoxColor(PlayerText[playerid][Log5], 8995);
    TextDrawTextSize(PlayerText[playerid][Log5], 637.000000, -32.000000);
    TextDrawSetSelectable(PlayerText[playerid][Log5], 0);

    PlayerText[playerid][Reg] = TextDrawCreate(508.000000, 439.000000, " ");
    TextDrawBackgroundColor(PlayerText[playerid][Reg], 255);
    TextDrawFont(PlayerText[playerid][Reg], 2);
    TextDrawLetterSize(PlayerText[playerid][Reg], 0.290000, 1.000000);
    TextDrawColor(PlayerText[playerid][Reg], -16776961);
    TextDrawSetOutline(PlayerText[playerid][Reg], 1);
    TextDrawSetProportional(PlayerText[playerid][Reg], 1);
    TextDrawSetSelectable(PlayerText[playerid][Reg], 0);

    PlayerText[playerid][Pts] = TextDrawCreate(498.000000, 97.000000, " ");
    TextDrawBackgroundColor(PlayerText[playerid][Pts], 255);
    TextDrawFont(PlayerText[playerid][Pts], 2);
    TextDrawLetterSize(PlayerText[playerid][Pts], 0.259999, 1.100000);
    TextDrawColor(PlayerText[playerid][Pts], -16776961);
    TextDrawSetOutline(PlayerText[playerid][Pts], 1);
    TextDrawSetProportional(PlayerText[playerid][Pts], 1);
    TextDrawSetSelectable(PlayerText[playerid][Pts], 0);

    PlayerText[playerid][SCP] = TextDrawCreate(498.000000, 107.000000, " ");
    TextDrawBackgroundColor(PlayerText[playerid][SCP], 255);
    TextDrawFont(PlayerText[playerid][SCP], 2);
    TextDrawLetterSize(PlayerText[playerid][SCP], 0.240000, 1.000000);
    TextDrawColor(PlayerText[playerid][SCP], -16776961);
    TextDrawSetOutline(PlayerText[playerid][SCP], 1);
    TextDrawSetProportional(PlayerText[playerid][SCP], 1);
    TextDrawSetSelectable(PlayerText[playerid][SCP], 0);

    PlayerText[playerid][DRP] = TextDrawCreate(502.000000, 358.000000, " ");
    TextDrawBackgroundColor(PlayerText[playerid][DRP], 255);
    TextDrawFont(PlayerText[playerid][DRP], 1);
    TextDrawLetterSize(PlayerText[playerid][DRP], 0.290000, 1.200000);
    TextDrawColor(PlayerText[playerid][DRP], -1);
    TextDrawSetOutline(PlayerText[playerid][DRP], 0);
    TextDrawSetProportional(PlayerText[playerid][DRP], 1);
    TextDrawSetShadow(PlayerText[playerid][DRP], 1);
    TextDrawSetSelectable(PlayerText[playerid][DRP], 0);
   
    PlayerText[playerid][MSG] = TextDrawCreate(11.000000, 428.000000, " ");
    TextDrawBackgroundColor(PlayerText[playerid][MSG], 255);
    TextDrawFont(PlayerText[playerid][MSG], 2);
    TextDrawLetterSize(PlayerText[playerid][MSG], 0.200000, 1.100000);
    TextDrawColor(PlayerText[playerid][MSG], -16776961);
    TextDrawSetOutline(PlayerText[playerid][MSG], 1);
    TextDrawSetProportional(PlayerText[playerid][MSG], 1);
    TextDrawSetSelectable(PlayerText[playerid][MSG], 0);
   
    PlayerText[playerid][Site] = TextDrawCreate(512.000000, 393.000000, "www.scriptpawn.com.br");
    TextDrawBackgroundColor(PlayerText[playerid][Site], 255);
    TextDrawFont(PlayerText[playerid][Site], 0);
    TextDrawLetterSize(PlayerText[playerid][Site], 0.470000, 1.000000);
    TextDrawColor(PlayerText[playerid][Site], -16776961);
    TextDrawSetOutline(PlayerText[playerid][Site], 0);
    TextDrawSetProportional(PlayerText[playerid][Site], 1);
    TextDrawSetShadow(PlayerText[playerid][Site], 1);
    TextDrawSetSelectable(PlayerText[playerid][Site], 0);

    SetPlayerCameraPos(playerid, 1175.9861, -631.1458, 250.4576);
    SetPlayerCameraLookAt(playerid, 1176.3455, -632.0833, 249.9975);

    ShowPlayerDialog(playerid, DIALOG_SELECAO, DIALOG_STYLE_MSGBOX, "Ola Senhor","Escolha seu modo de jogo\n\nModo 1 - Registrar-Login\n\nModo 2 - Jogar sem conta","Modo 1","Modo 2");

    PlayersOn ++ ;
    if(PlayersOn > Record)
    {
        Record = PlayersOn;
        format(dstring,sizeof dstring,".:LPD:. Novo record de players : %d Players ON", Record);
        SendClientMessageToAll(COLOR_RED, dstring);
        if(DOF2_FileExists(SAVERECORD))
        {
           DOF2_SetInt(SAVERECORD, "Players", Record);
           DOF2_SaveFile();
        }
        return true;
    }
    return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
    if(PlayerInfo[playerid][pAdmin] != 0)ADMS--;
    PlayersOn--;
    if(PlayerInfo[playerid][pLog] == true)
    {
           format(arquivo, 40, LOCALSALVO, Nome(playerid));
           DOF2_SetInt(arquivo, "Cash", PlayerInfo[playerid][pCash]);
           DOF2_SetInt(arquivo, "Score", PlayerInfo[playerid][pScore]);
           DOF2_SetInt(arquivo, "Admin", PlayerInfo[playerid][pAdmin]);
           DOF2_SetInt(arquivo, "Point", PlayerInfo[playerid][pPoint]);
           PlayerInfo[playerid][pLog] = false;
    }
    switch(reason)
    {
        case 0: format(dstring,sizeof dstring,"{FF0000}.:LPD:. %s saiu do servidor. (Crash)",Nome(playerid));
        case 1: format(dstring,sizeof dstring,"{FF0000}.:LPD:. %s saiu do servidor. (Conta Propria)",Nome(playerid));
        case 2: format(dstring,sizeof dstring,"{FF0000}.:LPD:. %s saiu do servidor. (Kickado/Banido)",Nome(playerid));
    }
    SendClientMessageToAll(0xFFFFFFAA,dstring);
   
    return 1;
}
public OnPlayerSpawn(playerid)
{
    SetTimerEx("MSGDS", 2000, true, "d", playerid);
    SetTimerEx("Admin", 1000, true, "d", playerid);
   
    TextDrawShowForPlayer(playerid, PlayerText[playerid][pAdm]);
    TextDrawShowForPlayer(playerid, PlayerText[playerid][Log1]);
    TextDrawShowForPlayer(playerid, PlayerText[playerid][Log2]);
    TextDrawShowForPlayer(playerid, PlayerText[playerid][Log3]);
    TextDrawShowForPlayer(playerid, PlayerText[playerid][Log4]);
    TextDrawShowForPlayer(playerid, PlayerText[playerid][Log5]);
    TextDrawShowForPlayer(playerid, PlayerText[playerid][Reg]);
    TextDrawShowForPlayer(playerid, PlayerText[playerid][Pts]);
    TextDrawShowForPlayer(playerid, PlayerText[playerid][SCP]);
    TextDrawShowForPlayer(playerid, PlayerText[playerid][DRP]);
    TextDrawShowForPlayer(playerid, PlayerText[playerid][MSG]);
    TextDrawShowForPlayer(playerid, PlayerText[playerid][Site]);
   
    SetPlayerPos(playerid, -349.2299, 1529.1932, 75.6229);
   
    SetPlayerColor(playerid, PlayerColors[random(200)]);
    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
    return 1;
}
public OnPlayerText(playerid, text[])
{
    if(PlayerInfo[playerid][pFlood] > 0)
    {
        if(gettime() >= PlayerInfo[playerid][pFlood])
        {
            PlayerInfo[playerid][pFlood] = 0;
            PlayerInfo[playerid][pTimer] = 0;
            format(dstring, sizeof dstring," %s %s", Nome(playerid), text);
            SetPlayerChatBubble(playerid, dstring, 0xFF0000FF, 100.0, 10000);
        }
        else
        {
            PlayerInfo[playerid][pTimer]++;
            SendClientMessage(playerid, -1, ".:LPD:. Aguarde 2 segundos para digitar novamente.");
            if(PlayerInfo[playerid][pTimer] == MAX_AVISOS)return SendClientMessage(playerid, -1, ".:LPD:. Limite de avisos atingido."), DSKick(playerid);
        }
    }
    PlayerInfo[playerid][pFlood] = gettime() + 2;
    return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if (!ispassenger && IsVehicleOccupied(vehicleid))
    {
        SendClientMessage(playerid, -1, ".:LPD:. Proibido roubo de veiculo .");
        new Float:Pos[3];
        GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]), SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+10);
    }
    return 1;
}
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
    if(playerDrift[playerid] > 0)
    {
        KillTimer(bruno[playerid]); playerDrift[playerid] = 0; printf("Fail %s", Nome(playerid));
       
        TextDrawSetString(PlayerText[playerid][DRP], "~r~FAIL");
       
        Sumir[playerid] = SetTimerEx("ExitText", 2000, false, "d", playerid);
       
        RepairVehicle(GetPlayerVehicleID(playerid));
    }
    return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
         case DIALOG_SELECAO:
         {
              if(!response) return PlayerInfo[playerid][pAdmin] = 0, SpawnPlayer(playerid), PlayerInfo[playerid][pLog] = false, SetPlayerSkin(playerid, 33), format(PlayerInfo[playerid][pName], 40, Nome(playerid)), SetPlayerName(playerid,#SemConta);
              format(arquivo, 40, LOCALSALVO, Nome(playerid));
              if(DOF2_FileExists(arquivo))
              ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Digite sua senha para que possa logar!", "Logar", "Cancelar");
              else
              ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Registro", "Digite uma senha de numeros para registrar!", "Registrar", "Cancelar");
         }
         case DIALOG_REGISTRO:
         {
              if(!response)return DSKick(playerid);
              if(!strval(inputtext))return ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Registro", "Digite uma senha de numeros para registrar!", "Registrar", "Cancelar");
              format(arquivo, 40, LOCALSALVO, Nome(playerid));
              DOF2_CreateFile(arquivo);
              DOF2_SetString(arquivo, "Senha", inputtext);
              DOF2_SetInt(arquivo, "Cash", 0);
              DOF2_SetInt(arquivo, "Score", 0);
              DOF2_SetInt(arquivo, "Admin", 0);
              DOF2_SetInt(arquivo, "Point", 0);
              DOF2_SaveFile();
              SendClientMessage(playerid , -1 , #Registro efetuado com sucesso!);
              ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Digite sua senha para que possa logar!", "Logar", "Cancelar");
         }
         case DIALOG_LOGAR:
         {
              if(!response)return DSKick(playerid);
              format(arquivo, 40, LOCALSALVO, Nome(playerid));
              if(strcmp(DOF2_GetString(arquivo,"Senha"), inputtext, false))
              {
                   SendClientMessage(playerid, -1, #Voce serб kickado por errar sua senha!);
                   DSKick(playerid);
              } else {
                   ShowPlayerDialog(playerid, DIALOG_SKIN, DIALOG_STYLE_INPUT, "Skin", "Digite o numero de uma skin que deseja usar!\n\n", "Continuar", "Padrгo");

                   PlayerInfo[playerid][pCash]  = DOF2_GetInt(arquivo, "Cash");
                   PlayerInfo[playerid][pScore] = DOF2_GetInt(arquivo, "Score");
                   PlayerInfo[playerid][pAdmin] = DOF2_GetInt(arquivo, "Admin");
                   PlayerInfo[playerid][pPoint] = DOF2_GetInt(arquivo, "Point");
                   
                   PlayerInfo[playerid][pLog] = true;
                   SendClientMessage(playerid, -1, #Voce logou com sucesso!);
                   GetPlayerGeoIP( playerid ) ;
                   
                   if(PlayerInfo[playerid][pAdmin] != 0)return ADMS++;
              }
         }
         case DIALOG_SKIN:
         {
              if(!response)return SetPlayerSkin(playerid, 2);
              if(!strval(inputtext))return ShowPlayerDialog(playerid, DIALOG_SKIN, DIALOG_STYLE_INPUT, "Skin", "Digite o numero de uma skin que deseja usar!", "Continuar", "Padrгo");
              if( 299 <(strval(inputtext))> 1)return ShowPlayerDialog(playerid, DIALOG_SKIN, DIALOG_STYLE_INPUT, "Skin", "Digite o numero de uma skin que deseja usar!", "Continuar", "Padrгo");
              SpawnPlayer(playerid);// SPAWNAR O PLAYER
              SetPlayerSkin(playerid, strval(inputtext));
              PlayerInfo[playerid][pSkin] = strval(inputtext);
         }
         case DIALOG_NEON:
         {
              switch(listitem)
              {
                     case 0:
                     {
                              DestroyObject(GetPVarInt(playerid, "neon"));
                              DeletePVar(playerid, "Status");
                              DestroyObject(GetPVarInt(playerid, "neon1"));
                              DeletePVar(playerid, "Status");
                             
                              SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
                              SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0));
                              AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                              AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     }
                     case 1:
                     {
                              DestroyObject(GetPVarInt(playerid, "neon"));
                              DeletePVar(playerid, "Status");
                              DestroyObject(GetPVarInt(playerid, "neon1"));
                              DeletePVar(playerid, "Status");
                             
                              SetPVarInt(playerid, "neon", CreateObject(18647,0,0,0,0,0,0));
                              SetPVarInt(playerid, "neon1", CreateObject(18647,0,0,0,0,0,0));
                              AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                              AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     }
                     case 2:
                     {
                              DestroyObject(GetPVarInt(playerid, "neon"));
                              DeletePVar(playerid, "Status");
                              DestroyObject(GetPVarInt(playerid, "neon1"));
                              DeletePVar(playerid, "Status");
                             
                              SetPVarInt(playerid, "neon", CreateObject(18649,0,0,0,0,0,0));
                              SetPVarInt(playerid, "neon1", CreateObject(18649,0,0,0,0,0,0));
                              AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                              AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     }
                     case 3:
                     {
                              DestroyObject(GetPVarInt(playerid, "neon"));
                              DeletePVar(playerid, "Status");
                              DestroyObject(GetPVarInt(playerid, "neon1"));
                              DeletePVar(playerid, "Status");
                             
                              SetPVarInt(playerid, "neon", CreateObject(18652,0,0,0,0,0,0));
                              SetPVarInt(playerid, "neon1", CreateObject(18652,0,0,0,0,0,0));
                              AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                              AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     }
                     case 4:
                     {
                              DestroyObject(GetPVarInt(playerid, "neon"));
                              DeletePVar(playerid, "Status");
                              DestroyObject(GetPVarInt(playerid, "neon1"));
                              DeletePVar(playerid, "Status");
                             
                              SetPVarInt(playerid, "neon", CreateObject(18651,0,0,0,0,0,0));
                              SetPVarInt(playerid, "neon1", CreateObject(18651,0,0,0,0,0,0));
                              AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                              AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     }
                     case 5:
                     {
                              DestroyObject(GetPVarInt(playerid, "neon"));
                              DeletePVar(playerid, "Status");
                              DestroyObject(GetPVarInt(playerid, "neon1"));
                              DeletePVar(playerid, "Status");
                             
                              SetPVarInt(playerid, "neon", CreateObject(18650,0,0,0,0,0,0));
                              SetPVarInt(playerid, "neon1", CreateObject(18650,0,0,0,0,0,0));
                              AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                              AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     }
                     case 6:
                     {
                              DestroyObject(GetPVarInt(playerid, "neon"));
                              DeletePVar(playerid, "Status");
                              DestroyObject(GetPVarInt(playerid, "neon1"));
                              DeletePVar(playerid, "Status");
                     }
               }
         }
    }
    return 1;
}
public OnPlayerGeoIP(playerid, ip[], cidade[], estado[], pais[], provedora[])
{
    format(dstring, sizeof dstring, "{00FF00}.:LPD:. %s entrou no servidor.(Estado:%s)(Cidade:%s)", Nome(playerid), estado, cidade);
    SendClientMessageToAll(-1, dstring);
   
    format(PlayerInfo[playerid][pCity], 20, cidade);
    return true;
}
forward MSGDS(playerid);
public MSGDS(playerid)
{
    new Don[80];
    format(Don, sizeof Don,#%s, MinhasMensagens[random(sizeof(MinhasMensagens))]);
    TextDrawSetString(PlayerText[playerid][MSG], Don);
    return true;
}
forward Admin(playerid);
public Admin(playerid)
{
    new Don[80];
    TextDrawShowForPlayer(playerid, PlayerText[playerid][pAdm]);
    format(Don, sizeof Don,#~r~Temos ~w~%d~r~ administradores online, ADMS);
    TextDrawSetString(PlayerText[playerid][pAdm], Don);
   
    new mes, ano, dia, horas, minutos, segundos;
    getdate(ano, mes, dia);
    gettime(horas,minutos,segundos);
   
    format(Don, sizeof Don,#~w~%d/%d/%d - %d:%d:%d, dia,mes,ano,horas,minutos,segundos);
    TextDrawSetString(PlayerText[playerid][Reg], Don);
   
    format(Don, sizeof Don,#Drift: ~w~%d Pts, PlayerInfo[playerid][pPoint]);
    TextDrawSetString(PlayerText[playerid][Pts], Don);
   
    format(Don, sizeof Don,#Score: ~w~%d Pts, PlayerInfo[playerid][pScore]);
    TextDrawSetString(PlayerText[playerid][SCP], Don);
   
    if(!IsPlayerInAnyVehicle(playerid)) return true;
    RepairVehicle(GetPlayerVehicleID(playerid));
    AddVehicleComponent(GetPlayerVehicleID(playerid) ,1010);
   
    SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
   
    if(GetPlayerPing(playerid) > Ping)
    {
           SendClientMessage(playerid, -1, ".:LPD:. Ping a ssima do permitido!");
           DSKick(playerid);
    }
    return true;
}
forward DriftEarn(playerid,  score);
public DriftEarn(playerid,  score)
{
    playerDrift [playerid] += score;
    new aa[25];
    switch(playerDrift [playerid])
    {
            case 000 .. 500:          aa = "~r~Drift";
            case 501 .. 900:          aa = "~r~Good Drift";
            case 901 .. 1200:         aa = "~r~Great Drift";
            case 1201 .. 3800:        aa = "~r~SUPER DRIFT!";
            case 3801 .. 6000:        aa = "~r~COLOSSAL DRIFT!";
            case 6001 .. 20000:       aa = "~r~OUTRAGEOUS DRIFT!";
            case 20001 .. 40000:      aa = "~r~INSANE DRIFT!";
            default:                  aa = "~r~DRIFT KING!";
    }
   
    format(dstring, sizeof dstring, "%0d  %s", playerDrift [playerid], aa);
    TextDrawSetString(PlayerText[playerid][DRP], dstring);
   
    PlayerInfo[playerid][pScore] += playerDrift[playerid]/100;
    PlayerInfo[playerid][pPoint] += playerDrift[playerid];
   
    KillTimer(bruno[playerid]);
   
    bruno[playerid] = SetTimerEx("DriftCheck", 1700, false, "d", playerid);
   
    return true;
}
forward DriftCheck(playerid);
public DriftCheck(playerid)
{
    if(PlayerInfo[playerid][pLog] == false)return true;
   
    format(dstring, sizeof dstring, "~w~Pontos Ranking: ~r~%d",PlayerInfo[playerid][pScore]);
    TextDrawSetString(PlayerText[playerid][DRP], dstring);
   
    Sumir[playerid] = SetTimerEx("ExitText", 2000, false, "d", playerid);
   
    playerDrift[playerid] = 0;
    return true;
}
forward ExitText(playerid);
public ExitText(playerid)
{
     TextDrawSetString(PlayerText[playerid][DRP], " ");
     KillTimer(Sumir[playerid]);
     return true;
}
forward DriftCounter();
public DriftCounter()
{
    for (new i; i != MAX_PLAYERS; i++) {
        if(IsPlayerInAnyVehicle(i)) {
                new vehicleid = GetPlayerVehicleID(i);
                new Float:x, Float:y, Float:z;
                GetVehicleVelocity(vehicleid, x, y, z);
                new speed = floatround(floatsqroot(x*x+y*y+z*z)*200.0);
                if(speed > 1.0) {
                    new radianos = floatround( atan2( y, x ) );
                    if(radianos > 400) radianos -= 400;
                    switch(radianos) {
                        case 090 .. 180: radianos -= 90;
                        case 181 .. 360: radianos += 90;
                        default: radianos += 270;
                    }
                    static  Float: angle;
                    GetVehicleZAngle(vehicleid, angle);
                    radianos = floatround( floatabs( radianos - angle ) );
                    if(radianos > 180) {
                        radianos = floatround( floatabs ( radianos - 360 ) );
                    }
                    new key[3];
                    GetPlayerKeys(i, key[0], key[1], key[2]);
                    if( key[0] != 32 && speed > 10) {
                        if( radianos > 3 && ((radianos * speed) / 30)  < 300) {
                            DriftEarn(i, (radianos * speed) / 35 ) ;
                        }
                    }
                }
        }
    }
    return true;

}
// ************************ By DonSpeed ****************************************
// ********************** Comandos  admins *************************************
// ************************ By DonSpeed ****************************************
command(ajudaadm, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] == 0)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo й administrador!");

     new speed[300], Don[100];
     
     format(Don,sizeof(Don),"|Level 1| /a /players / kick /ir /trazer /tapa\n\n");
     strcat(speed, Don);
     format(Don,sizeof(Don),"|Level 2| /ao /limparchat /rc /vidatodos /coletetodos\n\n");
     strcat(speed, Don);
     format(Don,sizeof(Don),"|Level 3| /kicktodos /gmx /limitarping\n\n");
     strcat(speed, Don);
     format(Don,sizeof(Don),"{FF0000}|Don_Speed| /daradmin  \n\n");
     strcat(speed, Don);
     
     ShowPlayerDialog(playerid, DIALOG_AJUDADM, DIALOG_STYLE_MSGBOX, "Ajuda Administradores", speed, "Fechar", "");
     return true;
}
command(a, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] == 0)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo й administrador!");
     if(sscanf(params, "s[100]",params)) return SendClientMessage(playerid,-1,".:Uso:. /a [texto]");
     format(dstring, sizeof dstring ,"Admin %s [%d]- %s.", Nome(playerid), playerid, params);

     for(new i=0; i<MAX_PLAYERS; i++)
       if(PlayerInfo[i][pAdmin] == PlayerInfo[playerid][pAdmin])
            SendClientMessage( i , COLOR_AMARELO , dstring);
     return true;
}
command(players, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] == 0)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo й administrador!");
     new ON;
     for(new i; i != MAX_PLAYERS; ++i) {
        if(IsPlayerConnected(i)) {
            if(PlayerInfo[i][pLog] == true) {
                 ON++;
                 format(dstring, sizeof dstring,".:LPD:. Temos %d jogadores online .", ON);
                 SendClientMessageToAll(COLOR_AMARELO, dstring);
            }
        }
     }
     return true;
}
command(kick, playerid, params[])
{
      if(PlayerInfo[playerid][pAdmin] == 0)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo й administrador!");
      if(sscanf(params, "us[50]", ID, params)) return SendClientMessage(playerid,-1,".:Use:. /kickar [id][motivo]");
      if(!IsPlayerConnected(ID))return SendClientMessage(playerid,-1,".:Erro:. Jogador offline !");
      format(dstring, sizeof dstring ,".:LPD:. %s foi chutado do servidor por %s .Motivo: %s", Nome(ID), Nome(playerid), params);
      SendClientMessageToAll(COLOR_AZULFRACO, dstring);
      DSKick(ID);
      return true;
}
command(ir, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] == 0)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo й administrador!");
     if(sscanf(params, "u", ID)) return SendClientMessage(playerid,-1,".:Use:. /ir [id]");
     if(!IsPlayerConnected(ID))return SendClientMessage(playerid,-1,".:Erro:. Jogador offline !");
     new Float:Pos[3];
     GetPlayerPos(ID, Pos[0], Pos[1], Pos[2]), SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
     new VehicleID = GetPlayerVehicleID(playerid); SetVehiclePos(VehicleID,Pos[0], Pos[1], Pos[2]);
     return true;
}
command(trazer, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] == 0)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo й administrador!");
     if(sscanf(params, "u", ID)) return SendClientMessage(playerid,-1,".:Use:. /trazer [id]");
     if(!IsPlayerConnected(ID))return SendClientMessage(playerid,-1,".:Erro:. Jogador offline !");
     new Float:Pos[3];
     GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]), SetPlayerPos(ID, Pos[0], Pos[1], Pos[2]);
     new VehicleID = GetPlayerVehicleID(ID); SetVehiclePos(VehicleID, Pos[0], Pos[1], Pos[2]);
     return true;
}
command(tapa, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] == 0)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo й administrador!");
     if(sscanf(params, "u", ID)) return SendClientMessage(playerid,-1,".:Use:. /tapa [id]");
     if(!IsPlayerConnected(ID))return SendClientMessage(playerid,-1,".:Erro:. Jogador offline !");
     new Float:Pos[3];
     GetPlayerPos(ID, Pos[0], Pos[1], Pos[2]), SetPlayerPos(ID, Pos[0], Pos[1], Pos[2]+20);
     format(dstring, sizeof dstring ,".:LPD:. %s levou um tapa de %s .", Nome(ID), Nome(playerid));
     SendClientMessageToAll(COLOR_AZULFRACO, dstring);
     return true;
}
command(ao, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] < 2)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo tem nivel suficiente!");
     if(sscanf(params, "s[50]", params)) return SendClientMessage(playerid,-1,".:Use:. /ao [texto]");
     format(dstring, sizeof dstring,"~w~%s ~r~%s.", Nome(playerid), params);
     GameTextForAll(dstring, 3000, 3);
     return true;
}
command(limparchat, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] < 2)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo tem nivel suficiente!");
     for(new b = 0; b <= 300; b++) SendClientMessageToAll(-1, ""); GameTextForPlayer(playerid,"~r~Chat Limpo", 3000 , 3);
     return true;
}
command(rc, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] < 2)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo tem nivel suficiente!");
     for(new i=0; i<MAX_VEHICLES; i++) {
             SetVehicleToRespawn(i);
     }
     format(dstring, sizeof dstring ,".:LPD:. Veнculos resetados por %s.", Nome(playerid));
     SendClientMessageToAll(COLOR_AZULFRACO, dstring);
     return true;
}
command(vidatodos, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] < 2)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo tem nivel suficiente!");
     for(new i=0; i<MAX_PLAYERS; i++) SetPlayerHealth(i, 100);
     format(dstring, sizeof dstring ,".:LPD:. Health enchido por %s.", Nome(playerid));
     SendClientMessageToAll(COLOR_AZULFRACO, dstring);
     return true;
}
command(coletetodos, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] < 2)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo tem nivel suficiente!");
     for(new i=0; i<MAX_PLAYERS; i++) SetPlayerArmour(i, 100);
     format(dstring, sizeof dstring ,".:LPD:. Armour enchido por %s.", Nome(playerid));
     SendClientMessageToAll(COLOR_AZULFRACO, dstring);
     return true;
}
command(kicktodos, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] < 3)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo tem nivel suficiente!");
     format(dstring, sizeof dstring ,".:LPD:. Todos foram chutados do servidor por %s.", Nome(playerid));
     SendClientMessageToAll(COLOR_AZULFRACO, dstring);
     for(new i=0; i<MAX_PLAYERS; i++) DSKick(i);
     return true;
}
command(gmx, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] < 3)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo tem nivel suficiente!");
     GameTextForAll("~r~Reiniciando Servidor", 5000,3);  SendRconCommand("gmx");
     return true;
}
command(nomeservidor, playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] == 0)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo й administrador!");
     if(sscanf(params, "s[20]", params)) return SendClientMessage(playerid,-1,".:Use:. /nomeservidor [texto]");
     format(dstring, sizeof dstring,"hostname %s [By %s]", params, Nome(playerid));
     SendRconCommand(dstring);
     format(dstring, sizeof dstring,".:LPD:. %s mudou o nome do servidor para [%s]", Nome(playerid), params);
     SendClientMessageToAll(COLOR_AZULFRACO, dstring);
     return true;
}
command(limitarping, playerid, params[])
{
     new Number;
     if(PlayerInfo[playerid][pAdmin] == 0)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo й administrador!");
     if(sscanf(params, "d", Number)) return SendClientMessage(playerid,-1,".:Use:. /limitarping [limite]");
     format(dstring, sizeof dstring,".:LPD:. %s mudou o limite maximo do ping para [%d].", Nome(playerid), Number);
     SendClientMessageToAll(COLOR_AZULFRACO, dstring);
     Ping = Number;
     return true;
}
command(daradmin, playerid, params[])
{
     if ( strcmp ( Nome(playerid) , "Don_Speed" , true ) == 0 )
     {
           if(sscanf(params, "u", ID)) return SendClientMessage(playerid,-1,".:Use:. /daradmin [id]");
           if(!IsPlayerConnected(ID))return SendClientMessage(playerid,-1,".:Erro:. Jogador offline !");
           switch(PlayerInfo[ID][pAdmin])
           {
               case 0:PlayerInfo[ID][pAdmin]++;
               case 1:PlayerInfo[ID][pAdmin]++;
               case 2:PlayerInfo[ID][pAdmin]++;
           }
           format(dstring, sizeof dstring,".:LPD:. %s virou %s . By %s", Nome(ID), ANome[PlayerInfo[ID][pAdmin]], Nome(playerid));
           SendClientMessageToAll(COLOR_AZULFRACO, dstring);
     } else SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo tem nivel suficiente!");
     return true;
}
// ************************ By DonSpeed ****************************************
// ********************** Comandos players *************************************
// ************************ By DonSpeed ****************************************
command(reidoscore, playerid, params[])
{
     new DDS[230];
     for(new i; i <= MAX_PLAYERS; ++i)
     {
        if(PlayerInfo[i][pScore] >= PlayerInfo[i][pScore])
        {
             format(DDS, sizeof DDS,"{00FF00}[1°]{000FFF} %s {FFFFFF}-{FF0000} %d {FFFFFF}Pontos\n", Nome(i), PlayerInfo[i][pScore]);
             break;
        }
     }
     ShowPlayerDialog(playerid, DIALOG_RANK, DIALOG_STYLE_MSGBOX, "Rank", DDS, "Fechar", "");
     return true;
}
command(reidodrift, playerid, params[])
{
     new DDS[230];
     for(new i; i <= MAX_PLAYERS; ++i)
     {
        if(PlayerInfo[i][pPoint] >= PlayerInfo[i][pPoint])
        {
             format(DDS, sizeof DDS,"{00FF00}[1°]{000FFF} %s {FFFFFF}-{FF0000} %d {FFFFFF}Pontos\n", Nome(i), PlayerInfo[i][pPoint]);
             break;
        }
     }
     ShowPlayerDialog(playerid, DIALOG_RANK, DIALOG_STYLE_MSGBOX, "Rank", DDS, "Fechar", "");
     return true;
}
command(admins, playerid, params[])
{
    if(PlayerInfo[playerid][pLog] == false)return true;
    for(new i; i != MAX_PLAYERS; ++i) {
        if(PlayerInfo[i][pAdmin] >= 1) {
            format(dstring, sizeof (dstring),"- %s [Nivel: %d]\n", Nome(i), PlayerInfo[playerid][pAdmin]);
        }
    }
    ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "Administradores online", dstring, "Fechar", "");
    return true;
}
command(par, playerid, params[])
{
     if(PlayerInfo[playerid][pLog] == false)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo tem conta para mandar mp!");
     if(sscanf(params, "us[50]", ID, params)) return SendClientMessage(playerid,-1,".:Use:. /par [id][texto]");
     if(!IsPlayerConnected(ID))return SendClientMessage(playerid,-1,".:Erro:. Jogador offline !");
     if(ID == playerid)return true;
     format(dstring, sizeof dstring,"[PAR] de %s -> %s .", Nome(playerid), params);
     SendClientMessage(ID, -1, dstring);
     GameTextForPlayer(playerid, "MSG Enviada", 3000, 5), GameTextForPlayer(ID, "MSG Recebida", 3000, 5);
     return true;
}
command(reportar, playerid, params[])
{
     if(PlayerInfo[playerid][pLog] == false)return SendClientMessage(playerid, -1, ".:Erro:. Vocк nгo tem conta para reportar alguem!");
     if(sscanf(params, "us[50]", ID, params)) return SendClientMessage(playerid,-1,".:Use:. /reportar [id][motivo]");
     if(!IsPlayerConnected(ID))return SendClientMessage(playerid,-1,".:Erro:. Jogador offline !");
     if(ID == playerid)return true;
     format(dstring, sizeof dstring,".:DENUNCIA:. %s denuncia %s . Motivo: %s", Nome(playerid), Nome(ID), params);
     for(new i, p = GetMaxPlayers(); i < p; i++) if(PlayerInfo[i][pAdmin] != 0) SendClientMessage(i, COLOR_RED, dstring);
     GameTextForPlayer(playerid, "Denuncia concluida", 3000, 5);
     return true;
}
command(virar, playerid, params[])
{
     if(!IsPlayerInAnyVehicle(playerid))return true;
     new Float:x = 0.0, Float:y = 0.0, Float:z = 0.0;
     if(IsPlayerInAnyVehicle(playerid)) SetCameraBehindPlayer(playerid);
     GetPlayerPos(playerid, x, y, z), SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z), SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
     SendClientMessage(playerid, -1, ".:LPD:. Veнculo virado com sucesso.");
     return true;
}
command(contato, playerid, params[])
{
    format(dstring , sizeof dstring,"Loucos por Drift - Oficial\n\nCriador do GM: Don_Speed\n\nContato via skype:maurilio.don\n\n");
    ShowPlayerDialog(playerid, DIALOG_CONTATO, DIALOG_STYLE_MSGBOX, "Contato", dstring, "Ok","");
    return true;
}
command(registrar, playerid, params[])
{
    PlayersOn--;
    SetPlayerName(playerid,PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pLog] = false;
    SetPlayerHealth(playerid, 0);
    OnPlayerConnect(playerid);
    return true;
}
command(neon, playerid, params[])
{
    if(IsPlayerInAnyVehicle(playerid))return ShowPlayerDialog(playerid, DIALOG_NEON, DIALOG_STYLE_LIST, "Neon cores", "Azul\nVermelho\nVerde\nBranco\nRosa\nAmarelo\nRemover neon", "Colocar", "");
    return true;
}
new Cont = 4;
command(contar, playerid, params[])
{
    PlayerInfo[playerid][pCont] = SetTimer("IniciarContagem", 1000, true);
    format(dstring, sizeof dstring,".:LPD:. %s inнciou uma contagem .", Nome(playerid));
    SendClientMessageToAll(COLOR_AZULFRACO, dstring);
    return true;
}
forward IniciarContagem(playerid);
public IniciarContagem(playerid)
{
    Cont --;
    switch(Cont)
    {
        case 0:GameTextForAll("~r~Go~g~Go~b~Go", 1000, 3);
        case 1:GameTextForAll("~b~1", 1000, 3);
        case 2:GameTextForAll("~g~2", 1000, 3);
        case 3:GameTextForAll("~r~3", 1000, 3);
    }
    KillTimer(PlayerInfo[playerid][pCont]);
    return true;
}
command(ajuda, playerid, params[])
{
    new speed[300], Don[100];
         
    format(Don,sizeof(Don),"                  /reidoscore /reidodrift /neon \n\n");
    strcat(speed, Don);
    format(Don,sizeof(Don),"                  /admins /par /contato \n\n");
    strcat(speed, Don);
    format(Don,sizeof(Don),"                  /reportar /virar /registrar \n\n");
    strcat(speed, Don);
    format(Don,sizeof(Don),"                  /temperatura /kill \n\n");
    strcat(speed, Don);
    ShowPlayerDialog(playerid, DIALOG_AJUDAPL, DIALOG_STYLE_MSGBOX, "Ajuda Players", speed, "Fechar", "");
    return true;
}
command(temperatura, playerid, params[])return PegarTemperatura(playerid, PlayerInfo[playerid][pCity]);
command(kill, playerid, params[])return SendClientMessage(playerid, -1, ".:LPD:. Vocк se matou."), SetPlayerHealth(playerid, 0);
// ************************ By DonSpeed ****************************************
// ************************ Temperatura ****************************************
// ************************ By DonSpeed ****************************************
PegarTemperatura(playerid, cidade[])
{
    for(new i; cidade[i] ; i++)
        if ( cidade[i] == ' ' )
            cidade[i] = '-';

    new str[256];
    format(str, 256, "brunosilva.net16.net/wheater.php?cidade=%s", cidade);
    HTTP(playerid, HTTP_GET, str, "\0", "RetornarTemperatura");

    return true ;
}
forward RetornarTemperatura( playerid, retorno, dados[]);
public RetornarTemperatura( playerid, retorno, dados[]) {

    if(retorno == 200) {

        dados[strfind(dados, "<!-- Hosting24 Analytics Code -->")] = 0;
        new str[128];
        format(str, 128, ".:LPD:.Sua cidade estб com temperatura de %s.", dados);
        SendClientMessage(playerid, COR_CINZA, str);
    }
    return true;
}
// ************************ By DonSpeed ****************************************
// ************************** Stocks *******************************************
// ************************ By DonSpeed ****************************************
stock Nome(playerid)
{
    new DSName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, DSName, sizeof DSName);
    return DSName;
}
stock IsVehicleOccupied(vehicleid)
{
        for (new i = 0; i < MAX_PLAYERS; i++)
        if (IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER) return 1;
        return 0;
}
forward DSKick(id);
public DSKick(id)return SetTimerEx("Kick2Porra", 1000, true, "d", id);
forward Kick2Porra(id);
public Kick2Porra(id)return Kick(id);

Creditos
Don_Speed
IpsBruno

Reply
#2

Parabйns уtimo gamemode .

Sу acho que isso aqui nгo iria funcionar corretamente

pawn Код:
command(reidoscore, playerid, params[])
{
     new DDS[230];
     for(new i; i <= MAX_PLAYERS; ++i)
     {
        if(PlayerInfo[i][pScore] >= PlayerInfo[i][pScore])
        {
             format(DDS, sizeof DDS,"{00FF00}[1°]{000FFF} %s {FFFFFF}-{FF0000} %d {FFFFFF}Pontos\n", Nome(i), PlayerInfo[i][pScore]);
             break;
        }
     }
     ShowPlayerDialog(playerid, DIALOG_RANK, DIALOG_STYLE_MSGBOX, "Rank", DDS, "Fechar", "");
     return true;
}
command(reidodrift, playerid, params[])
{
     new DDS[230];
     for(new i; i <= MAX_PLAYERS; ++i)
     {
        if(PlayerInfo[i][pPoint] >= PlayerInfo[i][pPoint])
        {
             format(DDS, sizeof DDS,"{00FF00}[1°]{000FFF} %s {FFFFFF}-{FF0000} %d {FFFFFF}Pontos\n", Nome(i), PlayerInfo[i][pPoint]);
             break;
        }
     }
     ShowPlayerDialog(playerid, DIALOG_RANK, DIALOG_STYLE_MSGBOX, "Rank", DDS, "Fechar", "");
     return true;
}
iria mostrar o nick do ultimo id
Reply
#3

Quote:
Originally Posted by Supera
Посмотреть сообщение
Parabйns уtimo gamemode .

Sу acho que isso aqui nгo iria funcionar corretamente

pawn Код:
command(reidoscore, playerid, params[])
{
     new DDS[230];
     for(new i; i <= MAX_PLAYERS; ++i)
     {
        if(PlayerInfo[i][pScore] >= PlayerInfo[i][pScore])
        {
             format(DDS, sizeof DDS,"{00FF00}[1°]{000FFF} %s {FFFFFF}-{FF0000} %d {FFFFFF}Pontos\n", Nome(i), PlayerInfo[i][pScore]);
             break;
        }
     }
     ShowPlayerDialog(playerid, DIALOG_RANK, DIALOG_STYLE_MSGBOX, "Rank", DDS, "Fechar", "");
     return true;
}
command(reidodrift, playerid, params[])
{
     new DDS[230];
     for(new i; i <= MAX_PLAYERS; ++i)
     {
        if(PlayerInfo[i][pPoint] >= PlayerInfo[i][pPoint])
        {
             format(DDS, sizeof DDS,"{00FF00}[1°]{000FFF} %s {FFFFFF}-{FF0000} %d {FFFFFF}Pontos\n", Nome(i), PlayerInfo[i][pPoint]);
             break;
        }
     }
     ShowPlayerDialog(playerid, DIALOG_RANK, DIALOG_STYLE_MSGBOX, "Rank", DDS, "Fechar", "");
     return true;
}
iria mostrar o nick do ultimo id
pawn Код:
if(PlayerInfo[i][pPoint] >= PlayerInfo[i][pPoint])
Reply
#4

Legal Cara. Bom Gm.

Podia Caprichar bem Mais.

Ordem Exelente.
Reply
#5

Muito bom.

Eu gosto do ordem o script.
Reply
#6

Os principais sistemas jб tem, parabйns.
Belo gamemode e tambйm a organizaзгo fico topee =)
Reply
#7

Gostei tambem
Reply
#8

Valeu pessoal!
Reply
#9

Bacana, sу faltou o principal que й os mapas mais mesmo assim muito bom.
Reply
#10

Quote:
Originally Posted by Delete_
View Post
Bacana, sу faltou o principal que й os mapas mais mesmo assim muito bom.
Ultimamente, os jogadores de servidores de drift, nгo gostam de muitos mapas, o bбsico para eles(teleportes por San Andreas), jб й o suficiente para a sua diversгo(gravar videos, etc).

@Topic

Bom GameMode .
Reply
#11

Realmente o povo nгo usa muito as pistas !
Reply
#12

Muito bom gm de drift
Code:
++rep;
fail
Code:
You must spread some Reputation around before giving it to Don_Speed again
Reply
#13

Quote:
Originally Posted by Supera
Посмотреть сообщение
Parabйns уtimo gamemode .

Sу acho que isso aqui nгo iria funcionar corretamente

pawn Код:
command(reidoscore, playerid, params[])
{
     new DDS[230];
     for(new i; i <= MAX_PLAYERS; ++i)
     {
        if(PlayerInfo[i][pScore] >= PlayerInfo[i][pScore])
        {
             format(DDS, sizeof DDS,"{00FF00}[1°]{000FFF} %s {FFFFFF}-{FF0000} %d {FFFFFF}Pontos\n", Nome(i), PlayerInfo[i][pScore]);
             break;
        }
     }
     ShowPlayerDialog(playerid, DIALOG_RANK, DIALOG_STYLE_MSGBOX, "Rank", DDS, "Fechar", "");
     return true;
}
command(reidodrift, playerid, params[])
{
     new DDS[230];
     for(new i; i <= MAX_PLAYERS; ++i)
     {
        if(PlayerInfo[i][pPoint] >= PlayerInfo[i][pPoint])
        {
             format(DDS, sizeof DDS,"{00FF00}[1°]{000FFF} %s {FFFFFF}-{FF0000} %d {FFFFFF}Pontos\n", Nome(i), PlayerInfo[i][pPoint]);
             break;
        }
     }
     ShowPlayerDialog(playerid, DIALOG_RANK, DIALOG_STYLE_MSGBOX, "Rank", DDS, "Fechar", "");
     return true;
}
iria mostrar o nick do ultimo id
Mesmo se nгo houvesse erros anteriores de coerencia nгo iria mostrar o nick do ultimo jogador, mas sim o score do prуximo jogador que supere o anterior. Tambйm nгo se pode dar break em um loop de busca, pois ele estб buscando o score mais alto em TODOS os players.

O que matou a pau esse code foi...
pawn Код:
PlayerInfo[i][pPoint] >= PlayerInfo[i][pPoint]
Й obvio que PlayerInfo[i][pPoint] >= PlayerInfo[i][pPoint] sempre serб verdadeiro.
Reply
#14

Parabйns !! Bom gm !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)