ayuda con estos codigos
#1

lo que sucede es que ya acomode los codigos como yo creo que van pero si aparecen las zonas pero no hacen el flash que puede ser ayudenme por favor

pawn Код:
//Gagnzones
new Territorio_Grove;
new Territorio_Balla;
new Territorio_Vagos;
new Territorio_Azteca;
new Territorio_Barberos;
new Terriotorio_Civiles;
new Territorio_Interpol;
new Territorio_Mafia;
new Territorio_Basureros;
pawn Код:
public OnPlayerSpawn(playerid)
{
    if( Spawn[playerid] == 0)
    {
     GivePlayerMoney(playerid,3000);
     Spawn[playerid] = 1;
    }
    GangZoneShowForPlayer(playerid, Territorio_Grove, 0x0080009C);
    GangZoneShowForPlayer(playerid, Territorio_Balla, 0x80008096);
    GangZoneShowForPlayer(playerid, Territorio_Vagos, 0xFFFF0096);
    GangZoneShowForPlayer(playerid, Territorio_Azteca, 0x2EBFDE96);
    GangZoneShowForPlayer(playerid, Territorio_Barberos, 0x0080FF96);
    GangZoneShowForPlayer(playerid, Terriotorio_Civiles, 0xFF000096);
    GangZoneShowForPlayer(playerid, Territorio_Interpol, 0x00000096);
    GangZoneShowForPlayer(playerid, Territorio_Mafia, 0x80404096);
    GangZoneShowForPlayer(playerid, Territorio_Basureros, 0x80800096);

    GangZoneFlashForPlayer(playerid, Territorio_Grove, 0x0080009C); //Territorio_Grove
    GangZoneFlashForPlayer(playerid, Territorio_Balla, 0x80008096); //Territorio_Balla
    GangZoneFlashForPlayer(playerid, Territorio_Vagos, 0xFFFF0096); //Territorio_Vagos
    GangZoneFlashForPlayer(playerid, Territorio_Azteca, 0x2EBFDE96); //Territorio_Azteca,
    GangZoneFlashForPlayer(playerid, Territorio_Barberos, 0x0080FF96); //Territorio_Barberos
    GangZoneFlashForPlayer(playerid, Terriotorio_Civiles, 0xFF000096); // Terriotorio_Civiles
    GangZoneFlashForPlayer(playerid, Territorio_Interpol, 0x00000096); //Territorio_Interpol
    GangZoneFlashForPlayer(playerid, Territorio_Mafia, 0x80404096); //Territorio_Mafia
    GangZoneFlashForPlayer(playerid, Territorio_Basureros, 0x80800096); // Territorio_Basurero


pawn Код:
public OnGameModeInit()
{
    SetGameModeText("Territory Sky Line");
    UsePlayerPedAnims();
    ShowPlayerMarkers(1);
    ShowNameTags(1);
    EnableStuntBonusForAll(1);

    Territorio_Grove = GangZoneCreate(2083.108, -1733.182, 2619.307, -1606.855);
    Territorio_Balla = GangZoneCreate(965.0738, -1393.677, 1352.963, -1137.074);
    Territorio_Vagos = GangZoneCreate(1969.022, -1291.036, 2356.912, -1046.276);
    Territorio_Azteca = GangZoneCreate(1680.007, -2064.793, 1950.008, -1602.907);
    Territorio_Barberos = GangZoneCreate(2459.588, -2250.337, 2832.266, -1934.517);
    Terriotorio_Civiles = GangZoneCreate(1725.641, -1492.37, 2147.756, -1342.356);
    Territorio_Interpol = GangZoneCreate(1307.329, -1820.033, 1664.796, -1401.572);
    Territorio_Mafia = GangZoneCreate(1029.722, -2187.173, 1691.416, -1871.354);
    Territorio_Basureros = GangZoneCreate(2451.983, -1259.454, 2817.055, -1042.328);
Reply
#2

Puedes ponerle una condicion en onplayerdeath, inteta con este codigo no se si da errores porque no lo probe pero si da deberian ser faciles de arreglar
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(gTeam[killerid] != gTeam[playerid) {
        if(GetZoneID(playerid) == gTeam[playerid]) {
            switch(gTeam[playerid]) {
                case TEAM_GROVE:    GangZoneFlashForAll(Territorio_grove);
                case TEAM_AZTECA:   GangZoneFlashForAll(Territorio_azteca);
                case TEAM_VAGOS:    GangZoneFlashForAll(Territorio_vagos);
            //case etc..:
            }
        }
    }
    return 0;
}
X,YY Z debe ser las coordenadas del centro de la zona (la funcion la pones al final del gm)
pawn Код:
stock GetZoneID(playerid) {
    //--------------------------------------------------------------------------
    if(IsPlayerInRangeOfPoint(playerid,/*X*/,/*Y*/,/*Z*/)) return TEAM_GROVE;
    if(IsPlayerInRangeOfPoint(playerid,/*X*/,/*Y*/,/*Z*/)) return TEAM_AZTECA;
    if(IsPlayerInRangeOfPoint(playerid,/*X*/,/*Y*/,/*Z*/)) return TEAM_VAGOS;
    //if(IsPlayerInRangeOfPoint(playerid,/*X*/,/*Y*/,/*Z*/)) return OTRO_TEAM;
    //--------------------------------------------------------------------------
    return -1;
}
Reply
#3

OYE ME DA UNOS ERRORES

pawn Код:
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(527) : error 001: expected token: "]", but found ")"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(530) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(531) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(532) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(554) : error 021: symbol already defined: "SetPlayerScore"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(559) : error 010: invalid function or declaration
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1309) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1310) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1311) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1307) : warning 203: symbol is never used: "playerid"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
Reply
#4

proba ahora
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(gTeam[killerid] != gTeam[playerid]) {
        if(GetZoneID(playerid) == gTeam[playerid]) {
            switch(gTeam[playerid]) {
                case TEAM_GROVE:    GangZoneFlashForAll(Territorio_grove,/*COLOR*/);
                case TEAM_AZTECA:   GangZoneFlashForAll(Territorio_azteca/*COLOR*/);
                case TEAM_VAGOS:    GangZoneFlashForAll(Territorio_vagos /*COLOR*/);
            //case etc..:
            }
        }
    }
    return 0;
}

stock GetZoneID(playerid) {
    //--------------------------------------------------------------------------
    if(IsPlayerInRangeOfPoint(playerid,/*rango*/,/*X*/,/*Y*/,/*Z*/)) return TEAM_GROVE;
    if(IsPlayerInRangeOfPoint(playerid,/*rango*/,/*X*/,/*Y*/,/*Z*/)) return TEAM_AZTECA;
    if(IsPlayerInRangeOfPoint(playerid,/*rango*/,/*X*/,/*Y*/,/*Z*/)) return TEAM_VAGOS;
    //if(IsPlayerInRangeOfPoint(playerid,/*rango*/,/*X*/,/*Y*/,/*Z*/)) return OTRO_TEAM;
    //etc...
    //--------------------------------------------------------------------------
    return -1;
}
Reply
#5

ME TIRA ESTOS OTROS

pawn Код:
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(551) : warning 225: unreachable code
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1316) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1317) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1318) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1319) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1320) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1321) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1322) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1323) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1324) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
C:\Documents and Settings\Geek-Man\Escritorio\SERVIDOR\SERVIDOR\gamemodes\TerritorySkyLine.pwn(1314) : warning 203: symbol is never used: "playerid"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


9 Errors.

PARECE QUE EL PROBLEMA ESTA AQUI
pawn Код:
stock GetZoneID(playerid) {
    //--------------------------------------------------------------------------
    if(IsPlayerInRangeOfPoint(playerid,2083.108, -1733.182, 2619.307, -1606.855)) return TEAM_GROVE;
    if(IsPlayerInRangeOfPoint(playerid,965.0738, -1393.677, 1352.963, -1137.074)) return TEAM_BALLAS;
    if(IsPlayerInRangeOfPoint(playerid,1969.022, -1291.036, 2356.912, -1046.276)) return TEAM_VAGOS;
    if(IsPlayerInRangeOfPoint(playerid,1680.007, -2064.793, 1950.008, -1602.907)) return TEAM_AZTECAS;
    if(IsPlayerInRangeOfPoint(playerid,2459.588, -2250.337, 2832.266, -1934.517)) return TEAM_BARBEROS;
    if(IsPlayerInRangeOfPoint(playerid,1725.641, -1492.37, 2147.756, -1342.356)) return  TEAM_CIVILES;
    if(IsPlayerInRangeOfPoint(playerid,1307.329, -1820.033, 1664.796, -1401.572)) return TEAM_INTERPOL;
    if(IsPlayerInRangeOfPoint(playerid,1029.722, -2187.173, 1691.416, -1871.354)) return TEAM_MAFIA;
    if(IsPlayerInRangeOfPoint(playerid,2451.983, -1259.454, 2817.055, -1042.328)) return TEAM_BASUREROS;
   
    //if(IsPlayerInRangeOfPoint(playerid,/*X*/,/*Y*/,/*Z*/)) return OTRO_TEAM;
    //--------------------------------------------------------------------------
    return -1;
}
Reply
#6

no, el problema no es ahi es la lineas de arriba
pawn Код:
//tienes que poner el rango no una coordenada ponele 100
if(IsPlayerInRangeOfPoint(playerid,2083.108, /*rango*/,-1733.182, 2619.307, -1606.855)) return TEAM_GROVE;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)