[Ajuda] Infogz
#1

Bom estou criando ela Mas Esta dando erros dms Nгo sei oque eu faзo

Oque й infogz ?

No meu GM tem um sistema de gzs dominaveis o /infogz mostra o nome das gzs e qual org e a dona

aqui em baixo vai a base de como estou tentando fazer

pawn Код:
dcmd_gzinfo(playerid, params[])
    {
        new name[24];,giveid;
        for(new i = 1; i < MAX_TURFS; ++i)
        {
            format(gzs,128,"/RPG/zones/%s.ini");
            format(tmp,32,"%s",dini_Get(zones,  gZonesData[0]));

    if(gZonesData[zoneid][ZoneOwner] == TEAM_NONE)
        name = "Desocupado";
            if(strlen(tmp) < 3)
            tmp = "Ninguйm";

            giveid = ReturnUser(tmp);
            if(IsPlayerConnected(giveid))
            format(gzs,128,"%s:%s", TurfsCoords[zoneid][zName],gZonesData[zoneid][ZoneOwner]);
            strcat(string, gzs);
        }
        #pragma unused params
        return ShowPlayerDialog(playerid, 10000, DIALOG_STYLE_MSGBOX, "Gzs", string, "Fechar", "");
    }
OBS peguei a base do /orgs e estou tentando fazer isso

Erros que estгo dando

Код:
(48025) : error 029: invalid expression, assumed zero
(48025) : error 017: undefined symbol "giveid"
(48025) : warning 215: expression has no effect
(48028) : error 017: undefined symbol "gzs"
(48029) : error 017: undefined symbol "tmp"
(48031) : error 017: undefined symbol "zoneid"
(48033) : error 017: undefined symbol "tmp"
(48034) : error 017: undefined symbol "tmp"
(48034) : warning 215: expression has no effect
(48036) : error 017: undefined symbol "giveid"
(48036) : error 017: undefined symbol "tmp"
(48037) : error 017: undefined symbol "giveid"
(48038) : error 017: undefined symbol "gzs"
(48039) : error 017: undefined symbol "string"
(48042) : error 017: undefined symbol "string"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


13 Errors.
Aqui vai praticamente o sistema de gzs

pawn Код:
//----------------------------------------------------------------//
//************************* Turf System **************************//
//----------------------------------------------------------------//
stock GetZoneOwnerName(zoneid)
{
    new name[24];
    if(gZonesData[zoneid][ZoneOwner] == TEAM_NONE)
        name = "Desocupado";
    else
        format(name,24,OrgsNames[gZonesData[zoneid][ZoneOwner]]);
    return name;
}



stock GetPlayerZone(playerid)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING || Player[playerid][Spawned] == false || GetPlayerInterior(playerid) != 0 || GetPlayerVirtualWorld(playerid) != 0)
        return 999;

    new Float:playerX, Float:playerY, Float:playerZ;
    GetPlayerPos(playerid, playerX, playerY, playerZ);
    for (new i=0;i<MAX_TURFS;i++)
    {
        if(playerX >= TurfsCoords[i][zMinX] && playerX < TurfsCoords[i][zMaxX] && playerY >= TurfsCoords[i][zMinY] && playerY < TurfsCoords[i][zMaxY])
        {
            Player[playerid][LastZone] = i;
            return i;
        }
    }
    return 999;
}

GetGangPlayersInZone(zoneid, gangid)
{
    new count;
    new Float:playerX, Float:playerY, Float:playerZ;
    for(new i = 0; HighestID+1 > i; i++)
    {
        if(IsPlayerConnected(i) && Player[i][pMorto] == 0 && !IsPlayerInAnyVehicle(i) && GetPlayerInterior(i) == 0 && GetPlayerOrg(i) == gangid && GetPlayerVirtualWorld(i) == 0 && GetPlayerState(i) != PLAYER_STATE_SPECTATING && Player[i][pLevel] > 1)
        {
            GetPlayerPos(i, playerX, playerY, playerZ);
            if(playerX >= TurfsCoords[zoneid][zMinX] && playerX < TurfsCoords[zoneid][zMaxX] && playerY >= TurfsCoords[zoneid][zMinY] && playerY < TurfsCoords[zoneid][zMaxY])
            {
                count ++;
            }
        }
    }
    return count;
}

forward GangZonesCheck();
public GangZonesCheck()
{
    new string[128];
    for(new i = 0; HighestID+1 > i; i++)
    {
        if(IsPlayerConnected(i) && Player[i][Spawned] == true)
        {
            new pZone = GetPlayerZone(i);
            if(pZone != 999)
            {
                if(gZonesData[pZone][ZoneInWar] == true && (GetPlayerOrg(i) == gZonesData[pZone][ZoneOwner] ||GetPlayerOrg(i) == gZonesData[pZone][ZoneAttacker]))
                {
                    new score[256];
                    format(score,256,"Placar da Guerra ~n~~r~%s ~w~x ~b~%s ~n~~y~Pontos: ~r~%d  ~w~-  ~b~%d~n~~y~Kills: ~r~%d  ~w~-  ~b~%d~n~~n~~p~Tempo Restante: ~w~%s",
                    OrgsNamesSmall[gZonesData[pZone][ZoneAttacker]],OrgsNamesSmall[gZonesData[pZone][ZoneOwner]],
                    gZonesData[pZone][ZoneWarPoints][gZonesData[pZone][ZoneAttacker]], gZonesData[pZone][ZoneWarPoints][gZonesData[pZone][ZoneOwner]],
                    gZonesData[pZone][ZoneWarKillCount][gZonesData[pZone][ZoneAttacker]], gZonesData[pZone][ZoneWarKillCount][gZonesData[pZone][ZoneOwner]], ConvertSecondsToMins(gZonesData[pZone][ZoneWarTimeLeft]));
                    TextDrawSetString(WarPointsTD[i], score);

                    if(Player[i][SeePoints] == false)
                    {
                        TextDrawShowForPlayer(i, WarPointsTD[i]);
                        Player[i][SeePoints] = true;
                    }
                }
                else
                {
                    if(Player[i][SeePoints] == true)
                    {
                        TextDrawHideForPlayer(i, WarPointsTD[i]);
                        Player[i][SeePoints] = false;
                    }
                }

                format(string,128,"- %s -~n~~p~Territ¦rio: ~w~~h~%s", TurfsCoords[pZone][zName], GetZoneOwnerName(pZone));

                TextDrawSetString(ZoneName[i], string);
                if(Player[i][SeeName] == false && Player[i][Spawned] == true)
                {
                    TextDrawShowForPlayer(i, ZoneName[i]);
                    Player[i][SeeName] = true;
                }

                if(IsAGang(i))
                {
                    SetPlayerChatBubble( i, "GangZone", COLOR_RED, 50.0, 20000);
                    InGZ[i] = 60;
                }

                if(gZonesData[pZone][ZonePlayerReqMet][GetPlayerOrg(i)] > 0 && gZonesData[pZone][ZoneOwner] != GetPlayerOrg(i))
                {
                    new percent = 100;
                    percent = floatround((100*gZonesData[pZone][ZonePlayerReqMet][GetPlayerOrg(i)])/ZONE_CHECKS);

                    TextDrawShowForPlayer(i, ChecksBar[percent]);
                    TextDrawShowForPlayer(i, ChecksBar[100]);
                    TextDrawShowForPlayer(i, ChecksBar[101]);
                    TextDrawShowForPlayer(i, ChecksBar[102]);
                    Player[i][SeeChecksBar] = true;
                }
                else
                {
                    if(Player[i][SeeChecksBar] == true)
                    {
                        for(new x = 0; x < sizeof(ChecksBar); x ++)
                            TextDrawHideForPlayer(i, ChecksBar[x]);

                        Player[i][SeeChecksBar] = false;
                    }
                }
            }
            else
            {
                if(Player[i][SeeChecksBar] == true)
                {
                    for(new x = 0; x < sizeof(ChecksBar); x ++)
                        TextDrawHideForPlayer(i, ChecksBar[x]);

                    Player[i][SeeChecksBar] = false;
                }
                if(Player[i][SeePoints] == true)
                {
                    TextDrawHideForPlayer(i, WarPointsTD[i]);
                    Player[i][SeePoints] = false;
                }
                if(Player[i][SeeName] == true)
                {
                    Player[i][SeeName] = false;
                    TextDrawHideForPlayer(i, ZoneName[i]);
                }
            }
        }
    }
    return 1;
}

new bool:Counted[MAX_TURFS] = false;

/*forward KickBots();
public KickBots()
{
    new string[64];
    for(new i=0;i<250;i++)
        if(strlen(ReturnPlayer(i)) < 4)
        {
            if(!antiir)
            {
                format(string, sizeof(string), "VBAC :: %s[ID %d] BOT.", ReturnPlayer(i),i);
                ABroadCast(COLOR_LIGHTRED,string,1);
            }
            Ban(i);
        }
}*/


forward GlobalTimer();
public GlobalTimer()
{
    for (new j=0;j<MAX_TURFS;j++)
    {
        if(gZonesData[j][ZoneInWar] == false)
        {
            for (new l = 1; l < MAX_ORGS; l++)
            {
                if(gZonesData[j][ZoneOwner] != l)
                {
                    new PlayersIn = GetGangPlayersInZone(j,l);
                    if(PlayersIn >= PLAYERS_REQUIRED && Counted[j] == false)
                    {
                        Counted[j] = true;
                        gZonesData[j][ZonePlayerReqMet][l] += PlayersIn;
                    }
                    if(PlayersIn < PLAYERS_REQUIRED)
                    {
                        gZonesData[j][ZonePlayerReqMet][l] = 0;
                    }

                    if(gZonesData[j][ZonePlayerReqMet][l] >= ZONE_CHECKS)
                    {
                        StartWar(j, gZonesData[j][ZoneOwner], l);
                    }

                    gZonesData[j][ZonePlayerCountEx][l] = PlayersIn;
                    gZonesData[j][ZonePlayerCount][l] = 0;
                }
            }
        }
        Counted[j] = false;
        if(gZonesData[j][ZoneInWar])
        {
            if(gZonesData[j][ZoneWarTimeLeft] > 0)
            {
                gZonesData[j][ZoneWarTimeLeft]--;
                new defenders = gZonesData[j][ZoneOwner];
                new attackers = gZonesData[j][ZoneAttacker];

                new def_in = GetGangPlayersInZone(j,defenders);
                gZonesData[j][ZoneWarPlayers][defenders] = def_in;
                gZonesData[j][ZoneWarPoints][defenders] += STAYING_POINTS*def_in;

                new atk_in = GetGangPlayersInZone(j,attackers);
                gZonesData[j][ZoneWarPlayers][attackers] = atk_in;
                gZonesData[j][ZoneWarPoints][attackers] += STAYING_POINTS*atk_in;

            }
            else
            {
                TurfWarEnd(j, gZonesData[j][ZoneOwner], gZonesData[j][ZoneAttacker]);
            }
        }
    }
}


forward StartWar(zoneid, defend_gang, attack_gang);
public StartWar(zoneid, defend_gang, attack_gang)
{
    new lol = 0;

    new sd;
    if(zoneid <= 4)
        sd = 12;
    else if(zoneid == 5 || zoneid == 6)
        sd = 2;
    else if(zoneid == 7)
        sd = 3;
    for(new i = 0; i < sd; i ++)
    {
        if(AllowedOrgs[zoneid][i] == attack_gang)
            lol = 1;
    }

    if(lol == 0)
    {
        /*new str[128];
        format(str,128,"[ERRO] Sua gang nгo pode atacar o territуrio %s.", TurfsCoords[zoneid][zName]);
        SendMessageToGang(attack_gang, COLOR_RED, str);*/


        gZonesData[zoneid][ZoneWarPoints][attack_gang] = 0;
        gZonesData[zoneid][ZoneWarKillCount][attack_gang] = 0;
        gZonesData[zoneid][ZonePlayerCount][attack_gang] = 0;
        gZonesData[zoneid][ZonePlayerReqMet][attack_gang] = 0;
        gZonesData[zoneid][ZoneWarPlayers][attack_gang] = 0;
        return 1;
    }

    if(defend_gang == TEAM_NONE && attack_gang != TEAM_NONE)
    {
        new atk_info[128], atk_info2[128];
        format(atk_info,128,"Sua gang conquistou um territ¦rio desocupado");
        format(atk_info2,128,"[TERRITУRIO] Sua gang conquistou um territуrio desocupado.");
        TextDrawSetString(AttackersTextDraw, atk_info);
        TextDrawAlignment(AttackersTextDraw, 2);

        SendMessageToGang(attack_gang, COLOR_GOLD, atk_info2);
        HideScreenTextForGang(attack_gang, 6200);
        TimeTextForGang(attack_gang, AttackersTextDraw, 6000);
        GangZoneHideForAll(zoneid);
        GangZoneShowForAll(zoneid, ((OrgsColors[attack_gang] & ~0xFF) | 0x77));
        gZonesData[zoneid][ZoneOwner] = attack_gang;
        return 1;
    }

    gZonesData[zoneid][ZoneWarPoints][defend_gang] = DEF_POINTS;
    ResetWarData(zoneid, attack_gang, defend_gang);

    gZonesData[zoneid][ZoneWarTimeLeft] = WAR_TIME;

    gZonesData[zoneid][ZoneAttacker] = attack_gang;
    gZonesData[zoneid][ZoneInWar] = true;

    HideScreenTextForGang(attack_gang, 6200);
    HideScreenTextForGang(defend_gang, 6200);

    ShowTurfInfo(zoneid);
    for (new i=0;i<= HighestID;i++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerOrg(i) == defend_gang || GetPlayerOrg(i) == attack_gang)
            {
                GangZoneFlashForPlayer(i, zoneid,  ((OrgsColors[attack_gang] & ~0xFF) | 0x77));
                if(IsPlayerInTurf(i,zoneid) && GetPlayerOrg(i) == attack_gang)
                {
                    AddWarPoints(i, START_WAR);
                }
            }
        }
    }

    gZonesData[zoneid][ZoneKillCount][attack_gang] = 0;
    gZonesData[zoneid][ZoneKillCount][defend_gang] = 0;
    gZonesData[zoneid][ZoneWarCount]++;

    return 1;
}
forward  TurfWarEnd(zoneid,defend_gang,attack_gang);
public TurfWarEnd(zoneid,defend_gang,attack_gang)
{
    new msg_winner[128], msg_loser[128], text_winner[128], text_loser[128];
    new winner, loser;

    //compare kills
    if(gZonesData[zoneid][ZoneWarPoints][attack_gang] == gZonesData[zoneid][ZoneWarPoints][defend_gang])
    {
        if(gZonesData[zoneid][ZoneWarPlayers][attack_gang] <= gZonesData[zoneid][ZoneWarPlayers][defend_gang])
        {
            winner = defend_gang;
            loser = attack_gang;
        }
        else if(gZonesData[zoneid][ZoneWarPlayers][attack_gang] > gZonesData[zoneid][ZoneWarPlayers][defend_gang])
        {
            winner = attack_gang;
            loser = defend_gang;
        }
    }
    else if(gZonesData[zoneid][ZoneWarPoints][attack_gang] < gZonesData[zoneid][ZoneWarPoints][defend_gang])
    {
        winner = defend_gang;
        loser = attack_gang;
    }
    else if(gZonesData[zoneid][ZoneWarPoints][attack_gang] > gZonesData[zoneid][ZoneWarPoints][defend_gang])
    {
        winner = attack_gang;
        loser = defend_gang;
    }
    if(winner == defend_gang)
    {
        format(msg_winner,128,"** Sua gang defendeu o territуrio %s da gang %s **", TurfsCoords[zoneid][zName], OrgsNames[attack_gang]);

        format(text_winner,128,"Sua gang defendeu o territ¦rio %s da gang %s", TurfsCoords[zoneid][zName], OrgsNames[attack_gang]);
        TextDrawSetString(WinnerTextDraw,text_winner);
        TextDrawAlignment(WinnerTextDraw, 2);

        format(msg_loser,128,"** Sua gang falhou em dominar o territуrio %s da gang %s **",TurfsCoords[zoneid][zName], OrgsNames[defend_gang]);
        format(text_loser,128,"Sua gang falhou em dominar o territ¦rio %s da gang %s",TurfsCoords[zoneid][zName], OrgsNames[defend_gang]);
        TextDrawSetString(LoserTextDraw, text_loser);
        TextDrawAlignment(LoserTextDraw, 2);
    }
    else if(winner == attack_gang)
    {
        format(msg_winner,128,"** Sua gang dominou o territуrio %s da gang %s **", TurfsCoords[zoneid][zName], OrgsNames[defend_gang]);

        format(text_winner,128,"Sua gang dominou o territ¦rio %s da gang %s",TurfsCoords[zoneid][zName], OrgsNames[defend_gang]);
        TextDrawSetString(WinnerTextDraw,text_winner);
        TextDrawAlignment(WinnerTextDraw, 2);

        format(msg_loser,128,"** Sua gang perdeu o territуrio %s para a gang %s **", TurfsCoords[zoneid][zName], OrgsNames[attack_gang]);

        format(text_loser,128,"Sua gang perdeu o territ¦rio %s para a gang %s",TurfsCoords[zoneid][zName], OrgsNames[attack_gang]);
        TextDrawSetString(LoserTextDraw, text_loser);
        TextDrawAlignment(LoserTextDraw, 2);
    }
    //Turf color update
    for (new k=0;k<= HighestID;k++)
    {
        if(!IsPlayerConnected(k))
            continue;

        if(GetPlayerOrg(k) == defend_gang || GetPlayerOrg(k) == attack_gang)
        {
            // Defenders Won
            if(winner == defend_gang)
            {
                if(GetPlayerOrg(k) == attack_gang)
                    RemoveWarPoints(k, LOSE_WAR);

                if(GetPlayerOrg(k) == defend_gang && GetPlayerZone(k) == zoneid)
                    AddWarPoints(k, DEFEND_TURF);

                if(GetPlayerOrg(k) == defend_gang)
                {
                    TimeTextForPlayer(k,WinnerTextDraw,4500);
                    SendClientMessage(k, COLOR_GOLD, msg_winner);
                }
                if(GetPlayerOrg(k) == attack_gang)
                {
                    SendClientMessage(k, COLOR_GREY, msg_loser);
                    TimeTextForPlayer(k,LoserTextDraw,4500);
                }
            }
            //Attackers Won
            else if(winner == attack_gang)
            {
                if(GetPlayerOrg(k) == defend_gang)
                    RemoveWarPoints(k, LOSE_WAR);

                if(GetPlayerOrg(k) == attack_gang && IsPlayerInZone(k, zoneid))
                    AddWarPoints(k, TAKE_OVER);


                if(GetPlayerOrg(k) == defend_gang)
                {
                    SendClientMessage(k, COLOR_GREY, msg_loser);
                    TimeTextForPlayer(k,LoserTextDraw,4500);
                }
                if(GetPlayerOrg(k) == attack_gang)
                {
                    TimeTextForPlayer(k,WinnerTextDraw,4500);
                    SendClientMessage(k, COLOR_GOLD, msg_winner);
                }
            }
        }
    }



    HideScreenTextForGang(attack_gang, 6200);
    HideScreenTextForGang(defend_gang, 6200);

    if(winner == attack_gang)
    {
        GangZoneShowForAll(zoneid, ((OrgsColors[attack_gang] & ~0xFF) | 0x77));
        gZonesData[zoneid][ZoneOwner] = attack_gang;
    }
    else if(loser == attack_gang)
    {
        GangZoneShowForAll(zoneid, ((OrgsColors[defend_gang] & ~0xFF) | 0x77));
        gZonesData[zoneid][ZoneOwner] = defend_gang;
    }

    for (new i=0;i<MAX_ORGS;i++)
    {
        gZonesData[zoneid][ZoneWarPoints][i] = 0;
        gZonesData[zoneid][ZoneWarKillCount][i] = 0;
        gZonesData[zoneid][ZonePlayerCount][i] = 0;
        gZonesData[zoneid][ZonePlayerReqMet][i] = 0;
        gZonesData[zoneid][ZoneWarPlayers][i] = 0;
    }

    gZonesData[zoneid][ZoneInWar] = false;

    for (new k=0;k<= HighestID;k++)
    {
        if(IsPlayerConnected(k))
        {
            if(GetPlayerOrg(k) == defend_gang || GetPlayerOrg(k) == attack_gang)
            {
                GangZoneStopFlashForPlayer(k, zoneid);
            }
        }
    }
}

forward WarCode_PlayerDeath(playerid, killerid, reason);
public WarCode_PlayerDeath(playerid, killerid, reason)
{
    new pZone = GetPlayerZone(playerid);
    if(!IsPlayerConnected(killerid))
    {
        if(pZone != 999)
        {
            if(gZonesData[pZone][ZoneInWar] == true && GetPlayerVirtualWorld(playerid) == 0)
            {
                if(GetPlayerOrg(playerid) == gZonesData[pZone][ZoneOwner])
                {
                    Player[playerid][TurfDeaths] ++;
                    gZonesData[pZone][ZoneWarPoints][gZonesData[pZone][ZoneAttacker]]+= KILLING_POINTS;
                }
                else if(GetPlayerOrg(playerid) == gZonesData[pZone][ZoneAttacker])
                {
                    Player[playerid][TurfDeaths] ++;
                    gZonesData[pZone][ZoneWarPoints][gZonesData[pZone][ZoneOwner]]+= KILLING_POINTS;
                }
            }
        }
    }
    else
    {
        new kZone = GetPlayerZone(killerid);
        if(GetPlayerOrg(killerid) != 0 && GetPlayerVirtualWorld(playerid) == 0 && IsPlayerConnected(playerid) && IsPlayerConnected(killerid) && pZone != 999 &&
        kZone != 999)
        {
            if(gZonesData[pZone][ZoneInWar] == true || gZonesData[kZone][ZoneInWar] == true)
            {
                new zone;
                if(gZonesData[pZone][ZoneInWar] == true)
                    zone = pZone;
                else if(gZonesData[kZone][ZoneInWar] == true)
                    zone = kZone;
                if(GetPlayerOrg(killerid) == GetPlayerOrg(playerid) && (gZonesData[kZone][ZoneOwner] == GetPlayerOrg(playerid) || gZonesData[kZone][ZoneAttacker] == GetPlayerOrg(playerid)))
                {
                    new othergang;
                    if(gZonesData[kZone][ZoneOwner] == GetPlayerOrg(killerid))
                        othergang = gZonesData[kZone][ZoneAttacker];
                    else
                        othergang = gZonesData[kZone][ZoneOwner];

                    gZonesData[zone][ZoneWarPoints][othergang]+= KILLING_POINTS;
                    gZonesData[zone][ZoneWarKillCount][othergang] ++;
                }
                else if( (GetPlayerOrg(killerid) == gZonesData[zone][ZoneAttacker] && GetPlayerOrg(playerid) == gZonesData[zone][ZoneOwner]) ||
                 (GetPlayerOrg(killerid) == gZonesData[zone][ZoneOwner] && GetPlayerOrg(playerid) == gZonesData[zone][ZoneAttacker]))
                {
                    gZonesData[zone][ZoneWarPoints][GetPlayerOrg(killerid)]+= KILLING_POINTS;
                    gZonesData[zone][ZoneWarKillCount][GetPlayerOrg(killerid)] ++;
                    Player[killerid][TurfKills] ++;
                    Player[playerid][TurfDeaths] ++;

                    AddWarPoints(killerid, KILL_IN_WAR);
                    if(GetWarPoints(playerid) >= DIE_IN_WAR)
                    {
                        RemoveWarPoints(playerid, DIE_IN_WAR);
                    }
                    if(gZonesData[zone][ZoneWarPoints][GetPlayerOrg(killerid)] >= gZonesData[zone][ZoneWarPoints][GetPlayerOrg(playerid)])
                    {
                        gZonesData[zone][ZoneWarTimeLeft] -= TIME_BOBUS_WINNING;
                    }
                    else if(gZonesData[zone][ZoneWarPoints][GetPlayerOrg(killerid)] < gZonesData[zone][ZoneWarPoints][GetPlayerOrg(playerid)])
                    {
                        gZonesData[zone][ZoneWarTimeLeft] += TIME_BOBUS_LOSING;
                    }
                }
            }
            if(!gZonesData[pZone][ZoneInWar] && gZonesData[pZone][ZonePlayerReqMet] > 0 && GetPlayerOrg(killerid) == gZonesData[pZone][ZoneOwner])
            {
                gZonesData[pZone][ZonePlayerReqMet]--;
            }
            if(kZone == pZone && gZonesData[kZone][ZoneOwner] == GetPlayerOrg(killerid) && !gZonesData[kZone][ZoneInWar] && !gZonesData[kZone][ZoneIsSpawn])
            {
                GivePlayerGP(killerid, MONEY_BONUS);
            }
        }
    }
}


stock ResetWarData(zoneid, attack_gang, defend_gang)
{
    gZonesData[zoneid][ZoneWarPoints][attack_gang] = 0;
    gZonesData[zoneid][ZoneWarPlayers][defend_gang] = 0;
    gZonesData[zoneid][ZoneWarPlayers][attack_gang] = 0;
    gZonesData[zoneid][ZonePlayerReqMet][defend_gang] = 0;
    gZonesData[zoneid][ZonePlayerCount][attack_gang] = 0;
    gZonesData[zoneid][ZonePlayerCount][defend_gang] = 0;
    gZonesData[zoneid][ZonePlayerReqMet][attack_gang] = 0;
    gZonesData[zoneid][ZoneWarKillCount][attack_gang] = 0;
    gZonesData[zoneid][ZoneWarKillCount][defend_gang] = 0;
}

forward TurfsDebug(playerid);
public TurfsDebug(playerid)
{
    for (new j=0;j<MAX_TURFS;j++)
    {
        if(gZonesData[j][ZoneInWar] == true)
        {
            if(GetPlayerOrg(playerid) == gZonesData[j][ZoneOwner] || GetPlayerOrg(playerid) == gZonesData[j][ZoneAttacker])
            {
                GangZoneFlashForPlayer(playerid, j,  ((OrgsColors[gZonesData[j][ZoneAttacker]] & ~0xFF) | 0x77));
            }
        }
    }
}

forward ShowTurfInfo(zoneid);
public ShowTurfInfo(zoneid)
{

    new atk_info[128], atk_info2[128];
    new def_info[128], def_info2[128];
    format(def_info,128,"Um de nossos territ¦rios esta sendo atacado pela gang %s",OrgsNames[gZonesData[zoneid][ZoneAttacker]]);
    format(def_info2,128,"** Um de nossos territуrios estб sendo atacado pela gang %s **",OrgsNames[gZonesData[zoneid][ZoneAttacker]]);
    format(atk_info,128,"Sua Gang iniciou uma guerra de territ¦rios contra %s", OrgsNames[gZonesData[zoneid][ZoneOwner]]);
    format(atk_info2,128,"** Sua gang iniciou uma guerra de territуrios contra a gang %s **", OrgsNames[gZonesData[zoneid][ZoneOwner]]);


    TextDrawSetString(AttackersTextDraw, atk_info);
    TextDrawAlignment(AttackersTextDraw, 2);

    TextDrawSetString(DefendersTextDraw, def_info);
    TextDrawAlignment(DefendersTextDraw, 2);

    TimeTextForGang(gZonesData[zoneid][ZoneOwner],DefendersTextDraw, 6000);
    TimeTextForGang(gZonesData[zoneid][ZoneAttacker],AttackersTextDraw, 6000);

    SendMessageToGang(gZonesData[zoneid][ZoneAttacker], COLOR_GOLD, atk_info2);
    SendMessageToGang(gZonesData[zoneid][ZoneOwner], COLOR_RED, def_info2);

    new string[200];
    format(string,200, "{FF0000}[GUERRAS] {FFFFFF}A ORG {33CCFF}%s {FFFFFF}estб atacando o territуrio {33CCFF}%s {FFFFFF}da ORG {33CCFF}%s.", OrgsNames[gZonesData[zoneid][ZoneAttacker]], TurfsCoords[zoneid][zName], OrgsNames[gZonesData[zoneid][ZoneOwner]]);
    OOCNews(COLOR_WHITE, string);
    return 1;
}

forward ShowScreenTextForGang(gangid);
public ShowScreenTextForGang(gangid)
{
    for(new i = 0; i <= HighestID; i ++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerOrg(i) == gangid)
            {
                TextDrawShowForPlayer(i, ServerLogo1);
                TextDrawShowForPlayer(i, ServerLogo2);
            //  Player[i][SeeName] = true;
                TextDrawShowForPlayer(i, ZoneName[i]);
            }
        }
    }
}

forward HideScreenTextForGang(gangid, time);
public HideScreenTextForGang(gangid, time)
{
    SetTimerEx("ShowScreenTextForGang", time, 0, "i", gangid);
    for(new i = 0; i <= HighestID; i ++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerOrg(i) == gangid)
            {
                TextDrawHideForPlayer(i, ServerLogo1);
                TextDrawHideForPlayer(i, ServerLogo2);
                   // Player[i][SeeName] = false;
                TextDrawHideForPlayer(i, ZoneName[i]);
            }
        }
    }
}

stock SendMessageToGang(gangid, color, message[])
{
    for(new i = 0; i <= HighestID; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerOrg(i) == gangid)
            {
                PlaySoundForPlayer(i, 1052);
                SendClientMessage(i, color, message);
            }
        }
    }
    return 1;
}

stock TimeTextForGang(gangid, Text:textdraw, time)
{
    for (new i=0;i<= HighestID;i++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerOrg(i) == gangid)
            {
                TimeTextForPlayer(i, textdraw, time);
            }
        }
    }

}
PF me ajude eu jб nгo sei mais oque fazer

Darei +rep pra qm me ajudar
Reply


Messages In This Thread
Infogz - by BigRet - 05.06.2014, 01:50
Re: Infogz - by Lucas-Fc - 05.06.2014, 01:59
Re: Infogz - by n0minal - 05.06.2014, 02:32
Respuesta: Infogz - by [BWL]Chamaleon - 05.06.2014, 16:38

Forum Jump:


Users browsing this thread: 2 Guest(s)