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

ScoreAttrib VIP message independent of a team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
benio101
Junior Member
Join Date: Feb 2012
Location: Toruń, Poland
Old 08-12-2012 , 02:33   ScoreAttrib VIP message independent of a team
Reply With Quote #1

Hi!

Because no one code for VIP status in Score Table works fine,
even on AlliedModders, always being loosing some informations
(i.e. `bout having bomb after throwing away and taking again from ground),
i finally wrote the code, wchich simply adds VIP status for people, who have a T flag.

The trick was the fact, ScoreAttribMessage is bitsum information and the priority of statuses
are directly proportional to the power of number tho, wchich repsentant following flag values:

- VIP with 4 flag being equal to two to the power of two
- Bomb with 2 flag being equal to two to the power of one
- Dead with 1 flag being equal to two to the power of zero

So, the working, good one code is
PHP Code:
register_message(get_user_msgid("ScoreAttrib"), "g_VipStatus");

public 
g_VipStatus(){
    new 
id=get_msg_arg_int(1);
    if(
is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)
        
set_msg_arg_int(2ARG_BYTEget_msg_arg_int(2)|4)

It makes me happy, they are ways, turnings from impossible to ready after time,
as jim_yang`s Max Money module or Arkshine`s Custom Hud awesome solutions.

Anyway, live terrorists (hereinafter referred to as TT) don`t see VIP status
and live anti-terrorists (hereinafter referred to as CT) don`t see BOMB status.

I am curious if it is possible to change team for TT, then send message as they are CT and change theirs team back
to CT leaving the VIP status in Score set by ScoreAttrib message with 2nd argument bitsum of 2 squared equal positive.

So, i tried
PHP Code:
register_message(get_user_msgid("ScoreAttrib"), "g_VipStatus");

public 
g_VipStatus(){
    new 
id=get_msg_arg_int(1);
    new 
bool:team=false;
    if(
get_user_team(id)==&& is_user_alive(id))
        
team=true;
    if(
team)//if CT, set team to CT
        
set_pdata_int(id,114,2);//114 means TEAM pdata
    
if(is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)
        
set_msg_arg_int(2ARG_BYTEget_msg_arg_int(2)|4);//sens info
    
if(team)//and back the team to TT leaving "VIP" status in Score table
        
set_pdata_int(id,114,1);

but, unfortunatelly, i failed.

Is it possible to send that info or try to edit it`s memory using
Orpheu or Rage to reach live TT "VIP" status in Score table?


My target is create fully work ScoreAttrib VIP status,
independing of the team or CS hardcoded limitations.

I would be grateful for reply.
Best regards, benio101
benio101 is offline
Old 05-02-2019, 21:08
Shadowless
This message has been deleted by Shadowless.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-03-2019 , 18:22   Re: ScoreAttrib VIP message independent of a team
Reply With Quote #2

Quote:
Originally Posted by Shadowless View Post
What is that supposed to prove? The VIP tag is visible when you're CT, we all know that. The problem is that it's not visible while you're a terrorist.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Old 05-03-2019, 19:34
Shadowless
This message has been deleted by Shadowless.
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-04-2019 , 08:31   Re: ScoreAttrib VIP message independent of a team
Reply With Quote #3

Quote:
Originally Posted by Shadowless View Post




ONLY ALIVE TERRORIST can`t see VIPs

i`m sure nice scripter remove this barrier ;)




code is too small...

PHP Code:
#include <amxmodx>

#define PLUGIN    "Admin - VIP Status"
#define VERSION    "1.0"
#define AUTHOR    "xPaw"

public plugin_init()
{
    
register_pluginPLUGINVERSIONAUTHOR );
    
    
register_messageget_user_msgid"ScoreAttrib" ),    "msgScoreAttrib" );
}

public 
msgScoreAttrib( const MsgId, const MsgType, const MsgDest )
{
    static 
id;
    
id get_msg_arg_int);
    
    if( ( 
get_user_flagsid ) & ADMIN_CHAT ) && !get_msg_arg_int))
        
set_msg_arg_int2ARG_BYTE, ( << ) );

The guy it's so stupid as to post images that denounce the server itself of being no-steam. REPORTED
__________________









Last edited by CrazY.; 05-04-2019 at 08:33.
CrazY. is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 05-04-2019 , 10:35   Re: ScoreAttrib VIP message independent of a team
Reply With Quote #4

I don't get the point on replying to old threads. You could post something like "I'm also facing the same issue" or something like that but not these crap stuff.
__________________
Relaxing is offline
Old 05-04-2019, 16:11
Shadowless
This message has been deleted by Shadowless.
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 05:04.


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