Raised This Month: $ Target: $400
 0% 

Problem with ScoreAttrib


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Speed!
BANNED
Join Date: Jan 2009
Old 01-11-2009 , 10:18   Problem with ScoreAttrib
Reply With Quote #1

I am tryng to put the VIP con a specified player
i just use

PHP Code:
    message_begin(MSG_BROADCASTg_msgScoreAttrib)
    
write_byte(id// id
    
write_byte(4// attrib
    
message_end() 
But sometimes it just shows, sometimes it not, and sometimes when most people is dead it shows :S
I'd apologize your help. I don't speak english OK at all
Speed! is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-11-2009 , 10:30   Re: Problem with ScoreAttrib
Reply With Quote #2

You also have to register the event, and resend the message each time the event is fired with this player id.
Or register the message and change the 2nd arg when 1rst arg = id.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Old 01-11-2009, 10:31
vato loco [GE-S]
This message has been deleted by vato loco [GE-S].
Speed!
BANNED
Join Date: Jan 2009
Old 01-11-2009 , 18:30   Re: Problem with ScoreAttrib
Reply With Quote #4

the message is registered
i will show you how it works (it doesent at all LOL)
i am using it with zombie plague. when a nemesis/survivor is made, it calls the function zombieme/humanme. I did added to that function a task with 1sec delay calling this:

PHP Code:
public fnCheckVIP()
{
    static 
id
    
for (id 1id <= g_maxplayersid++)
    {
        
// Last zombie
        
if ((g_zombie[id] && is_user_alive(id)) || (g_zombie[id] && is_user_alive(id)))
            
make_vip(id)

    }

PHP Code:
make_vip(id)
{
    
message_begin(MSG_BROADCASTg_msgScoreAttrib)
    
write_byte(id// id
    
write_byte(4// attrib
    
message_end()

I dont really know what is happening. Also i did searched for this message being called in this plugin, and it isnt at all. Allthough now im thinking if one plugin that i am using (one wich prevents from appearing as dead an playing those players who are downloading models or any stuff) may be interfering.
Speed! is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 01-11-2009 , 18:31   Re: Problem with ScoreAttrib
Reply With Quote #5

Replace MSG_BROADCAST to MSG_ALL.
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-12-2009 , 00:21   Re: Problem with ScoreAttrib
Reply With Quote #6

Quote:
Originally Posted by Sn!ff3r View Post
Replace MSG_BROADCAST to MSG_ALL.
Won't help.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Old 01-12-2009, 00:27
BOYSplayCS
This message has been deleted by BOYSplayCS. Reason: snip snip
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-12-2009 , 00:30   Re: Problem with ScoreAttrib
Reply With Quote #8

This 100% works :

PHP Code:
#include <amxmodx>
#include <fakemeta>


#define SCOREATTRIB_VIP            (1<<2)

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_message(get_user_msgid("ScoreAttrib"), "Hook_ScoreAttrib")
}

public 
Hook_ScoreAttrib(osef2talifeosef3talifeosef4talife)
{
    new 
id get_msg_arg_int(1)

    if(!
g_bIsAdmin[id]) // replace this with the appropriate check on id
        
return

/*    if( !get_msg_arg_int(2) ) // player is alive
    {
        set_pdata_int(id, OFFSET_INTERNALMODEL, CS_CT_VIP)
        dllfunc(DLLFunc_ClientUserInfoChanged, id)
    }*/ // this actually sets the vip skin, but you don't want it

    
set_msg_arg_int(2ARG_BYTESCOREATTRIB_VIP)

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 01-12-2009 , 05:19   Re: Problem with ScoreAttrib
Reply With Quote #9

Is it possible so CTs will see a T as 'VIP' while Ts will see that player as Bomb?
__________________
hleV is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 01-12-2009 , 09:59   Re: Problem with ScoreAttrib
Reply With Quote #10

Quote:
T as 'VIP'
No.
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
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 01:48.


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