Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSSGrenade Trail VIP Error


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <csx>

#define PLUGIN_NAME    "Team Grenade Trail"
#define PLUGIN_VERSION    "1.2"
#define PLUGIN_AUTHOR    "null."

#define ACCESS_LEVEL        ADMIN_LEVEL_H

#define SetPlayerBit(%1,%2)    ( %1 |=  ( 1 << ( %2 & 31 ) ) )
#define ClearPlayerBit(%1,%2)  ( %1 &= ~( 1 << ( %2 & 31 ) ) )
#define CheckPlayerBit(%1,%2)  ( %1 &   ( 1 << ( %2 & 31 ) ) )

new g_iCvar_ColorFlash;
new 
g_iCvar_ColorHe;
new 
g_iCvar_ColorSmoke;
new 
g_iCvar_TrailStatus;
new 
g_iCvar_TeamColor;

new 
g_iSpriteLine;
new 
g_iSpriteArrow;

new 
g_iConnectedUsers;
new 
g_iDeadUsers;
new 
g_iMaxPlayers;

public 
plugin_precache()
{
    
g_iSpriteArrow precache_model("sprites/arrow1.spr");
    
g_iSpriteLine  precache_model("sprites/smoke.spr");
}

public 
plugin_init()
{
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR);
    
    
g_iCvar_TrailStatus register_cvar("amx_grentrail_status""1"ACCESS_LEVEL);
    
    
g_iCvar_ColorFlash  register_cvar("amx_grentrail_color_fb""000000255"ACCESS_LEVEL);
    
g_iCvar_ColorHe     register_cvar("amx_grentrail_color_he""255000000"ACCESS_LEVEL);
    
g_iCvar_ColorSmoke  register_cvar("amx_grentrail_color_sg""000255000"ACCESS_LEVEL);
    
    
g_iCvar_TeamColor   register_cvar("amx_grentrail_team_color""0"ACCESS_LEVEL);
    
    
register_event("ResetHUD""Event_ResetHUD""be");
    
register_event("Health",   "Event_Health",   "bd");
    
    
g_iMaxPlayers clamp(get_maxplayers(), 132);
}

public 
client_connect(iPlrId)
{
    
ClearPlayerBit(g_iConnectedUsersiPlrId);
    
ClearPlayerBit(g_iDeadUsersiPlrId);
}

public 
client_putinserver(iPlrId)
{
    if( !
is_user_bot(iPlrId) )
    {
        
SetPlayerBit(g_iConnectedUsersiPlrId);
        if( 
is_user_alive(iPlrId) )
            
ClearPlayerBit(g_iDeadUsersiPlrId);
        else
            
SetPlayerBit(g_iDeadUsersiPlrId);
    }
}

public 
client_disconnect(iPlrId)
{
    
ClearPlayerBit(g_iConnectedUsersiPlrId);
    
ClearPlayerBit(g_iDeadUsersiPlrId);
}

public 
Event_ResetHUD(iPlrId)
{
    if( 
CheckPlayerBit(g_iConnectedUsersiPlrId) )
    {
        if( 
is_user_alive(iPlrId) )
            
ClearPlayerBit(g_iDeadUsersiPlrId);
        else
            
SetPlayerBit(g_iDeadUsersiPlrId);
    }
}

public 
Event_Health(iPlrId)
{
    if( 
CheckPlayerBit(g_iConnectedUsersiPlrId) )
    {
        if( 
is_user_alive(iPlrId) )
            
ClearPlayerBit(g_iDeadUsersiPlrId);
        else
            
SetPlayerBit(g_iDeadUsersiPlrId);
    }
}

public 
plugin_unpause()
{
    
g_iConnectedUsers 0;
    
g_iDeadUsers 0;
    
    for( new 
iPlrId=1iPlrId<=g_iMaxPlayersiPlrId++ )
    {
        if( 
is_user_connected(iPlrId) )
        {
            if( !
is_user_bot(iPlrId) )
            {
                
SetPlayerBit(g_iConnectedUsersiPlrId);
                if( !
is_user_alive(iPlrId) )
                    
SetPlayerBit(g_iDeadUsersiPlrId);
            }
        }
    }
}

public 
grenade_throw(iPlrIdiGrenIdiWeaponType)
{
    new 
iTemp;
    switch( 
iWeaponType )
    {
        case 
CSW_FLASHBANG:    iTemp get_pcvar_num(g_iCvar_ColorFlash);
        case 
CSW_HEGRENADE:    iTemp get_pcvar_num(g_iCvar_ColorHe);
        case 
CSW_SMOKEGRENADEiTemp get_pcvar_num(g_iCvar_ColorSmoke);
        default: return;
    }
    
    new 
iRed iTemp/1000000;
    
iTemp %= 1000000;
    new 
iGreen iTemp/1000;
    new 
iBlue iTemp%1000;
    
    
iTemp clamp(get_pcvar_num(g_iCvar_TeamColor), 01);
    
    switch( 
clamp(get_pcvar_num(g_iCvar_TrailStatus), 03) )
    {
        case 
1:
        {
            new 
CsTeams:iOwnerTeam cs_get_user_team(iPlrId);
            
            for( new 
iPlayer=1iPlayer<=g_iMaxPlayersiPlayer++ )
            {
                if( 
CheckPlayerBit(g_iConnectedUsersiPlayer) )
                {
                    if( 
cs_get_user_team(iPlayer)==iOwnerTeam )
                    {
                        
message_begin(MSG_TYPE_ALONESVC_TEMPENTITY_iPlayer);
                        
write_byte(TE_BEAMFOLLOW);
                        
write_short(iGrenId);
                        
write_short(g_iSpriteArrow);
                        
write_byte(15);
                        
write_byte(7);
                        
write_byte(iRed);
                        
write_byte(iGreen);
                        
write_byte(iBlue);
                        
write_byte(191);
                        
message_end();
                        
                        if( 
iTemp )
                        {
                            
message_begin(MSG_TYPE_ALONESVC_TEMPENTITY_iPlayer);
                            
write_byte(TE_BEAMFOLLOW);
                            
write_short(iGrenId);
                            
write_short(g_iSpriteLine);
                            
write_byte(15);
                            
write_byte(1);
                            switch( 
iOwnerTeam )
                            {
                                case 
CS_TEAM_T:
                                {
                                    
write_byte(255);
                                    
write_byte(0);
                                    
write_byte(0);
                                }
                                case 
CS_TEAM_CT:
                                {
                                    
write_byte(0);
                                    
write_byte(0);
                                    
write_byte(255);
                                }
                                default:
                                {
                                    
write_byte(127);
                                    
write_byte(127);
                                    
write_byte(127);
                                }
                            }
                            
write_byte(191);
                            
message_end();
                        }
                    }
                }
            }
        }
        case 
2:
        {
            new 
CsTeams:iOwnerTeam cs_get_user_team(iPlrId);
            
            for( new 
iPlayer=1iPlayer<=g_iMaxPlayersiPlayer++ )
            {
                if( 
CheckPlayerBit(g_iConnectedUsersiPlayer) )
                {
                    if( 
CheckPlayerBit(g_iDeadUsersiPlayer) || cs_get_user_team(iPlayer)==iOwnerTeam )
                    {
                        
message_begin(MSG_TYPE_ALONESVC_TEMPENTITY_iPlayer);
                        
write_byte(TE_BEAMFOLLOW);
                        
write_short(iGrenId);
                        
write_short(g_iSpriteArrow);
                        
write_byte(15);
                        
write_byte(7);
                        
write_byte(iRed);
                        
write_byte(iGreen);
                        
write_byte(iBlue);
                        
write_byte(191);
                        
message_end();
                        
                        if( 
iTemp )
                        {
                            
message_begin(MSG_TYPE_ALONESVC_TEMPENTITY_iPlayer);
                            
write_byte(TE_BEAMFOLLOW);
                            
write_short(iGrenId);
                            
write_short(g_iSpriteLine);
                            
write_byte(15);
                            
write_byte(1);
                            switch( 
iOwnerTeam )
                            {
                                case 
CS_TEAM_T:
                                {
                                    
write_byte(255);
                                    
write_byte(0);
                                    
write_byte(0);
                                }
                                case 
CS_TEAM_CT:
                                {
                                    
write_byte(0);
                                    
write_byte(0);
                                    
write_byte(255);
                                }
                                default:
                                {
                                    
write_byte(127);
                                    
write_byte(127);
                                    
write_byte(127);
                                }
                            }
                            
write_byte(191);
                            
message_end();
                        }
                    }
                }
            }
        }
        case 
3:
        {
            
message_begin(MSG_TYPE_ALLSVC_TEMPENTITY);
            
write_byte(TE_BEAMFOLLOW);
            
write_short(iGrenId);
            
write_short(g_iSpriteArrow);
            
write_byte(15);
            
write_byte(7);
            
write_byte(iRed);
            
write_byte(iGreen);
            
write_byte(iBlue);
            
write_byte(191);
            
message_end();
            
            if( 
iTemp )
            {
                
message_begin(MSG_TYPE_ALLSVC_TEMPENTITY);
                
write_byte(TE_BEAMFOLLOW);
                
write_short(iGrenId);
                
write_short(g_iSpriteLine);
                
write_byte(15);
                
write_byte(1);
                switch( 
cs_get_user_team(iPlrId) )
                {
                    case 
CS_TEAM_T:
                    {
                        
write_byte(255);
                        
write_byte(0);
                        
write_byte(0);
                    }
                    case 
CS_TEAM_CT:
                    {
                        
write_byte(0);
                        
write_byte(0);
                        
write_byte(255);
                    }
                    default:
                    {
                        
write_byte(127);
                        
write_byte(127);
                        
write_byte(127);
                    }
                }
                
write_byte(191);
                
message_end();
            }
        }
    }


Errors:

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "MSG_TYPE_ALONE" on line 147
Warning: Expression has no effect on line 147
Warning: Expression has no effect on line 147
Error: Expected token: ";", but found ")" on line 147
Error: Invalid expression, assumed zero on line 147
Error: Too many error messages on one line on line 147

Compilation aborted.
4 Errors.
Could not locate output file D:\AMX Mod X\amxxstudio\Untitled.amx (compile failed).

Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...