Raised This Month: $ Target: $400
 0% 

problem with print in console maps list


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
un7ouchab1e
Junior Member
Join Date: Jun 2008
Location: Poland
Old 08-27-2008 , 11:37   problem with print in console maps list
Reply With Quote #1

hi
i have a problem with
Code:
public pokazmapy(id)
{
    new file = fopen("addons/amxmodx/configs/standardmaps.ini", "rt")
    new text[256], textlen
    if(file)
    {
        new buffer[256]
        while(!feof(file))
        {
            fgets(file, buffer, 255)
            if(buffer[0])
            {
                textlen += format(text[textlen], 255-textlen, "%s", buffer)
            }
        }
    }
    fclose(file)
    client_print(id, print_console, "%s", text)
    client_print(id, print_chat, "Otworz konsole aby zobaczyc liste dostepnych map w tym momencie")
    return PLUGIN_HANDLED
}
show me the first 5 maps, with such a break

de_dust2

de_inferno

de_nuke

de_train

de_dust

etc... help someone?

Last edited by un7ouchab1e; 08-27-2008 at 11:42.
un7ouchab1e is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-27-2008 , 15:41   Re: problem with print in console maps list
Reply With Quote #2

After fgets(file, buffer, 255) put this line of code
Code:
trim(buffer);
Alka is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode