Pickup zone se ne refresha!

Započeo ʙᴜsᴛᴇʀ ᴄᴏɴɴᴇʟʟʏ, April 05, 2020, 16:08:36 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem (error/warning): Kada zauzmem zonu, pickup zone nece da se refresha, a u skripti ja msm da je sve dobro? Ima GZone_Refresh nakon sto se zona zauzme da se refresha, ali to ne radi IG?
Dio skripte: [pawn]GZone_Refresh( id ) {

   new filename[ 32 ], string[ 256 ];

   if( id  != -1 ) {

      format( filename, sizeof( filename ), F_GZONE, id );

      if( fexist( filename ) ) {

          if( IsValidDynamic3DTextLabel( gZoneInfo[ id ][ gZone3D ] ) )
             DestroyDynamic3DTextLabel( gZoneInfo[ id ][ gZone3D ] );

          if( IsValidDynamicPickup( gZoneInfo[ id ][ gZonePickup ] ) )
             DestroyDynamicPickup( gZoneInfo[ id ][ gZonePickup ] );

         if( !gZoneInfo[ id ][ gZoneTaken ] ) {

            gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 2788.5239,-2456.3274,13.6335, 0, 0 );
            gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( ""col_white"[ TERITORIJA ]\nTeritorija je "col_sanm"slobodna"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi", BELA, 2788.5239,-2456.3274,13.6335, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         if( !gZoneInfo[ id ][ gZoneTaken ] ) {

            gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 2658.0000,-2082.1375,13.5469, 0, 0 );
            gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( ""col_white"[ TERITORIJA ]\nTeritorija je "col_sanm"slobodna"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi", BELA, 2658.0000,-2082.1375,13.5469, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         if( !gZoneInfo[ id ][ gZoneTaken ] ) {

            gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 1714.9451,-1911.9299,13.5666, 0, 0 );
            gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( ""col_white"[ TERITORIJA ]\nTeritorija je "col_sanm"slobodna"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi", BELA, 1714.9451,-1911.9299,13.5666, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         if( !gZoneInfo[ id ][ gZoneTaken ] ) {

            gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 563.4807,-1654.2712,18.1925, 0, 0 );
            gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( ""col_white"[ TERITORIJA ]\nTeritorija je "col_sanm"slobodna"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi", BELA, 563.4807,-1654.2712,18.1925, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         if( !gZoneInfo[ id ][ gZoneTaken ] ) {

            gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 1165.6178,-1479.3297,22.7538, 0, 0 );
            gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( ""col_white"[ TERITORIJA ]\nTeritorija je "col_sanm"slobodna"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi", BELA, 1165.6178,-1479.3297,22.7538, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         if( !gZoneInfo[ id ][ gZoneTaken ] ) {

            gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 1787.1885,-1367.1100,15.7578, 0, 0 );
            gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( ""col_white"[ TERITORIJA ]\nTeritorija je "col_sanm"slobodna"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi", BELA, 1787.1885,-1367.1100,15.7578, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         if( !gZoneInfo[ id ][ gZoneTaken ] ) {

            gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 2544.5132,-1322.9039,35.6675, 0, 0 );
            gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( ""col_white"[ TERITORIJA ]\nTeritorija je "col_sanm"slobodna"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi", BELA, 2544.5132,-1322.9039,35.6675, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         if( !gZoneInfo[ id ][ gZoneTaken ] ) {

            gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 867.1683,-1116.3910,24.0859, 0, 0 );
            gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( ""col_white"[ TERITORIJA ]\nTeritorija je "col_sanm"slobodna"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi", BELA, 867.1683,-1116.3910,24.0859, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         else if( gZoneInfo[ id ][ gZoneTaken ] ) {
         
             gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 2788.5239,-2456.3274,13.6335, 0, 0 );
             format( string, sizeof( string ), ""col_white"[ TERITORIJA ]\nTeritorija je u vlasnistvu bande "col_sanm"%s"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi",  OI[ gZoneInfo[ id ][ gZoneGangID ] ][ oName ] );
             gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( string, BELA, 2788.5239,-2456.3274,13.6335, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         else if( gZoneInfo[ id ][ gZoneTaken ] ) {

             gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 2658.0000,-2082.1375,13.5469, 0, 0 );
             format( string, sizeof( string ), ""col_white"[ TERITORIJA ]\nTeritorija je u vlasnistvu bande "col_sanm"%s"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi",  OI[ gZoneInfo[ id ][ gZoneGangID ] ][ oName ] );
             gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( string, BELA, 2658.0000,-2082.1375,13.5469, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         else if( gZoneInfo[ id ][ gZoneTaken ] ) {

             gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 1714.9451,-1911.9299,13.5666, 0, 0 );
             format( string, sizeof( string ), ""col_white"[ TERITORIJA ]\nTeritorija je u vlasnistvu bande "col_sanm"%s"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi",  OI[ gZoneInfo[ id ][ gZoneGangID ] ][ oName ] );
             gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( string, BELA, 1714.9451,-1911.9299,13.5666, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         else if( gZoneInfo[ id ][ gZoneTaken ] ) {

             gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 563.4807,-1654.2712,18.1925, 0, 0 );
             format( string, sizeof( string ), ""col_white"[ TERITORIJA ]\nTeritorija je u vlasnistvu bande "col_sanm"%s"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi",  OI[ gZoneInfo[ id ][ gZoneGangID ] ][ oName ] );
             gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( string, BELA, 563.4807,-1654.2712,18.1925, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         else if( gZoneInfo[ id ][ gZoneTaken ] ) {

             gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 1165.6178,-1479.3297,22.7538, 0, 0 );
             format( string, sizeof( string ), ""col_white"[ TERITORIJA ]\nTeritorija je u vlasnistvu bande "col_sanm"%s"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi",  OI[ gZoneInfo[ id ][ gZoneGangID ] ][ oName ] );
             gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( string, BELA, 1165.6178,-1479.3297,22.7538, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         else if( gZoneInfo[ id ][ gZoneTaken ] ) {

             gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 1787.1885,-1367.1100,15.7578, 0, 0 );
             format( string, sizeof( string ), ""col_white"[ TERITORIJA ]\nTeritorija je u vlasnistvu bande "col_sanm"%s"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi",  OI[ gZoneInfo[ id ][ gZoneGangID ] ][ oName ] );
             gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( string, BELA, 1787.1885,-1367.1100,15.7578, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         else if( gZoneInfo[ id ][ gZoneTaken ] ) {

             gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 2544.5132,-1322.9039,35.6675, 0, 0 );
             format( string, sizeof( string ), ""col_white"[ TERITORIJA ]\nTeritorija je u vlasnistvu bande "col_sanm"%s"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi",  OI[ gZoneInfo[ id ][ gZoneGangID ] ][ oName ] );
             gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( string, BELA, 2544.5132,-1322.9039,35.6675, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
         else if( gZoneInfo[ id ][ gZoneTaken ] ) {

             gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, 867.1683,-1116.3910,24.0859, 0, 0 );
             format( string, sizeof( string ), ""col_white"[ TERITORIJA ]\nTeritorija je u vlasnistvu bande "col_sanm"%s"col_white"\nAko zelis da je zauzmes kucaj "col_sanm"/zauzmi",  OI[ gZoneInfo[ id ][ gZoneGangID ] ][ oName ] );
             gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( string, BELA, 867.1683,-1116.3910,24.0859, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
         }
      }
   }
}
[/pawn]
[pawn]forward ZonaZauzmi( playerid );
public ZonaZauzmi( playerid ) {

   new string[ 128 ];
   new id;
   
   if( IsPlayerInDynamicArea( playerid, gZoneInfo[ gZone_ID[ playerid ] ][ gZoneRectAngle ] ) ) {
   
       if( gZone_Time[ playerid ] > 0 ) {

           format( string, sizeof( string ), "~w~Ostanite u teritoriji jos ~r~%d ~w~sekundi", gZone_Time[ playerid ] );
           GameTextForPlayer( playerid, string, 1000, 4 ) ;
          
           gZone_Time[ playerid ]--;
       }
       else if( gZone_Time[ playerid ] == 0 ) {
      
           GangZoneStopFlashForAll( gZoneInfo[ gZone_ID[ playerid ] ][ gZoneID ] );
           GangZoneHideForAll( gZoneInfo[ gZone_ID[ playerid ] ][ gZoneID ] );
           gZone_Time[ playerid ] = 0;
           Dimi_KillTimer( gZone_Timer[ playerid ] );
         GZone_Refresh( id );
      
           OrgPoruka( PlayerInfo[ playerid ][ xClan ], 0xFFC801C8, "Vasa organizacija je prosirila svoju vladavinu na jos jednu teritoriju." );
      
           if( gZoneInfo[ gZone_ID[ playerid ] ][ gZoneGangID ] != -1 ) {

                format( string, sizeof( string ), "[TERITORIJA] Suparnicka banda %s je preuzela jednu od vasih teritorija.", OI[ PlayerInfo[ playerid ][ xClan ] ][ oName ] );
                OrgPoruka( gZoneInfo[ gZone_ID[ playerid ] ][ gZoneGangID ], 0xFFC801C8, string );

                format( string, sizeof( string ), "[TERITORIJA] Clan %s je zauzeo teritoriju koju je kontrolisala banda %s.", ImeIgraca( playerid ), OI[ gZoneInfo[ gZone_ID[ playerid ] ][ gZoneGangID ] ][ oName ] );
               OrgPoruka( PlayerInfo[ playerid ][ xClan ], 0xFFC801C8, string );
         }
         else if( gZoneInfo[ gZone_ID[ playerid ] ][ gZoneGangID ] == -1 ) {
         
             format( string, sizeof( string ), "[TERITORIJA] Clan %s je zauzeo teritoriju koja je bila slobodna.", ImeIgraca( playerid ) );
               OrgPoruka( PlayerInfo[ playerid ][ xClan ], 0xFFC801C8, string );
         }
         
         
         gZoneInfo[ gZone_ID[ playerid ] ][ gZoneGangID ] = PlayerInfo[ playerid ][ xClan ];
         gZoneInfo[ gZone_ID[ playerid ] ][ gZoneTaken ] = true;
         
         new stringic[ 24 ];
            format( stringic, sizeof( stringic ), "%s", OI[ PlayerInfo[ playerid ][ xClan ] ][ oColor ] );
            strmid( gZoneInfo[ gZone_ID[ playerid ] ][ gZoneColor ], stringic, 0, strlen( stringic ), 255 );
           
         format( stringic, sizeof( stringic ), "0x%s66", gZoneInfo[ gZone_ID[ playerid ] ][ gZoneColor ] );
            GangZoneShowForAll( gZoneInfo[ gZone_ID[ playerid ] ][ gZoneID ], HexToInt( stringic ) );
         
         GZone_Refresh( gZone_ID[ playerid ] );
         
         gZoneInfo[ gZone_ID[ playerid ] ][ gZoneTime ] = 30;
         
         GZone_Save( gZone_ID[ playerid ] );
         
            PostaviWanted( playerid, "Zauzimanje Teritorija", "Nepoznati", 6 );
           
            gZone_ID[ playerid ] = -1;
      }
   }
   else {
   
        GameTextForPlayer( playerid, "~w~Otisli ste iz teritorije!", 1000, 4) ;
        GangZoneStopFlashForAll( gZoneInfo[ gZone_ID[ playerid ] ][ gZoneID ] );
       gZone_Time[ playerid ] = 0;
       Dimi_KillTimer( gZone_Timer[ playerid ] );
      
       PostaviWanted( playerid, "Zauzimanje Teritorija", "Nepoznati", 6 );
       
        if( gZoneInfo[ gZone_ID[ playerid ] ][ gZoneGangID ] != -1 ) {

          format( string, sizeof( string ), "[TERITORIJA] Suparnicka banda %s je napustila teritoriju i prestala sa preuzimanjem.", OI[ PlayerInfo[ playerid ][ xClan ] ][ oName ] );
            OrgPoruka( gZoneInfo[ gZone_ID[ playerid ] ][ gZoneGangID ], 0xFFC801C8, string );
      }
      
      format( string, sizeof( string ), "[TERITORIJA] Clan %s je napustio teritoriju i prestao sa zauzimanjem.", ImeIgraca( playerid ) );
        OrgPoruka( PlayerInfo[ playerid ][ xClan ], 0xFFC801C8, string );
       
        gZoneInfo[ gZone_ID[ playerid ] ][ gZoneTime ] = 30;
       
        GZone_Save( gZone_ID[ playerid ] );
       
        gZone_ID[ playerid ] = -1;
   }
   return true;
}
[/pawn]
Debug iz server_log (ukoliko je u pitanju crashanje servera - crashdetect log): //
Slika/video ingame problema (obavezno ako je ingame problem): //
Poslednja Izmena: April 05, 2020, 16:13:19 POSLE PODNE od ʙᴜsᴛᴇʀ ᴄᴏɴɴᴇʟʟʏ
Founder of
Digression Community