[GameMode] Guerra PM vs Traficantes.
#1

Oi. Estou disponibilizando para download, meu Game mode, feito 100 % Por mim, Que comecei a criar do 0.

Nгo nada de Inovador, e й super bбsico. Pois sou Iniciante em Pawn.

Na verdade, esse "GM" foi sу para eu testar algumas coisas. O importante, й que eu aprendi xD.

Ta ai o GM :


pawn Код:
#include <a_samp>
#include <zcmd>
//------------------------------------------------------------------------------
#define TIME_LADRAO                 (1)
#define TIME_POLICIA                (2)
#define JSF 123 // Dialog's
#define printf("Time %d", GetPlayerTeam(playerid)) // Define
//------------------------------------------------------------------------------
#define VERDE                   0x21DD00FF
#define VERMELHO                0xFF030FFF
#define VERMELHO_ESCURO         0xE60000FF
#define VERMELHO_CLARO          0xFB0000FF
#define AMARELO                 0xFFFF00FF
#define LARANJA                 0xF97804FF
#define AZUL_CLARO              0x00C2ECFF
#define ROXO                    0xB360FDFF
#define BRANCO                  0xFFFFFFFF
#define PRETO                   0x000000FF
#define AZUL                    0x1229FAFF
#define VERDE_CLARO             0x38FF06FF
#define ROSA_CHOQUE             0xE100E1FF
#define VERDE_ESCURO            0x008040FF
#define CINZA                   0xCECECEFF
#define ROSA                    0xD52DFFFF
#define CINZA_ESCURO            0x626262FF
#define VERDE_AGUA              0x03D687FF
//------------------------------------------------------------------------------
new EquiparLad; // PickUp
new EquiparPol; // PickUp
new CarrosPM [8]; // Carros da PM
new CarrosFav [8];
new GZLAD; // GangZone dos Ladrхes
new GZPOL; // GangZone dos PM
//------------------------------------------------------------------------------
main()
{
    print("\n---------------------------------");
    print(" Gamemode Feito Por Lucas Emmanuel ");
    print("---------------------------------\n");
}
//------------------------------------------------------------------------------
public OnGameModeInit()
{
    GZPOL = GangZoneCreate(1524.091, -1701.601, 1680.007, -1579.221);
    GZLAD = GangZoneCreate(2212.404, -1160.76, 2375.926, -979.1639);
//------------------------------------------------------------------------------
    Create3DTextLabel("Posto Policia Militar",AZUL,1544.1912,-1631.8890,13.3828,60.0,0,0);
    Create3DTextLabel("Armas do Contrabando",CINZA,2287.4285,-1081.0082,48.2432,60.0,0,0);
//------------------------------------------------------------------------------
    ShowPlayerMarkers(1);
    UsePlayerPedAnims();
    DisableInteriorEnterExits();
    SetGameModeText("Blank Script");
//------------------------------------------------------------------------------
    AddPlayerClassEx(TIME_LADRAO,47, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    AddPlayerClassEx(TIME_POLICIA,285, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
//------------------------------------------------------------------------------
    EquiparLad = CreatePickup(1239,1,2287.4285,-1081.0082,48.2432);
    EquiparPol = CreatePickup(1239,1,1544.1912,-1631.8890,13.3828);
//------------------------------------------------------------------------------
    CarrosPM[0] = AddStaticVehicleEx(497,1555.09997559,-1614.00000000,13.60000038,180.92755127,0,1,30); // Carro PM
    CarrosPM[1] = AddStaticVehicleEx(596,1573.69995117,-1622.90002441,13.19999981,88.19091797,0,1,30); // Carro PM
    CarrosPM[2] = AddStaticVehicleEx(596,1564.90002441,-1622.80004883,13.39999962,88.18725586,0,1,30); // Carro PM
    CarrosPM[3] = AddStaticVehicleEx(599,1568.40002441,-1606.30004883,13.80000019,179.98162842,0,1,30); // Carro PM
    CarrosPM[4] = AddStaticVehicleEx(599,1572.40002441,-1606.30004883,13.80000019,179.98162842,0,1,30); // Carro PM
    CarrosPM[5] = AddStaticVehicleEx(523,1557.40002441,-1636.00000000,13.19999981,0.00000000,0,1,30); // Carro PM
    CarrosPM[6] = AddStaticVehicleEx(523,1552.30004883,-1636.00000000,13.19999981,0.00000000,0,1,30); // Carro PM
    CarrosPM[7] = AddStaticVehicleEx(523,1554.90002441,-1635.90002441,13.19999981,0.00000000,0,1,30); // Carro PM
//------------------------------------------------------------------------------
    CarrosFav[0] = AddStaticVehicleEx(560,2304.60009766,-1084.59997559,48.20000076,347.27148438,44,1,30); // Carro Favela
    CarrosFav[1] = AddStaticVehicleEx(560,2300.39990234,-1083.80004883,47.90000153,347.26684570,44,1,30); // Carro Favela
    CarrosFav[2] = AddStaticVehicleEx(522,2282.10009766,-1082.40002441,47.29999924,337.27038574,44,1,30); // Carro Favela
    CarrosFav[3] = AddStaticVehicleEx(522,2300.60009766,-1055.50000000,49.20000076,337.26928711,44,1,30); // Carro Favela
    CarrosFav[4] = AddStaticVehicleEx(522,2287.30004883,-1049.80004883,49.20000076,337.26928711,44,1,30); // Carro Favela
    CarrosFav[5] = AddStaticVehicleEx(560,2355.19995117,-1047.19995117,53.90000153,10.90551758,44,1,30); // Carro Favela
    CarrosFav[6] = AddStaticVehicleEx(522,2373.69995117,-1035.59997559,53.90000153,337.26928711,44,1,30); // Carro Favela
    CarrosFav[7] = AddStaticVehicleEx(522,2276.80004883,-1076.80004883,47.40000153,337.26928711,44,1,30); // Carro Favela
//------------------------------------------------------------------------------
    CreateObject(3279,2267.89990234,-1028.30004883,58.29999924,0.00000000,0.00000000,225.44062805); // Torre Favela
//------------------------------------------------------------------------------
    CreateObject(1594,1543.19995117,-1614.40002441,12.89999962,0.00000000,0.00000000,0.00000000); // Objeto HQ PM
    CreateObject(1594,1543.40002441,-1605.09997559,12.89999962,0.00000000,0.00000000,0.00000000); // Objeto HQ PM
    CreateObject(1594,1543.30004883,-1609.80004883,12.89999962,0.00000000,0.00000000,0.00000000); // Objeto HQ PM
    CreateObject(2370,1541.09997559,-1616.90002441,12.39999962,0.00000000,0.00000000,0.00000000); // Objeto HQ PM
    CreateObject(2232,1541.50000000,-1616.59997559,13.80000019,0.00000000,0.00000000,129.10424805); // Objeto HQ PM
    CreateObject(1775,1540.40002441,-1612.50000000,13.50000000,0.00000000,0.00000000,90.00927734); // Objeto HQ PM
//------------------------------------------------------------------------------
    return 1;
}
//------------------------------------------------------------------------------
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
     if(!success)
     {
            SendClientMessage(playerid,VERDE_CLARO, "[x] O Comando Nгo Existe.");
            return 1;
     }
     return 1;
}
//------------------------------------------------------------------------------
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new VehID = GetPlayerVehicleID(playerid);
    if(newstate == PLAYER_STATE_DRIVER)
    {
        for(new vP = 0; vP < sizeof(CarrosPM); vP++)
        {
            if(VehID == CarrosPM[vP] && GetPlayerTeam(playerid) != 2)
            {
                SendClientMessage(playerid,VERDE_CLARO, "[x] Este Carro Nгo Pertence a sua Organizaзгo.");
                RemovePlayerFromVehicle(playerid);
            }
        }
        for(new vP = 0; vP < sizeof(CarrosFav); vP++)
        {
            if(VehID == CarrosFav[vP] && GetPlayerTeam(playerid) != 1)
            {
                SendClientMessage(playerid,VERDE_CLARO, "[x] Este Carro Nгo Pertence a sua Organizaзгo.");
                RemovePlayerFromVehicle(playerid);
            }
        }
    }
    return 1;
}
//------------------------------------------------------------------------------
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
         case 0:
         {
              SetPlayerTeam(playerid, TIME_LADRAO);
              GameTextForPlayer(playerid, "Traficantes", 2500, 3);
              SetPlayerColor(playerid,-1);
              SetSpawnInfo(playerid,TIME_LADRAO,115,2324.9663,-1048.3088,52.3516,82.7212,0,0,0,0,0,0);
              SetPlayerSkin(playerid,47);
         }
         case 1:
         {
              SetPlayerTeam(playerid, TIME_POLICIA);
              GameTextForPlayer(playerid, "Policiais", 2500, 3);
              SetPlayerColor(playerid,0x1229FAFF); // Azul
              SetSpawnInfo(playerid,TIME_POLICIA,284,1579.8406,-1634.5996,13.5622,85.5155,0,0,0,0,0,0);
              SetPlayerSkin(playerid,285);
         }

    }
//------------------------------------------------------------------------------
    SetPlayerPos(playerid, 1953.1321,-1363.1230,24.1484);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1953.1321,-1363.1230,24.1484);
    return 1;
}
//------------------------------------------------------------------------------
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    SendClientMessage(playerid,CINZA,"[x] Nгo Faзa DB ou Serб Severamente Punido.");
    return 1;
}
//------------------------------------------------------------------------------
CMD:compras(playerid)
{
    ShowPlayerDialog(playerid,JSF,DIALOG_STYLE_MSGBOX, "{0ECFE0}Lista de Compras", "{0EE015}Colete : {FFFFFF}/colete \n{E0890E}Sniper : {FFFFFF}/sniper", "Ok", "");
    return 1;
}

CMD:colete(playerid)
{
    if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid,VERMELHO,"[x] Vocк Nгo Tem R$: 500 Consigo.");
    SendClientMessage(playerid,LARANJA,"[x] Vocк Comprou um Colete Por R$: 500");
    SetPlayerArmour(playerid,100);
    GivePlayerMoney(playerid,-500);
    return 1;
}

CMD:sniper(playerid)
{
    if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid,VERMELHO,"[x] Vocк Nгo Tem R$: 1500 Consigo.");
    SendClientMessage(playerid,LARANJA,"[x] Vocк Comprou uma Sniper Por R$: 1500");
    GivePlayerWeapon(playerid,34,250);
    GivePlayerMoney(playerid,-1500);
    return 1;
}

CMD:creditos(playerid)
{
    SendClientMessage(playerid,VERDE_CLARO,"[x] Vocк Abre a Lista de Crйditos do Servidor");
    ShowPlayerDialog(playerid,JSF,DIALOG_STYLE_MSGBOX, "{0ECFE0}Lista de Crйditos", "{0EE015}GameMode : {FFFFFF}Lucas Emmanuel \n{E0890E}Mapper : {FFFFFF}Lucas Emmanuel", "Okay", "");
    return 1;
}
//------------------------------------------------------------------------------
public OnPlayerConnect(playerid)
{
    return 1;
}
//------------------------------------------------------------------------------
public OnPlayerSpawn(playerid)
{
    if(GetPlayerTeam(playerid) == TIME_POLICIA)
    ShowPlayerDialog(playerid,JSF,DIALOG_STYLE_MSGBOX, "{11E5D7}Informaзхes do Comando PM", " {1FE60D}Sargento ! Sua Missгo й Acabar com o Trбfico de Drogas \n No Morro Provocado pelo intenso nъmero de \n Traficantes, que ali dominam. Cusando muito sofrimento para \n Os civis, que ali moram, Pessoas de bem. \n Sua Missгo й eliminar os traficantes sem \n Prejudicar a Populaзгo. {FFFFFF}Boa Sorte !", "Sim Senhor", "");
   
    if(GetPlayerTeam(playerid) == TIME_LADRAO)
    ShowPlayerDialog(playerid,JSF,DIALOG_STYLE_MSGBOX, "{CD860A}Mensбgem do Chefe da Boca", " {0B81A5}Ai Rapaziada, eu to ligado que ta rolando mф treta ai no morro nй \n Mais vou logo dar o Papo Reto, Quem amarelar vai morrer \n Quero ver esses Cop Tudo Morto Tгo entendendo ? Й pra tacar tiro, usem as \n Casas, Subam nos Telhados, Mete Bala nesses verme ! \n O Comando ai й Nosso ! Quem Manda ai й Noix Caralho.", "Ja й Chefe", "");
   
    GangZoneShowForPlayer(playerid, GZLAD, VERDE_CLARO); // Traficantes
   
    GangZoneShowForPlayer(playerid, GZPOL, AZUL); // Policiais
   
    return 1;
}
//------------------------------------------------------------------------------
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
    {
        SetPlayerScore(killerid,1); // Ao matar o player ganha score
        GivePlayerMoney(killerid, 100); // Ao Matar Ganha 100 Conto
    }
    return 1;
}
//------------------------------------------------------------------------------
public OnPlayerPickUpPickup(playerid, pickupid) {
    if(pickupid == EquiparLad) {
    if(GetPlayerTeam(playerid) != TIME_LADRAO) return SendClientMessage(playerid,VERDE_CLARO, "[x] Vocк Nгo Pode Se Equipar Aqui.");
    SendClientMessage(playerid,AZUL_CLARO,"[x] Vocк recebeu as armas do Contrabando");
    SendClientMessage(playerid,LARANJA,"[x] Para Abrir a Lista de Compras Use :{FFFFFF} /compras");
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,24,250);
    GivePlayerWeapon(playerid,25,250);
    GivePlayerWeapon(playerid,30,250);
    GivePlayerWeapon(playerid,29,250);
    GivePlayerWeapon(playerid,5,1);
    }

    if(pickupid == EquiparPol) {
    if(GetPlayerTeam(playerid) != TIME_POLICIA) return SendClientMessage(playerid,VERDE_CLARO, "[x] Vocк Nгo Pode Se Equipar Aqui.");
    SendClientMessage(playerid,AZUL_CLARO,"[x] Vocк se Equipou no Posto da Policia Militar");
    SendClientMessage(playerid,LARANJA,"[x] Para Abrir a Lista de Compras Use :{FFFFFF} /compras");
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,24,250);
    GivePlayerWeapon(playerid,25,250);
    GivePlayerWeapon(playerid,31,250);
    GivePlayerWeapon(playerid,29,250);
    GivePlayerWeapon(playerid,3,1);
    }
    return 1;
}
//------------------------------------------------------------------------------

Sу copiar e colar.

Eu nгo botei no Paistban, por que era muito Pequeno.

Obrigado a Todos, aceito crнticas.
Reply
#2

Cуdigo ъtil.
Abraзos.
Reply
#3

Quote:
Originally Posted by AmericanStyle'™
Посмотреть сообщение
Cуdigo ъtil.
Abraзos.
filterscript
Reply
#4

Quote:
Originally Posted by BlackDonelly
Посмотреть сообщение
filterscript
Ainda vou postar um GameMode.
Abraзos.
Reply
#5

bom zin.
Reply
#6

Era meu GM kk
Reply
#7

Paistban kk?? pensei que era Pastebinkk

@GM n testei mais parece bem Funcional e Organizado
Reply
#8

Sу achei que ficou muito pouco tempo no respawn time dos veiculos fora isso otimo
Reply
#9

Isso da para se fazer em 1 hora, poderia melhorar mais para ter postado.
Reply
#10

PHP код:
SetPlayerScore(killerid1); 
PHP код:
SetPlayerScore(killeridGetPlayerScore(playerid) + 1); 
Para o seu primeiro projeto, estб razoбvel.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)