This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[ES] Ayuda con mensaje por favor...


  
 
 
Thread Tools Display Modes
Author Message
Zapdos1
BANNED
Join Date: Jul 2009
Location: Chile - La Serena
Old 07-03-2010 , 10:08   [ES] Ayuda con mensaje por favor...
#1

Bueno, buscando como hacer un mensaje que este en la esquina inferior izquierda de la pantalla, encontré esto, pero no me funciona, me pueden ayudar a optimizarlo y sacar lo que no sirva.

un error en consola es que no funciona la native message_begin

como no me funciona, no sé si está bien la ubicación del mensaje.
PHP Code:
#define MESSAGE_TASK 0.5

public client_putinserver(id)
{
    if(
get_pcvar_num(pcvar_enable))
    {
        
set_task(MESSAGE_TASK"datos"id)
    }
}

public 
datos(id)
{
    if(
get_pcvar_num(pcvar_enable))
    {
        if(!
is_user_connected(id))
        {
        return 
PLUGIN_HANDLED
        
}
        
        new 
szText[128]
        
format(szText127"%L: %s, %L: %d, ^n%L: %i"LANG_PLAYER"CHARC"g_icharacterselectedLANG_PLAYER"LEV"g_PlayerLevel[id], LANG_PLAYER"GOLD"g_igold[id])
        
        
message_begin(MSG_ONEg_msgStatusMsg, {0,0,0}, id)
        
write_byte(0)
        
write_string(szText)
        
message_end()
        
        
set_task(MESSAGE_TASK"datos"id)
        return 
PLUGIN_CONTINUE
    
}
    return 
PLUGIN_HANDLED

Zapdos1 is offline
XCristiaNX
Veteran Member
Join Date: Dec 2009
Old 07-03-2010 , 10:54   Re: [ES] Ayuda con mensaje por favor...
#2

proba sacando esa condion en client_putiserver y en el public
PHP Code:
if(get_pcvar_num(pcvar_enable)) 
XCristiaNX is offline
Zapdos1
BANNED
Join Date: Jul 2009
Location: Chile - La Serena
Old 07-03-2010 , 11:25   Re: [ES] Ayuda con mensaje por favor...
#3

Quote:
Originally Posted by XCristiaNX View Post
proba sacando esa condion en client_putiserver y en el public
PHP Code:
if(get_pcvar_num(pcvar_enable)) 
no creo que sea eso, porque esa pcvar está en 1, osea activada, y se supone que el mensaje debería funcionar cuando está en 1
Zapdos1 is offline
XCristiaNX
Veteran Member
Join Date: Dec 2009
Old 07-03-2010 , 11:45   Re: [ES] Ayuda con mensaje por favor...
#4

si tenes razon yo recien lo probe y tmb me tira ese error estoy viendo pero no creo saber xq es :S
XCristiaNX is offline
minato
Senior Member
Join Date: May 2010
Location: Rosario
Old 07-03-2010 , 11:51   Re: [ES] Ayuda con mensaje por favor...
#5

fijate si te anda si no postea los logs

PHP Code:
#define MESSAGE_TASK 0.5
new SyncObj
public plugin_init()
{
    
SyncObj CreateHudSyncObj();
}
public 
client_putinserver(id)
{
       
set_task(MESSAGE_TASK"datos"id__"b")
}

public 
datos(id)
{
    if(
get_pcvar_num(pcvar_enable))
    {
        if(!
is_user_connected(id))
        {
            return 
PLUGIN_HANDLED
        
}
        
        
set_hudmessage(2552552550.400.4006.01.10.00.0, -1)
        
ShowSyncHudMsg(id,SyncObj,"%L: %s, %L: %d, ^n%L: %i"LANG_PLAYER"CHARC"g_icharacterselectedLANG_PLAYER"LEV"g_PlayerLevel[id], LANG_PLAYER"GOLD"g_igold[id])
        
        
set_task(MESSAGE_TASK"datos"id)
        return 
PLUGIN_CONTINUE
    
}
    return 
PLUGIN_HANDLED

minato is offline
Send a message via MSN to minato
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 07-03-2010 , 11:56   Re: [ES] Ayuda con mensaje por favor...
#6

hace un clcmd y fijate si funca.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
XCristiaNX
Veteran Member
Join Date: Dec 2009
Old 07-03-2010 , 12:46   Re: [ES] Ayuda con mensaje por favor...
#7

Quote:
Originally Posted by lucas_7_94 View Post
hace un clcmd y fijate si funca.
me interesa este tema...como seria de esa forma?
XCristiaNX is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-03-2010 , 12:58   Re: [ES] Ayuda con mensaje por favor...
#8

Quote:
Originally Posted by XCristiaNX View Post
me interesa este tema...como seria de esa forma?
En vez de poner el codigo en el task, que se ponga en un cmd: /ejemplo

register_clcmd( ) o.O
__________________
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^
XCristiaNX
Veteran Member
Join Date: Dec 2009
Old 07-03-2010 , 13:02   Re: [ES] Ayuda con mensaje por favor...
#9

ahh okas gracias voy a probar
XCristiaNX is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 07-03-2010 , 13:03   Re: [ES] Ayuda con mensaje por favor...
#10

dudo que en el putinserver haciendole un task de 0.5 pueda ver lo que 'tratas de hacer'.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
 



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 14:59.


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