AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ScoreAttrib VIP message independent of a team (https://forums.alliedmods.net/showthread.php?t=192609)

benio101 08-12-2012 02:33

ScoreAttrib VIP message independent of a team
 
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

OciXCrom 05-03-2019 18:22

Re: ScoreAttrib VIP message independent of a team
 
Quote:

Originally Posted by Shadowless (Post 2649892)

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.

CrazY. 05-04-2019 08:31

Re: ScoreAttrib VIP message independent of a team
 
Quote:

Originally Posted by Shadowless (Post 2650111)

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

Relaxing 05-04-2019 10:35

Re: ScoreAttrib VIP message independent of a team
 
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.


All times are GMT -4. The time now is 05:43.

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