[AJUDA] Criando gangzones
#1

Olб pessoal, estou criando um servidor, jб aprendi bastante coisa do Pawn, mas eu gostaria da ajuda de vocкs com minhas Gangzones, olhem meu FS:
pawn Код:
#include <a_samp>

#define COR_TERRORISTAS 0xFFFFCCAA
#define COR_AGENTES 0xAFAFAFAA
#define COR_MAFIA 0x993300AA
#define COR_NINJAS 0xFFFF00AA
#define COR_ZOMBIES 0x999900AA
#define COR_PORCOS 0x2641FEAA
#define COR_MOTO 0xDEAD4370
#define COR_TRIAD 0xFF9933AA
#define COR_PIRI 0xFF66FFAA
#define COR_TRAFICANTES 0x33AA33AA

new TERRORISTAS;
new AGENTES;
new MAFIA;
new NINJAS;
new ZOMBIES;
new PORCOS;
new MOTOQUEIROS;
new TRIAD;
new PIRIGUETES;
new TRAFICANTES;
//GZ GENЙRICAS
new GOLF;
new AUTOESCOLA;
new PIRATA;
new CASINO;
new CASINODOIS;
new ULA;
new SHOP;
new BAIRROUM;
new BAIRRODOIS;
new BAIRROTRES;
new GEN;
new BASE;
new LUGARZIN;
new LOL;

public OnFilterScriptInit()
{
TERRORISTAS = GangZoneCreate(2493.657, 1624.109, 2661.565, 1937.422);
AGENTES = GangZoneCreate(2724.043, 1225.698, 2962.239, 1496.463);
MAFIA = GangZoneCreate(2071.934, 1550.615, 2290.605, 1763.359);
NINJAS = GangZoneCreate(2134.411, 1786.568, 2470.228, 1879.401);
ZOMBIES = GangZoneCreate(814.5728, 1960.63, 970.7667, 2181.11);
PORCOS = GangZoneCreate(2212.508, 2413.194, 2509.276, 2494.424);
MOTOQUEIROS = GangZoneCreate(1552.589, 2177.242, 1697.068, 2258.472);
TRIAD = GangZoneCreate(1798.594, 954.9333, 1974.312, 1090.316);
PIRIGUETES = GangZoneCreate(1915.74, 2123.089, 2091.458, 2192.715);
TRAFICANTES = GangZoneCreate(1333.917, 680.3007, 1536.969, 811.8149);
//GZ GENЙRICAS
GOLF = GangZoneCreate(1107.436, 2714.903, 1517.445, 2858.022);
AUTOESCOLA = GangZoneCreate(1002.005, 1217.962, 1173.819, 1364.948);
PIRATA = GangZoneCreate(1892.311, 1465.518, 2005.551, 1701.47);
CASINO = GangZoneCreate(2056.314, 1001.35, 2310.129, 1190.885);
CASINODOIS = GangZoneCreate(1798.594, 1860.061, 2087.553, 2010.915);
ULA = GangZoneCreate(2411.655, 1488.726, 2567.849, 1604.768);
SHOP = GangZoneCreate(2716.233, 2301.02, 2868.522, 2637.542);
BAIRROUM = GangZoneCreate(1798.594, 637.7519, 2110.982, 835.0233);
BAIRRODOIS = GangZoneCreate(1380.776, 1887.137, 1681.449, 2034.124);
BAIRROTRES = GangZoneCreate(1162.104, 2506.028, 1560.399, 2695.563);
GEN = GangZoneCreate(2411.655, 1090.316, 2571.754, 1194.753);
BASE = GangZoneCreate(1220.677, 2065.068, 1494.016, 2177.242);
LUGARZIN = GangZoneCreate(1896.215, 2645.278, 2056.314, 2776.792);
LOL = GangZoneCreate(1810.309, 1295.323, 2001.646, 1446.178);
}

public OnPlayerConnect(playerid)
{
GangZoneShowForPlayer(playerid, TERRORISTAS, COR_TERRORISTAS);
GangZoneShowForPlayer(playerid, AGENTES, COR_AGENTES);
GangZoneShowForPlayer(playerid, MAFIA, COR_MAFIA);
GangZoneShowForPlayer(playerid, NINJAS, COR_NINJAS);
GangZoneShowForPlayer(playerid, ZOMBIES, COR_ZOMBIES);
GangZoneShowForPlayer(playerid, PORCOS, COR_PORCOS);
GangZoneShowForPlayer(playerid, MOTOQUEIROS, COR_MOTO);
GangZoneShowForPlayer(playerid, TRIAD, COR_TRIAD);
GangZoneShowForPlayer(playerid, PIRIGUETES, COR_PIRI);
GangZoneShowForPlayer(playerid, TRAFICANTES, COR_TRAFICANTES);
//GZ GENЙRICAS
GangZoneShowForPlayer(playerid, GOLF, COR_TERRORISTAS);
GangZoneShowForPlayer(playerid, AUTOESCOLA, COR_AGENTES);
GangZoneShowForPlayer(playerid, PIRATA, COR_PORCOS);
GangZoneShowForPlayer(playerid, CASINO, COR_PIRI);
GangZoneShowForPlayer(playerid, CASINODOIS, COR_MOTO);
GangZoneShowForPlayer(playerid, ULA, COR_TRIAD);
GangZoneShowForPlayer(playerid, SHOP, COR_MAFIA);
GangZoneShowForPlayer(playerid, BAIRROUM, COR_NINJAS);
GangZoneShowForPlayer(playerid, BAIRRODOIS, COR_ZOMBIES);
GangZoneShowForPlayer(playerid, BAIRROTRES, COR_TRAFICANTES);
GangZoneShowForPlayer(playerid, GEN, COR_AGENTES);
GangZoneShowForPlayer(playerid, BASE, COR_NINJAS);
GangZoneShowForPlayer(playerid, LUGARZIN, COR_PIRI);
GangZoneShowForPlayer(playerid, LOL, COR_MAFIA);
}
Atй aн tudo bem, as GZs aparecem tudo blz, mas agora eu gostaria de saber com fazer para dominб-las, usando uma pickup. Jб tentei usar ESTE tutorial mas nгo funcionou.

Tambйm gostaria de criar um comando /report. tambйm jб tentei varios tutos daqui e nгo funfa

Obrigado desde jб!
Reply
#2

Use search brow
https://sampforum.blast.hk/showthread.php?tid=199019
Reply
#3

Seach '-'
https://sampforum.blast.hk/showthread.php?tid=255243

Код:
This forum requires that you wait 120 seconds between posts. Please try again in 2 seconds.
Reply
#4

Legal, mas eu jб tenho um sistema de gangs. Vou tentar adaptar quando eu tiver tempo, entгo eu falo se deu certo.

O /report eu vou testar tbm.
Reply
#5

Legal!!!

O sistema de Gzs funcionou perfeitamente!! (deu um trabalho, meu server tem 24 GZs :P)

Vou testar o /report
Reply
#6

O /report:

baseafmax7.pwn(104) : error 017: undefined symbol "idx"
baseafmax7.pwn(105) : error 017: undefined symbol "sendername"
baseafmax7.pwn(105) : error 017: undefined symbol "sendername"
baseafmax7.pwn(105) : error 029: invalid expression, assumed zero
baseafmax7.pwn(105) : fatal error 107: too many error messages on one line

pawn Код:
if(strcmp(cmdtext, "/report", true) == 0 || strcmp(cmdtext, "/reportar", true) == 0)
        {
    new tmp[256];
    tmp = strtok(cmdtext, idx);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
    if(!strlen(tmp))
    {
    SendClientMessage(playerid,0x00A100AA,"Use: /report [ID] [Motivo]");
    return 1;
    }
    giveplayerid = strval(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' ')) {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid,0xF60000AA,"/report [ID] [Motivo]");
    return 1;
    }
    GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
    format(string,sizeof(string),"REPORT DE : %s (id %d) Reportou %s (id %d). [Motivo: %s]", giveplayer, giveplayerid, sendername, playerid,result);
    for(new i=0;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerAdmin(i))
    {
    SendClientMessage(i,0xF60000AA,string);
            }
        }
    }
    else
    {
    format(string, sizeof(string), "%d Estб OffLine!", giveplayerid);
    SendClientMessage(playerid, 0xB3B6BCAA, string);
    }
    return 1;
    }
Tenho que definir algumas variбveis, mas como faзo isso?
Reply
#7

Ajeita a indentaзгo primeiro ... Ta pйssima !

Tem certeza que sгo essas linhas que estгo dando erro ?
Reply
#8

Vou arrumar a identaзгo aqui
Reply
#9

pawn Код:
if(strcmp(cmdtext, "/report", true) == 0 || strcmp(cmdtext, "/reportar", true) == 0)
{
    new tmp[256];
    tmp = strtok(cmdtext, idx);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
        if(!strlen(tmp))
            {
            SendClientMessage(playerid,0x00A100AA,">>Use: /report [ID] [Motivo]");
            return 1;
            }
            giveplayerid = strval(tmp);
        if(IsPlayerConnected(giveplayerid))
            {
    new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' ')) {
            idx++;
            }
    new offset = idx;
    new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
            result[idx - offset] = cmdtext[idx];
            idx++;
            }
            result[idx - offset] = EOS;
        if(!strlen(result))
            {
            SendClientMessage(playerid,0xF60000AA,">>/report [ID] [Motivo]");
            return 1;
            }
            GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
            format(string,sizeof(string),">>>>>REPORT DE : %s (id %d) Reportou %s (id %d). [Motivo: %s]", giveplayer, giveplayerid, sendername, playerid,result);
            for(new i=0;i<MAX_PLAYERS;i++)
            {
        if(IsPlayerAdmin(i))
        {
        SendClientMessage(i,0xF60000AA,string);
        }
            }
        }
        else
            {
            format(string, sizeof(string), ">>ID: %d Nгo estб conectado :D", giveplayerid);
            SendClientMessage(playerid, 0xB3B6BCAA, string);
            }
Mesma coisa
Reply
#10

Quote:
Originally Posted by Pedraum
Посмотреть сообщение
pawn Код:
if(strcmp(cmdtext, "/report", true) == 0 || strcmp(cmdtext, "/reportar", true) == 0)
{
    new tmp[256];
    tmp = strtok(cmdtext, idx);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
        if(!strlen(tmp))
            {
            SendClientMessage(playerid,0x00A100AA,">>Use: /report [ID] [Motivo]");
            return 1;
            }
            giveplayerid = strval(tmp);
        if(IsPlayerConnected(giveplayerid))
            {
    new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' ')) {
            idx++;
            }
    new offset = idx;
    new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
            result[idx - offset] = cmdtext[idx];
            idx++;
            }
            result[idx - offset] = EOS;
        if(!strlen(result))
            {
            SendClientMessage(playerid,0xF60000AA,">>/report [ID] [Motivo]");
            return 1;
            }
            GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
            format(string,sizeof(string),">>>>>REPORT DE : %s (id %d) Reportou %s (id %d). [Motivo: %s]", giveplayer, giveplayerid, sendername, playerid,result);
            for(new i=0;i<MAX_PLAYERS;i++)
            {
        if(IsPlayerAdmin(i))
        {
        SendClientMessage(i,0xF60000AA,string);
        }
            }
        }
        else
            {
            format(string, sizeof(string), ">>ID: %d Nгo estб conectado :D", giveplayerid);
            SendClientMessage(playerid, 0xB3B6BCAA, string);
            }
Mesma coisa
Retira o
pawn Код:
tmp = strtok(cmdtext, idx);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)