daily pastebin goal
74%
SHARE
TWEET

Untitled

a guest Jan 17th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if( CreatingGZone[ playerid ] == 1 ) {
  2.  
  3.             new Float:Pos[ 3 ];
  4.             GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
  5.  
  6.             CreatingPos[ playerid ][ 0 ] = Pos[ 0 ];
  7.             CreatingPos[ playerid ][ 1 ] = Pos[ 1 ];
  8.             SendInfoMessage( playerid, "Koristi "col_server"LMB"col_white" da postavis pozicije. {0072FF}))" );
  9.             SendInfoMessage( playerid, "Sada sacuvaj poziciju desnog gornjeg ugla polja. {0072FF}))" );
  10.             CreatingGZone[ playerid ]++;
  11.         }
  12.         else if( CreatingGZone[ playerid ] == 2 ) {
  13.  
  14.             new Float:Pos[ 4 ];
  15.             new id = CreatingGZoneID[ playerid ];
  16.  
  17.             if( id == -1 ) return SendErrorMessage( playerid, "Vec ima maksimalni broj gang zona. {FF0000}))" );
  18.  
  19.             GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
  20.             GetPlayerFacingAngle( playerid, Pos[ 3 ] );
  21.  
  22.             CreatingPos[ playerid ][ 2 ] = Pos[ 0 ];
  23.             CreatingPos[ playerid ][ 3 ] = Pos[ 1 ];
  24.             CreatingGZone[ playerid ]++;
  25.  
  26.             GZone_Reset( id );
  27.  
  28.             if( CreatingPos[ playerid ][ 0 ] > CreatingPos[ playerid ][ 2 ] ) {
  29.                 gZoneInfo[ id ][ gZoneMaxX ] = CreatingPos[ playerid ][ 0 ];
  30.                 gZoneInfo[ id ][ gZoneMinX ] = CreatingPos[ playerid ][ 2 ];
  31.             }
  32.             else if( CreatingPos[ playerid ][ 2 ] > CreatingPos[ playerid ][ 0 ] ) {
  33.                 gZoneInfo[ id ][ gZoneMaxX ] = CreatingPos[ playerid ][ 2 ];
  34.                 gZoneInfo[ id ][ gZoneMinX ] = CreatingPos[ playerid ][ 0 ];
  35.             }
  36.  
  37.             if( CreatingPos[ playerid ][ 1 ] > CreatingPos[ playerid ][ 3 ] ) {
  38.                 gZoneInfo[ id ][ gZoneMaxY ] = CreatingPos[ playerid ][ 1 ];
  39.                 gZoneInfo[ id ][ gZoneMinY ] = CreatingPos[ playerid ][ 3 ];
  40.             }
  41.             else if( CreatingPos[ playerid ][ 3 ] > CreatingPos[ playerid ][ 1 ] ) {
  42.                 gZoneInfo[ id ][ gZoneMaxY ] = CreatingPos[ playerid ][ 3 ];
  43.                 gZoneInfo[ id ][ gZoneMinY ] = CreatingPos[ playerid ][ 1 ];
  44.             }
  45.  
  46.             gZoneInfo[ id ][ gZoneID ] = GangZoneCreate( gZoneInfo[ id ][ gZoneMinX ], gZoneInfo[ id ][ gZoneMinY ], gZoneInfo[ id ][ gZoneMaxX ], gZoneInfo[ id ][ gZoneMaxY ] );
  47.            
  48.             gZoneInfo[ id ][ gZoneRectAngle ] = CreateDynamicRectangle( gZoneInfo[ id ][ gZoneMinX ], gZoneInfo[ id ][ gZoneMinY ], gZoneInfo[ id ][ gZoneMaxX ], gZoneInfo[ id ][ gZoneMaxY ], -1, -1, -1 );
  49.  
  50.             SendInfoMessage( playerid, "Koristi "col_server"LMB"col_white" da postavis pozicije. {0072FF}))" );
  51.             SendInfoMessage( playerid, "Sada sacuvaj poziciju za pickup i text. {0072FF}))" );
  52.         }
  53.         else if( CreatingGZone[ playerid ] == 3 ) {
  54.  
  55.             new Float:Pos[ 3 ];
  56.  
  57.             GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
  58.  
  59.             CreatingGZone[ playerid ]++;
  60.  
  61.             new id = IsCordsInGZone( CreatingGZoneID[ playerid ], Pos[ 0 ], Pos[ 1 ] );
  62.  
  63.             if( id != CreatingGZoneID[ playerid ] ) return SendErrorMessage( playerid, "Moras sacuvati u zoni koju kreiras. {FF0000}))" );
  64.  
  65.             gZoneInfo[ id ][ gZonePickupPos ][ 0 ] = Pos[ 0 ];
  66.             gZoneInfo[ id ][ gZonePickupPos ][ 1 ] = Pos[ 1 ];
  67.             gZoneInfo[ id ][ gZonePickupPos ][ 2 ] = Pos[ 2 ];
  68.             SPD( playerid, dialog_AKTOR_SKIN, DSI, "Aktori", "Unesite ID-ove skinova koje ce nositi aktori:\nMorate unijeti 3 ID-a.", "Unesi", "" );
  69.         }
  70.         else if( CreatingGZone[ playerid ] == 4 ) {
  71.  
  72.             new id = CreatingGZoneID[ playerid ];
  73.             if( id == -1 ) return SendErrorMessage( playerid, "Vec ima maksimalni broj gang zona. {FF0000}))" );
  74.            
  75.             new Float:Pos[ 4 ];
  76.             GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
  77.             GetPlayerFacingAngle( playerid, Pos[ 3 ] );
  78.            
  79.             if(!IsValidActor(gZoneInfo[ id ][ gZoneActor ][ 0 ]) || ActorPos[ id ][ 0 ][ 0 ] == 0.00) {
  80.                 GetPlayerPos(
  81.                     playerid,
  82.                     ActorPos[ id ][ 0 ][ 0 ],
  83.                     ActorPos[ id ][ 0 ][ 1 ],
  84.                     ActorPos[ id ][ 0 ][ 2 ] );
  85.                    
  86.                 GetPlayerFacingAngle( playerid, ActorPos[ id ][ 0 ][ 3 ] );
  87.                 gZoneInfo[ id ][ gZoneActor ][ 0 ] = CreateActor( gZoneInfo[ id ][ gZoneActorSkins ][ 0 ],
  88.                     ActorPos[ id ][ 0 ][ 0 ],
  89.                     ActorPos[ id ][ 0 ][ 1 ],
  90.                     ActorPos[ id ][ 0 ][ 2 ],
  91.                     ActorPos[ id ][ 0 ][ 3 ] );
  92.                    
  93.                 gZoneInfo[ id ][ ActorAlive ][ 0 ] = true;
  94.                 SendInfoMessage( playerid, "Kreiran prvi aktor, preostala jos: 2. {0072FF}))" );
  95.             }
  96.             if(!IsValidActor(gZoneInfo[ id ][ gZoneActor ][ 1 ]) || ActorPos[ id ][ 1 ][ 0 ] == 0.00) {
  97.                 GetPlayerPos(
  98.                     playerid,
  99.                     ActorPos[ id ][ 1 ][ 0 ],
  100.                     ActorPos[ id ][ 1 ][ 1 ],
  101.                     ActorPos[ id ][ 1 ][ 2 ] );
  102.                    
  103.                 GetPlayerFacingAngle( playerid, ActorPos[ id ][ 1 ][ 3 ] );
  104.                 gZoneInfo[ id ][ gZoneActorSkins ][ 1 ] = CreateActor( gZoneInfo[ id ][ gZoneActorSkins ][ 1 ],
  105.                     ActorPos[ id ][ 1 ][ 0 ],
  106.                     ActorPos[ id ][ 1 ][ 1 ],
  107.                     ActorPos[ id ][ 1 ][ 2 ],
  108.                     ActorPos[ id ][ 1 ][ 3 ] );
  109.                    
  110.                 gZoneInfo[ id ][ ActorAlive ][ 1 ] = true;
  111.                 SendInfoMessage( playerid, "Kreiran drugi aktor, preostalo: 1. {0072FF}))" );
  112.             }
  113.             if(!IsValidActor(gZoneInfo[ id ][ gZoneActor ][ 2 ]) || ActorPos[ id ][ 2 ][ 0 ] == 0.00) {
  114.                 GetPlayerPos(
  115.                     playerid,
  116.                     ActorPos[ id ][ 2 ][ 0 ],
  117.                     ActorPos[ id ][ 2 ][ 1 ],
  118.                     ActorPos[ id ][ 2 ][ 2 ] );
  119.                    
  120.                 GetPlayerFacingAngle( playerid, ActorPos[ id ][ 2 ][ 3 ] );
  121.                 gZoneInfo[ id ][ gZoneActor ][ 2 ] = CreateActor( gZoneInfo[ id ][ gZoneActorSkins ][ 2 ],
  122.                     ActorPos[ id ][ 2 ][ 0 ],
  123.                     ActorPos[ id ][ 2 ][ 1 ],
  124.                     ActorPos[ id ][ 2 ][ 2 ],
  125.                     ActorPos[ id ][ 2 ][ 3 ] );
  126.                    
  127.                 gZoneInfo[ id ][ ActorAlive ][ 2 ] = true;
  128.                 gZoneInfo[ id ][ gZoneTaken ] = false;
  129.                 gZoneInfo[ id ][ gZoneTakeable ] = true;
  130.                 gZoneInfo[ id ][ gZoneTime ] = 0;
  131.                 gZoneInfo[ id ][ gZonePickup ] = CreateDynamicPickup( 1313, 1, gZoneInfo[ id ][ gZonePickupPos ][ 0 ], gZoneInfo[ id ][ gZonePickupPos ][ 1 ], gZoneInfo[ id ][ gZonePickupPos ][ 2 ], 0, 0 );
  132.                 gZoneInfo[ id ][ gZone3D ] = CreateDynamic3DTextLabel( ""col_white"[ TERITORIJA ]\nTeritorija je "col_server"slobodna"col_green"\nMozete"col_white" pokrenuti zauzimanje teritorije", BELA, gZoneInfo[ id ][ gZonePickupPos ][ 0 ], gZoneInfo[ id ][ gZonePickupPos ][ 1 ], gZoneInfo[ id ][ gZonePickupPos ][ 2 ], 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0 );
  133.                 new stringic[ 24 ];
  134.                 format( stringic, sizeof( stringic ), "0x%s66", gZoneInfo[ id ][ gZoneColor ] );
  135.                 GangZoneShowForAll( gZoneInfo[ id ][ gZoneID ], HexToInt( stringic ) );
  136.                 sql_create_gangzone( id );
  137.                 CreatingGZone[ playerid ] = -1;
  138.                 CreatingGZoneID[ playerid ] = -1;
  139.                 SendInfoMessage( playerid, "Svi aktori kreirani. {0072FF}))" );
  140.                 SendInfoMessage( playerid, "Uspjesno ste kreirali Gang Zonu. {0072FF}))" );
  141.             }
  142.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top