Raised This Month: $ Target: $400
 0% 

[ES] Mostrar nombre en el MOTD [statsx.sma]


  
 
 
Thread Tools Display Modes
Author Message
Bello2
Senior Member
Join Date: Jun 2010
Location: Venezuela
Old 08-23-2010 , 11:38   [ES] Mostrar nombre en el MOTD [statsx.sma]
#1

buenas amigos estuve tratando de modificar la descripcion del motd que sale arriba me explico este es el code original:

PHP Code:
format_stats(idg_sBuffer)
    
get_user_name(idt_sNameMAX_NAME_LENGTH)
    
show_motd(idg_sBuffert_sName
y lo que hice fue esto:

PHP Code:
format_stats(idg_sBuffer)
    
get_user_name(idt_sNameMAX_NAME_LENGTH)
    
show_motd(idg_sBufferstats player: %s,t_sName
y poes me sale error al compilar :S
Bello2 is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-23-2010 , 12:06   Re: [ES] Mostrar nombre en el MOTD [statsx.sma]
#2

Y el error? =S
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Bello2
Senior Member
Join Date: Jun 2010
Location: Venezuela
Old 08-23-2010 , 19:28   Re: [ES] Mostrar nombre en el MOTD [statsx.sma]
#3

Quote:
Originally Posted by Alucard^ View Post
Y el error? =S
dice undefined symbol stats algo asi osea no reconoce eso y ps no entiendo porq esta bien como lo coloque debe ser q un motd no se trabaja de esa manera como puedo colocarle algo antes del name?
Bello2 is offline
rubee
Senior Member
Join Date: Oct 2009
Location: party rocking
Old 08-23-2010 , 19:40   Re: [ES] Mostrar nombre en el MOTD [statsx.sma]
#4

Quote:
Originally Posted by Bello2 View Post
dice undefined symbol stats algo asi osea no reconoce eso y ps no entiendo porq esta bien como lo coloque debe ser q un motd no se trabaja de esa manera como puedo colocarle algo antes del name?
Code:
stats player: %s
alli esta tu error
__________________


rubee is offline
Bello2
Senior Member
Join Date: Jun 2010
Location: Venezuela
Old 08-23-2010 , 22:30   Re: [ES] Mostrar nombre en el MOTD [statsx.sma]
#5

Quote:
Originally Posted by rubee View Post
Code:
stats player: %s
alli esta tu error
¬¬ se que el error esta alli -.-" solo lo mostre para que vean como lo estaba haciendo osea como se haria en un client_print pero creo que en los motd no es lo mismo... estaba buscando era una solucion...
Bello2 is offline
rubee
Senior Member
Join Date: Oct 2009
Location: party rocking
Old 08-23-2010 , 22:37   Re: [ES] Mostrar nombre en el MOTD [statsx.sma]
#6

la solución es obvia, tu mismo lo acabas de decir como en un client_print, entonces debería ir entre "" cualquier cosa usa un format
__________________


rubee is offline
Bello2
Senior Member
Join Date: Jun 2010
Location: Venezuela
Old 08-23-2010 , 22:46   Re: [ES] Mostrar nombre en el MOTD [statsx.sma]
#7

Quote:
Originally Posted by rubee View Post
la solución es obvia, tu mismo lo acabas de decir como en un client_print, entonces debería ir entre "" cualquier cosa usa un format
lo que no se hacer es modificar el format, es este:

PHP Code:
// Get and format stats.
format_stats(idsBuffer[MAX_BUFFER_LENGTH 1])
{
    new 
izStats[8] = {0, ...}
    new 
izBody[8]
    new 
iWeaponiLen
    
new lKills[16], lDeaths[16], lHits[16], lShots[16], lDamage[16], lEff[16], lAcc[16], lWeapon[16]
    
    
format(lKills15"%L"id"KILLS")
    
format(lDeaths15"%L"id"DEATHS")
    
format(lHits15"%L"id"HITS")
    
format(lShots15"%L"id"SHOTS")
    
format(lDamage15"%L"id"DAMAGE")
    
format(lEff15"%L"id"EFF")
    
format(lAcc15"%L"id"ACC")
    
format(lWeapon15"%L"id"WEAPON")
    
    
ucfirst(lEff)
    
ucfirst(lAcc)
    
    
get_user_wstats(id0izStatsizBody)
    
    
iLen format(sBufferMAX_BUFFER_LENGTH"<body bgcolor=#000000><font color=#FFB000><pre>")
    
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH iLen"%6s: %d  (%d headshots)^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %0.2f%%^n%6s: %0.2f%%^n^n"
                    
lKillsizStats[STATS_KILLS], izStats[STATS_HS], lDeathsizStats[STATS_DEATHS], lHitsizStats[STATS_HITS], lShotsizStats[STATS_SHOTS], 
                    
lDamageizStats[STATS_DAMAGE], lEffeffec(izStats), lAccaccuracy(izStats))
    
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH iLen"%-12.12s  %6s  %6s  %6s  %6s  %6s  %4s^n"lWeaponlKillslDeathslHitslShotslDamagelAcc)
    
    for (
iWeapon 1iWeapon xmod_get_maxweapons() && MAX_BUFFER_LENGTH iLen iWeapon++)
    {
        if (
get_user_wstats(idiWeaponizStatsizBody))
        {
            
xmod_get_wpnname(iWeapont_sWpnMAX_WEAPON_LENGTH)
            
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH iLen"%-12.12s  %6d  %6d  %6d  %6d  %6d  %3.0f%%^n"t_sWpnizStats[STATS_KILLS], izStats[STATS_DEATHS], 
                            
izStats[STATS_HITS], izStats[STATS_SHOTS], izStats[STATS_DAMAGE], accuracy(izStats))
        }
    }
}

public 
cmdStatsMe(id)
{
    if (!
SayStatsMe)
    {
        
client_print(idprint_chat"%L"id"DISABLED_MSG")
        return 
PLUGIN_CONTINUE
    
}

    
format_stats(idg_sBuffer)
    
get_user_name(idt_sNameMAX_NAME_LENGTH)
    
show_motd(idg_sBuffert_sName)
    
    return 
PLUGIN_CONTINUE

Bello2 is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-24-2010 , 00:05   Re: [ES] Mostrar nombre en el MOTD [statsx.sma]
#8

Code:
    format_stats(id, g_sBuffer)         new t_sName[32], szHeader[64]     get_user_name(id, t_sName, 31)     formatex(szHeader, 63, "stats player: %s", t_sName)         show_motd(id, g_sBuffer, szHeader)
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Bello2
Senior Member
Join Date: Jun 2010
Location: Venezuela
Old 08-24-2010 , 00:25   Re: [ES] Mostrar nombre en el MOTD [statsx.sma]
#9

Quote:
Originally Posted by Alucard^ View Post
Code:
&nbsp;&nbsp;&nbsp;&nbsp;format_stats(id, g_sBuffer) &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;new t_sName[32], szHeader[64] get_user_name(id, t_sName, 31) &nbsp;&nbsp;&nbsp;&nbsp;formatex(szHeader, 63, "stats player: %s", t_sName) &nbsp;&nbsp;&nbsp;&nbsp; show_motd(id, g_sBuffer, szHeader)
solucionado! gracias alucard!

Last edited by Bello2; 08-26-2010 at 00:08.
Bello2 is offline
Bello2
Senior Member
Join Date: Jun 2010
Location: Venezuela
Old 08-26-2010 , 00:08   Re: [ES] Mostrar nombre en el MOTD [statsx.sma]
#10

fixed closed
Bello2 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 01:51.


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