[POMOC]Imanje

Započeo Muce, Mart 01, 2017, 11:01:30 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:San Marino
Detaljan opis problema:Odem na pijacu kupim 10 semena Å¡ljive i doÄ'em da sadim mogu sadit koliko hoću a uzeo sam 10 kako da to popravim
Dio skripte:[pawn]CMD:posadibiljku( playerid, params[] ) {
    new fid = PlayerInfo[ playerid ][ xFieldID ], vrsta, Float:Pos[ 3 ], string[ 180 ];
   if( IsPlayerInDynamicArea( playerid, fieldInfo[ fid ][ fieldRectAngle ] ) ) {
       if( fieldInfo[ fid ][ fieldStalkNumber ] == 50 ) return SendErrorMessage( playerid, "Ovo imanje vec ima maksimalan broj posadjenih biljaka( 50 )." );
       if( sscanf( params, "i", vrsta ) ) {
          SCM( playerid, CRVENA, "___________________________________________________________________");
         SendUsageMessage( playerid, "/posadibiljku [ broj vrste ]");
         SCM( playerid, BELA, "[Vrsta] 1. Sljiva | 2. Kruska | 3. Jabuka | 4. Kupus | 5. Ruze");
           SCM( playerid, CRVENA, "___________________________________________________________________");
         return 1;
      }
      if( vrsta == 1 ) {
          if( PlayerInfo[ playerid ][ xSemeSljive ] == 0 ) return SendErrorMessage( playerid, "Nemas semena za posaditi ruze." );
          new id = NextStalkID( MAX_STALKS );
         
         GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
         
         stalkInfo[ id ][ sfieldID ] = fid;
         stalkInfo[ id ][ sObjectID ] = 777;
         stalkInfo[ id ][ sPlanted ] = true;
         stalkInfo[ id ][ sGrow ] = false;
         stalkInfo[ id ][ sType ] = BILJKA_SLJIVA;
         stalkInfo[ id ][ sMinut ] = 0;
         stalkInfo[ id ][ sHour ] = 20;
         stalkInfo[ id ][ sPos ][ 0 ] = Pos[ 0 ];
         stalkInfo[ id ][ sPos ][ 1 ] = Pos[ 1 ];
         stalkInfo[ id ][ sPos ][ 2 ] = Pos[ 2 ];
         stalkInfo[ id ][ sObject ] = CreateDynamicObject( 777, Pos[ 0 ]+1, Pos[ 1 ], Pos[ 2 ]-4, 0.0000000, 0.0000000, 0.0000000 );
         format( string, sizeof( string ), "Biljka jos nije izrasla!\nVreme do izrastanja: %d sati, %d minuta\nVrsta biljke: Sljiva", stalkInfo[ id ][ sHour ], stalkInfo[ id ][ sMinut ] );
         stalkInfo[ id ][ s3D ] = CreateDynamic3DTextLabel( string, -1, Pos[ 0 ]+1, Pos[ 1 ], Pos[ 2 ], 15 );
         Stalk_Save( id );
         
         fieldInfo[ fid ][ fieldStalkNumber ]++;
         Field_Save( fid );
      }
      else if( vrsta == 2 ) {
          if( PlayerInfo[ playerid ][ xSemeKruske ] == 0 ) return SendErrorMessage( playerid, "Nemas semena za posaditi ruze." );
            new id = NextStalkID( MAX_STALKS );
           
         GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );

         stalkInfo[ id ][ sfieldID ] = fid;
         stalkInfo[ id ][ sObjectID ] = 673;
         stalkInfo[ id ][ sPlanted ] = true;
         stalkInfo[ id ][ sGrow ] = false;
         stalkInfo[ id ][ sType ] = BILJKA_KRUSKA;
         stalkInfo[ id ][ sMinut ] = 0;
         stalkInfo[ id ][ sHour ] = 22;
         stalkInfo[ id ][ sPos ][ 0 ] = Pos[ 0 ];
         stalkInfo[ id ][ sPos ][ 1 ] = Pos[ 1 ];
         stalkInfo[ id ][ sPos ][ 2 ] = Pos[ 2 ];
         stalkInfo[ id ][ sObject ] = CreateDynamicObject( 673, Pos[ 0 ]+1, Pos[ 1 ], Pos[ 2 ]-4, 0.0000000, 0.0000000, 0.0000000 );
         format( string, sizeof( string ), "Biljka jos nije izrasla!\nVreme do izrastanja: %d sati, %d minuta\nVrsta biljke: Kruska", stalkInfo[ id ][ sHour ], stalkInfo[ id ][ sMinut ] );
         stalkInfo[ id ][ s3D ] = CreateDynamic3DTextLabel( string, -1, Pos[ 0 ]+1, Pos[ 1 ], Pos[ 2 ], 15 );
            Stalk_Save( id );

         fieldInfo[ fid ][ fieldStalkNumber ]++;
         Field_Save( fid );
      }
      else if( vrsta == 3 ) {
          if( PlayerInfo[ playerid ][ xSemeJabuke ] == 0 ) return SendErrorMessage( playerid, "Nemas semena za posaditi ruze." );
          new id = NextStalkID( MAX_STALKS );

         GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );

         stalkInfo[ id ][ sfieldID ] = fid;
         stalkInfo[ id ][ sObjectID ] = 773;
         stalkInfo[ id ][ sPlanted ] = true;
         stalkInfo[ id ][ sGrow ] = false;
         stalkInfo[ id ][ sType ] = BILJKA_JABUKA;
         stalkInfo[ id ][ sMinut ] = 0;
         stalkInfo[ id ][ sHour ] = 24;
         stalkInfo[ id ][ sPos ][ 0 ] = Pos[ 0 ];
         stalkInfo[ id ][ sPos ][ 1 ] = Pos[ 1 ];
         stalkInfo[ id ][ sPos ][ 2 ] = Pos[ 2 ];
         stalkInfo[ id ][ sObject ] = CreateDynamicObject( 773, Pos[ 0 ]+1, Pos[ 1 ], Pos[ 2 ]-4, 0.0000000, 0.0000000, 0.0000000 );
         format( string, sizeof( string ), "Biljka jos nije izrasla!\nVreme do izrastanja: %d sati, %d minuta\nVrsta biljke: Jabuka", stalkInfo[ id ][ sHour ], stalkInfo[ id ][ sMinut ] );
         stalkInfo[ id ][ s3D ] = CreateDynamic3DTextLabel( string, -1, Pos[ 0 ]+1, Pos[ 1 ], Pos[ 2 ], 15 );
            Stalk_Save( id );

         fieldInfo[ fid ][ fieldStalkNumber ]++;
         Field_Save( fid );
      }
      else if( vrsta == 4 ) {
          if( PlayerInfo[ playerid ][ xSemeKupusa ] == 0 ) return SendErrorMessage( playerid, "Nemas semena za posaditi ruze." );
          new id = NextStalkID( MAX_STALKS );

         GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );

         stalkInfo[ id ][ sfieldID ] = fid;
         stalkInfo[ id ][ sObjectID ] = 804;
         stalkInfo[ id ][ sPlanted ] = true;
         stalkInfo[ id ][ sGrow ] = false;
         stalkInfo[ id ][ sType ] = BILJKA_KUPUS;
         stalkInfo[ id ][ sMinut ] = 0;
         stalkInfo[ id ][ sHour ] = 18;
         stalkInfo[ id ][ sPos ][ 0 ] = Pos[ 0 ];
         stalkInfo[ id ][ sPos ][ 1 ] = Pos[ 1 ];
         stalkInfo[ id ][ sPos ][ 2 ] = Pos[ 2 ];
         stalkInfo[ id ][ sObject ] = CreateDynamicObject( 804, Pos[ 0 ]+1, Pos[ 1 ], Pos[ 2 ], 0.0000000, 0.0000000, 0.0000000 );
         format( string, sizeof( string ), "Biljka jos nije izrasla!\nVreme do izrastanja: %d sati, %d minuta\nVrsta biljke: Kupus", stalkInfo[ id ][ sHour ], stalkInfo[ id ][ sMinut ] );
         stalkInfo[ id ][ s3D ] = CreateDynamic3DTextLabel( string, -1, Pos[ 0 ]+1, Pos[ 1 ], Pos[ 2 ], 15 );
            Stalk_Save( id );

         fieldInfo[ fid ][ fieldStalkNumber ]++;
         Field_Save( fid );
      }
      else if( vrsta == 5 ) {
          if( PlayerInfo[ playerid ][ xSemeRuze ] == 0 ) return SendErrorMessage( playerid, "Nemas semena za posaditi ruze." );
          new id = NextStalkID( MAX_STALKS );

         GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );

         stalkInfo[ id ][ sfieldID ] = fid;
         stalkInfo[ id ][ sObjectID ] = 870;
         stalkInfo[ id ][ sPlanted ] = true;
         stalkInfo[ id ][ sGrow ] = false;
         stalkInfo[ id ][ sType ] = BILJKA_RUZE;
         stalkInfo[ id ][ sMinut ] = 0;
         stalkInfo[ id ][ sHour ] = 15;
         stalkInfo[ id ][ sPos ][ 0 ] = Pos[ 0 ];
         stalkInfo[ id ][ sPos ][ 1 ] = Pos[ 1 ];
         stalkInfo[ id ][ sPos ][ 2 ] = Pos[ 2 ];
         stalkInfo[ id ][ sObject ] = CreateDynamicObject( 870, Pos[ 0 ]+1, Pos[ 1 ], Pos[ 2 ]-0.8, 0.0000000, 0.0000000, 0.0000000 );
         format( string, sizeof( string ), "Biljka jos nije izrasla!\nVreme do izrastanja: %d sati, %d minuta\nVrsta biljke: Ruze", stalkInfo[ id ][ sHour ], stalkInfo[ id ][ sMinut ] );
         stalkInfo[ id ][ s3D ] = CreateDynamic3DTextLabel( string, -1, Pos[ 0 ]+1, Pos[ 1 ], Pos[ 2 ], 15 );
            Stalk_Save( id );

         fieldInfo[ fid ][ fieldStalkNumber ]++;
         Field_Save( fid );
      } else return SendErrorMessage( playerid, "Pogresan broj vrste." );
      
   } else return SendErrorMessage( playerid, "Morati biti na svom imanju." );
   return (true);
}[/pawn]
Neke slike/video za lakse dobivanje pomoci(neobavezno)[/b]///

[pawn]if( vrsta == 1 ) {
          if( PlayerInfo[ playerid ][ xSemeSljive ] == 0 ) return SendErrorMessage( playerid, "Nemas semena za posaditi ruze." );
          new id = NextStalkID( MAX_STALKS );
         
         GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
         
         stalkInfo[ id ][ sfieldID ] = fid;
         stalkInfo[ id ][ sObjectID ] = 777;
         stalkInfo[ id ][ sPlanted ] = true;
         stalkInfo[ id ][ sGrow ] = false;
         stalkInfo[ id ][ sType ] = BILJKA_SLJIVA;
         stalkInfo[ id ][ sMinut ] = 0;
         stalkInfo[ id ][ sHour ] = 20;
         stalkInfo[ id ][ sPos ][ 0 ] = Pos[ 0 ];
         stalkInfo[ id ][ sPos ][ 1 ] = Pos[ 1 ];
         stalkInfo[ id ][ sPos ][ 2 ] = Pos[ 2 ];
         stalkInfo[ id ][ sObject ] = CreateDynamicObject( 777, Pos[ 0 ]+1, Pos[ 1 ], Pos[ 2 ]-4, 0.0000000, 0.0000000, 0.0000000 );
         format( string, sizeof( string ), "Biljka jos nije izrasla!\nVreme do izrastanja: %d sati, %d minuta\nVrsta biljke: Sljiva", stalkInfo[ id ][ sHour ], stalkInfo[ id ][ sMinut ] );
         stalkInfo[ id ][ s3D ] = CreateDynamic3DTextLabel( string, -1, Pos[ 0 ]+1, Pos[ 1 ], Pos[ 2 ], 15 );
         Stalk_Save( id );
         
         fieldInfo[ fid ][ fieldStalkNumber ]++;
         Field_Save( fid );
                       PlayerInfo[ playerid ][ xSemeSljive ] --;
      }[/pawn]Probaj ovako
Poslednja Izmena: Mart 01, 2017, 12:03:41 POSLE PODNE od #Montana

Nije dovrsen sistem imanja na SM modu.


bilo je lijepo dok je trajalo.


ne znam da li je dovršeno ali meni je samo ovo trebalo jer sam testao i popravio na imanju još grešaka