21.11.2011, 13:04
Hey i have big problem with business cycle: Why is my cycle is always an ID 0
and print Bussines id=0
what's it's wrong?
pawn Код:
if( dialogid == GUI_VERSLAS_PARDUOTI_ID )
{
if( response )
{
if( listitem == 0 )
{
for( new ID=0; ID < MAX_BUSSINES; ID++ )
{
new
String[ 200 ]
;
format ( String, sizeof( String ),
""HEX_ZALIA" [ + ] "HEX_BALTA" Pardavėte savo verslą (Gauti pinigai uћ parduotą verslą: %d)" , ( floatround( SERVERIO_VERSLAI[ ID ][ Verslo_Kaina ] * 0.08 ) ) );
SendClientMessage( playerid, -1, String );
GivePlayerMoney( playerid, ( floatround( SERVERIO_VERSLAI[ ID ][ Verslo_Kaina ] * 0.8 ) ) );
new
DINI[ 128 ]
;
format( SERVERIO_VERSLAI[ ID ][ Verslo_Savininkas ], MAX_PLAYER_NAME,"Nera");
format ( DINI, 20 , "Verslai/%d.ini" ,ID );
dini_Set( DINI,"Savininkas" , "Nera" );
printf("%d", ID);
new
Str[ 100 ]
;
format ( Str, sizeof( Str ), "Savininkas: %s\nVerslo Pavadinimas: %s", SERVERIO_VERSLAI[ ID ][ Verslo_Savininkas ], SERVERIO_VERSLAI[ ID ][ Verslo_Pavadinimas ] );
Update3DTextLabelText( SERVERIO_VERSLAI[ ID ][ TextLabel1 ], 0x21DD00FF, Str );
Biudzetas( 6, ( floatround( SERVERIO_VERSLAI[ ID ][ Verslo_Kaina ] * 0.1 ) ) );break;
}
}
what's it's wrong?