Raised This Month: $ Target: $400
 0% 

[HELP] edit 1 line


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 10-15-2015 , 09:13   [HELP] edit 1 line
Reply With Quote #1

hi guys this plugin it allows the victim to see the line after killing

PHP Code:
/* AMX Mod X
*   Death-info beams III
*
*  cvars:
*   amx_dib_holdtime <time in 0.1 seconds> - Life of beams
*   amx_dib_width <width in 0.1 units> - Width of beams
*   amx_dib_cross <size in 0.1 units> - Size of markers
*   amx_dib_color <RRRGGGBBB> - RGB color of beam
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve,
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/


#include <amxmodx>
#include <csstats>


new g_sprite;


public 
plugin_init()
{
    
register_plugin("Death-info beams""3.0""BMJ");
    
register_event("CS_DeathMsg""death_msg""a");

    
register_cvar("amx_dib_holdtime""200");
    
register_cvar("amx_dib_width""10");
    
register_cvar("amx_dib_cross""30");
    
register_cvar("amx_dib_color""000255000");
}


public 
plugin_precache()
{
    
g_sprite precache_model("sprites/dot.spr");
}


public 
death_msg()
{
    new 
killer read_data(1);
    new 
victim read_data(2);
    if (
killer == victim)
        return 
PLUGIN_HANDLED;

    new 
vec_killer[3];
    new 
vec_victim[3];
    
get_user_origin(killervec_killer1);
    
get_user_origin(victimvec_victim);

    new 
color[12];
    
get_cvar_string("amx_dib_color"color11);
    new 
str_to_num(color[6]);
    
color[6] = 0;
    new 
str_to_num(color[3]);
    
color[3] = 0;
    new 
str_to_num(color[0]);

    new 
size get_cvar_num("amx_dib_cross");

    
message_begin(MSG_ONESVC_TEMPENTITY, {000}, victim);
    
write_byte(0);
    
write_coord(vec_killer[0] + size);
    
write_coord(vec_killer[1]);
    
write_coord(vec_killer[2]);
    
write_coord(vec_killer[0] - size);
    
write_coord(vec_killer[1]);
    
write_coord(vec_killer[2]);
    
write_short(g_sprite);
    
write_byte(1);
    
write_byte(1);
    
write_byte(get_cvar_num("amx_dib_holdtime"));    // x 0.1
    
write_byte(get_cvar_num("amx_dib_width"));    // x 0.1
    
write_byte(0);
    if (
get_user_team(killer) == 1)
    {
        
write_byte(255);
        
write_byte(50);
        
write_byte(50);
    }
    else
    {
        
write_byte(100);
        
write_byte(100);
        
write_byte(255);
    }
    
write_byte(100);
    
write_byte(0);
    
message_end();

    
message_begin(MSG_ONESVC_TEMPENTITY, {000}, victim);
    
write_byte(0);
    
write_coord(vec_killer[0]);
    
write_coord(vec_killer[1] + size);
    
write_coord(vec_killer[2]);
    
write_coord(vec_killer[0]);
    
write_coord(vec_killer[1] - size);
    
write_coord(vec_killer[2]);
    
write_short(g_sprite);
    
write_byte(1);
    
write_byte(1);
    
write_byte(get_cvar_num("amx_dib_holdtime"));    // x 0.1
    
write_byte(get_cvar_num("amx_dib_width"));    // x 0.1
    
write_byte(0);
    if (
get_user_team(killer) == 1)
    {
        
write_byte(255);
        
write_byte(50);
        
write_byte(50);
    }
    else
    {
        
write_byte(100);
        
write_byte(100);
        
write_byte(255);
    }
    
write_byte(100);
    
write_byte(0);
    
message_end();

    
message_begin(MSG_ONESVC_TEMPENTITY, {000}, victim);
    
write_byte(0);
    
write_coord(vec_killer[0]);
    
write_coord(vec_killer[1]);
    
write_coord(vec_killer[2] + size);
    
write_coord(vec_killer[0]);
    
write_coord(vec_killer[1]);
    
write_coord(vec_killer[2] - size);
    
write_short(g_sprite);
    
write_byte(1);
    
write_byte(1);
    
write_byte(get_cvar_num("amx_dib_holdtime"));    // x 0.1
    
write_byte(get_cvar_num("amx_dib_width"));    // x 0.1
    
write_byte(0);
    if (
get_user_team(killer) == 1)
    {
        
write_byte(255);
        
write_byte(50);
        
write_byte(50);
    }
    else
    {
        
write_byte(100);
        
write_byte(100);
        
write_byte(255);
    }
    
write_byte(100);
    
write_byte(0);
    
message_end();

    
message_begin(MSG_ONESVC_TEMPENTITY, {000}, victim);
    
write_byte(0);
    
write_coord(vec_victim[0] + size);
    
write_coord(vec_victim[1]);
    
write_coord(vec_victim[2]);
    
write_coord(vec_victim[0] - size);
    
write_coord(vec_victim[1]);
    
write_coord(vec_victim[2]);
    
write_short(g_sprite);
    
write_byte(1);
    
write_byte(1);
    
write_byte(get_cvar_num("amx_dib_holdtime"));    // x 0.1
    
write_byte(get_cvar_num("amx_dib_width"));    // x 0.1
    
write_byte(0);
    if (
get_user_team(victim) == 1)
    {
        
write_byte(255);
        
write_byte(50);
        
write_byte(50);
    }
    else
    {
        
write_byte(100);
        
write_byte(100);
        
write_byte(255);
    }
    
write_byte(100);
    
write_byte(0);
    
message_end();

    
message_begin(MSG_ONESVC_TEMPENTITY, {000}, victim);
    
write_byte(0);
    
write_coord(vec_victim[0]);
    
write_coord(vec_victim[1] + size);
    
write_coord(vec_victim[2]);
    
write_coord(vec_victim[0]);
    
write_coord(vec_victim[1] - size);
    
write_coord(vec_victim[2]);
    
write_short(g_sprite);
    
write_byte(1);
    
write_byte(1);
    
write_byte(get_cvar_num("amx_dib_holdtime"));    // x 0.1
    
write_byte(get_cvar_num("amx_dib_width"));    // x 0.1
    
write_byte(0);
    if (
get_user_team(victim) == 1)
    {
        
write_byte(255);
        
write_byte(50);
        
write_byte(50);
    }
    else
    {
        
write_byte(50);
        
write_byte(50);
        
write_byte(255);
    }
    
write_byte(100);
    
write_byte(0);
    
message_end();

    
message_begin(MSG_ONESVC_TEMPENTITY, {000}, victim);
    
write_byte(0);
    
write_coord(vec_victim[0]);
    
write_coord(vec_victim[1]);
    
write_coord(vec_victim[2] + size);
    
write_coord(vec_victim[0]);
    
write_coord(vec_victim[1]);
    
write_coord(vec_victim[2] - size);
    
write_short(g_sprite);
    
write_byte(1);
    
write_byte(1);
    
write_byte(get_cvar_num("amx_dib_holdtime"));    // x 0.1
    
write_byte(get_cvar_num("amx_dib_width"));    // x 0.1
    
write_byte(0);
    if (
get_user_team(victim) == 1)
    {
        
write_byte(255);
        
write_byte(50);
        
write_byte(50);
    }
    else
    {
        
write_byte(100);
        
write_byte(100);
        
write_byte(255);
    }
    
write_byte(100);
    
write_byte(0);
    
message_end();

    
message_begin(MSG_ONESVC_TEMPENTITY, {000}, victim);
    
write_byte(0);
    
write_coord(vec_killer[0]);
    
write_coord(vec_killer[1]);
    
write_coord(vec_killer[2]);
    
write_coord(vec_victim[0]);
    
write_coord(vec_victim[1]);
    
write_coord(vec_victim[2]);
    
write_short(g_sprite);
    
write_byte(1);
    
write_byte(1);
    
write_byte(get_cvar_num("amx_dib_holdtime"));    // x 0.1
    
write_byte(get_cvar_num("amx_dib_width"));    // x 0.1
    
write_byte(0);
    
write_byte(r);
    
write_byte(g);
    
write_byte(b);
    
write_byte(100);
    
write_byte(0);
    
message_end();

    return 
PLUGIN_HANDLED;

but! it show the line just to vitcim i mean just victim can watch the line
i want the line appears to all players all players can see the line
help me guys
arvEL. is offline
Send a message via Skype™ to arvEL.
 


Thread Tools
Display Modes

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 22:03.


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