Detecting a Business ID
#1

So, I've currently got something like...

pawn Code:
CMD:managebiz( playerid, params[] )
{
    new
        bizcount = 0,
        bizStr [ 128 ],
        holder [ 641 ],
        plName [ MAX_PLAYER_NAME ];
       
    GetPlayerName( playerid, plName, MAX_PLAYER_NAME );
       
    for( new b; b < MAX_BUSINESSES; b ++ )
    {
        if( strcmp( BusinessInfo [ b ] [ Owner ], plName, true ) == 0 && !isnull( BusinessInfo [ b ] [ Owner ] ) )
        {
            bizcount ++;
           
            format( bizStr, 128, "%s\n", BusinessInfo [ b ] [ Name ], b );
            strcat( holder, bizStr, 128 );
           
            EditThisBusiness [ b ] = bizcount - 1;
        }
    }
   
    if( bizcount == 0 )
        return SendClientMessage( playerid, -1, "No businesses found!" );
       
    else return ShowPlayerDialog( playerid, DIALOG_MANAGEBIZ, DIALOG_STYLE_LIST, "Which Business?", holder, "Select", "Cancel" );
}
How would I detect the ID of the business they select when the files are named 0.ini, all the way up to, say, 100.ini?

pawn Code:
case DIALOG_MANAGEBIZ:
        {
            if( response )
            {

            }
            else return plEditingBusiness [ playerid ] = -1;
        }
I can't seem to think of anything.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)