Raised This Month: $51 Target: $400
 12% 

[ES] show_motd sin punto y coma


  
 
 
Thread Tools Display Modes
Author Message
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 03-26-2010 , 18:06   [ES] show_motd sin punto y coma
#1

Hize cualquier cagada pero bue xd, solo me muestra la ultima linea del prueba.ini, quisiera que se muestre todo a excepcion de las lineas que tengas un punto y coma.

PHP Code:
public prueba(id) {
    new 
conffile[200]
    new 
configdir[200]
    
    
get_configsdir(configdir,199)
    
format(conffile,199,"%s/prueba.ini",configdir)

    if(!
file_exists(conffile)) return 0    
    
    
new lines file_size(conffile,1)
    new 
file[1024], len
    
new full[300]
    
    for(new 
i=0;i<=lines;i++) {
        
read_file(conffile,i,file,1023,len)
        if(
equal(file,"")) continue;
        if(!
equal(file,";",1)) format(full299file)
    } 
    
    
show_motd(idfull"BLE")
    
    return 
PLUGIN_HANDLED

__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 03-26-2010 , 21:05   Re: [ES] show_motd sin punto y coma
#2

Help u.U
__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 03-26-2010 , 21:44   Re: [ES] show_motd sin punto y coma
#3

En vez de esto

PHP Code:
       if(equal(file,"")) continue;
        if(!
equal(file,";",1)) format(full299file
Proba esto

PHP Code:
if (file[0] && file[0] != ';'copy(full299file
Diria que obtengas la data en el plugin_init (almacenada en una variable global) y despues la muestres para no tener que obtener la data todo el tiempo...

No me manejo mucho con las funciones viejas de files pero como en eso se asemeja mucho a las nuevas funciones tal vez te sirva^
__________________
IneedHelp is offline
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 03-26-2010 , 23:24   Re: [ES] show_motd sin punto y coma
#4

ME sige saliendo el mismo mismo resultado, sigo saliendo la ultima linea del ini T_T
__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 03-27-2010 , 07:03   Re: [ES] show_motd sin punto y coma
#5

oh claro...copy va a copiar el buffer hasta la ultima linea, proba con add
__________________
IneedHelp is offline
 



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 11:58.


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