Raised This Month: $344 Target: $400
 86%   Almost there!

Remove Model From Vip


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ykaru
Member
Join Date: Aug 2019
Old 07-14-2020 , 09:11   Remove Model From Vip
Reply With Quote #1

Hi, I have this vip plugin that has a model on the player, how could I remove it.
Because I don't want the vip to have a model.
He has the VIP model from the game, he doesn't have a special model.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
#include <fakemeta>
#include <cstrike>
#include <hamsandwich>

new const PLUGIN[]    = "Deathrun VIP",
     
VERSION[]    = "1.6",
      
AUTHOR[]    = "Fuffy";

new 
bool:HealthRegStart[33];

#define IsPlayer(%0)    ( 1 <= %0 <= g_iMaxPlayers )
new g_iMaxPlayers;

#define MAX_DISTANCE 8192.0

new vip_acces_cvar;
new 
vip_health_cvar;
new 
vip_reg_cvar;
new 
vip_dmg_cvar;
new 
vip_gravity_cvar;
new 
vip_manager;
new 
vip_ammo_infinite;

public 
plugin_init( )
{
    
register_plugin
    
(
        .
plugin_name PLUGIN
        .
version     VERSION
        .
author      AUTHOR
    
)

    
register_clcmd"say /revive""ReviveCMD" );
    
register_clcmd"say_team /revive""ReviveCMD" );
    
register_clcmd"say /vips""VipsCMD" );
    
register_clcmd"say_team /vips""VipsCMD" );

    
register_clcmd("teleport""TeleportCMD" );

    
RegisterHamHam_Spawn"player""VIP_Spawn"1);

    
register_event"Damage""VIP_Hp""b""2!0""3=0""4!0" );
    
register_event("CurWeapon""VIP_Speed""be""1=1");

    
g_iMaxPlayers get_maxplayers ( )
    
RegisterHam Ham_TakeDamage"player""Player_TakeDamage" );

    
vip_acces_cvar register_cvar"vip_flags""t" );
    
vip_health_cvar register_cvar"vip_health""300" );
    
vip_reg_cvar register_cvar"vip_full_health_delay""10" );
    
vip_dmg_cvar register_cvar"vip_damage_multiplier""2" );
    
vip_gravity_cvar register_cvar"vip_gravity""400" );    
    
vip_manager register_cvar"vip_owner_id""Privat.");
    
vip_ammo_infinite register_cvar"vip_infinite_ammo""1" );
}

public 
VIP_Spawnid )
{
    if( 
is_user_aliveid ) )
    {
        if( 
is_player_vipid ) )
        {
            
set_task3.0"VIP_Items"id );
            
CC(id"^1[ ^4VIP^1 ] Peste^4 3 secunde^1 vei primi beneficiile de ^3VIP^1 ." );
        }
        else
        {
            
set_task(120.0,"vip_pubs",id,_,_,"b",0)
        }
    }    
}

public 
vip_pubsid )
{
    new 
szOwner25 ];
    
get_pcvar_stringvip_managerszOwnercharsmaxszOwner ) );

    if( !
is_player_vipid ) && is_user_connectedid ) )
    {
        
CC(id"^1[ ^4VIP^1 ] Daca vrei sa cumperi ^3VIP^1, da-i add: ^4%s^1 ."szOwner );
        
CC(id"^1[ ^4VIP^1 ] Daca vrei sa vezi jucatorii ^3VIP^1, scrie in chat comanda ^4/vips^1." );
    }
    else
    {
        
remove_taskid );
    }
}
public 
VipsCMDid )
{
    new 
Players[32], inumVipName[32], buffer[164];
    
    
get_playersPlayers ,num"c" )
    {
        for( 
0numi++ )
        {
            if( 
is_player_vip(Players[i]) )
            {
                
get_user_namePlayers[i], VipNamecharsmaxVipName ) );
                
formatexbuffercharsmaxbuffer ), "<u> <font size = 6> VIP's online</u>:^n ^n </font> <body bgcolor = #383838> </body> <center> <font size = 4 color = #380000 face = WildWest> <b> %s^n </b> </font> </center>"VipName );
                
show_motdidbuffer );
            }
            else
            {
                
formatexbuffercharsmaxbuffer ), "<body bgcolor = #383838> <center> <font size = 5 color = 00CC00 face = WildWest> <b> Nu sunt VIP-uri online pe server! </b> </font> </center> </body>"VipName );
                
show_motdidbuffer );
            }
        }
    } 
}

public 
VIP_Itemsid )
{
    if( 
is_user_aliveid ) )
    {

        
set_task(1.0"iScoreBoard"id 6969)

        
set_user_maxspeedidget_user_maxspeedid ) * 10.0 );

        
strip_user_weaponsid )

        
set_user_healthidget_pcvar_numvip_health_cvar ) );
        
set_user_gravityidfloat(get_pcvar_numvip_gravity_cvar ) ) / 800.0 );

        
give_user_weaponidCSW_HEGRENADE_10 );
        
give_user_weaponidCSW_FLASHBANG_10 );
        
give_user_weaponidCSW_SMOKEGRENADE_10 );

        
give_itemid"weapon_knife" );

        switch( 
cs_get_user_teamid ) )
        {
            case 
CS_TEAM_Tgive_user_weaponidCSW_DEAGLE735 );


            case 
CS_TEAM_CT:
            {
                
cs_set_user_modelid"vip" );

                
give_user_weaponidCSW_DEAGLE735 );
                
give_user_weaponidCSW_GLOCK1820120 );
                
give_user_weaponidCSW_USP12100 );
                
give_user_weaponidCSW_M38100 );
                
give_user_weaponidCSW_AWP1030 );
                
give_user_weaponidCSW_M4A13090 );
                
give_user_weaponidCSW_AK473090 );
            }

            default: return;
        }
    }
}

public 
plugin_precache()
{
    
precache_model"models/player/Vip_Glock18.mdl");
    
precache_model"models/player/Vip_Usp.mdl");
    
precache_model"models/player/Vip_Deagle.mdl");
    
precache_model"models/player/Vip_M3.mdl");
    
precache_model"models/player/Vip_Awp.mdl");
    
precache_model"models/player/Vip_M4a1.mdl");
    
precache_model"models/player/Vip_Ak47.mdl");
}

public 
plugin_cfg()
{
    
auto_exec_config("deathrun_vip")
}

public 
iScoreBoard(tID) {
        
        new 
id tID 6969;
        
        
message_begin(MSG_ALLget_user_msgid("ScoreAttrib"));
        
write_byte(id);
        
write_byte(4);
        
message_end();
}

public 
VIP_Hpid )
{
    if( !
id )
        return 
PLUGIN_HANDLED;

    if( 
is_player_vipid ) )
    {
        if( 
HealthRegStartid ] == false )
        {
            
set_taskfloatget_pcvar_numvip_reg_cvar ) ) , "vip_health"id );
            
HealthRegStartid ] = true;
            return 
PLUGIN_CONTINUE;
        }

    }
    return 
PLUGIN_CONTINUE;
}

public 
vip_health(id)
{
    if( 
is_user_aliveid ) )
    {
        
set_user_healthidget_pcvar_numvip_health_cvar ) );
        
HealthRegStartid ]  = false;
    }
    else
    {
        
remove_taskid );
    }
}

public 
VIP_Speedid )
{
    if( 
is_user_aliveid ) && is_player_vipid ) )
    {

        new 
WeaponAmmoBpAmmo;
        
Weapon get_user_weaponidAmmoBpAmmo );

        if( 
Ammo <= && get_pcvar_numvip_ammo_infinite ) >= )
        {
            
give_user_weaponidWeapon40BpAmmo );
        }

        
set_user_maxspeedidget_user_maxspeedid ) * 10.0 );
        
set_user_gravityidfloat(get_pcvar_numvip_gravity_cvar ) ) / 800.0 );

        switch( 
get_user_weaponid ) )
        {

            case 
CSW_GLOCK18:
            {
                
set_pevidpev_viewmodel2"models/player/Vip_Glock18.mdl" );
            }

            case 
CSW_USP:
            {
                
set_pevidpev_viewmodel2"models/player/Vip_Usp.mdl" );
            }

            case 
CSW_DEAGLE:
            {
                
set_pevidpev_viewmodel2"models/player/Vip_Deagle.mdl" );
            }

            case 
CSW_M3:
            {
                
set_pevidpev_viewmodel2"models/player/Vip_M3.mdl" );
            }

            case 
CSW_AWP:
            {
                
set_pevidpev_viewmodel2"models/player/Vip_Awp.mdl" );
            }

            case 
CSW_AK47:
            {
                
set_pevidpev_viewmodel2"models/player/Vip_Ak47.mdl" );
            }

            case 
CSW_M4A1:
            {
                
set_pevidpev_viewmodel2"models/player/Vip_M4a1.mdl" );
            }
        }
    
    }
}

public 
TeleportCMDiPlayer )
{
    if( 
is_player_vipiPlayer ) && is_user_aliveiPlayer ) )
    {
        new 
FloatvOrigin], FloatvViewOfs], FloatvAngles], FloatvVector];
        
entity_get_vectoriPlayerEV_VEC_originvOrigin );
        
entity_get_vectoriPlayerEV_VEC_view_ofsvViewOfs );
        
entity_get_vectoriPlayerEV_VEC_v_anglevAngles );
 
        
vOrigin] = vOrigin] + vViewOfs];
        
vOrigin] = vOrigin] + vViewOfs];
        
vOrigin] = vOrigin] + vViewOfs];
     
        
angle_vectorvAnglesANGLEVECTOR_FORWARDvVector );
     
        
vVector] = vVector] * MAX_DISTANCE vOrigin];
        
vVector] = vVector] * MAX_DISTANCE vOrigin];
        
vVector] = vVector] * MAX_DISTANCE vOrigin];
     
        new 
pTr create_tr2( );
        
engfuncEngFunc_TraceLinevOriginvVectorIGNORE_MONSTERSiPlayerpTr );
     
        new 
FloatflFraction;
        
get_tr2pTrTR_flFractionflFraction );
     
        if( 
flFraction 1.0 )
         {
            new 
iEntityHit;
            
get_tr2pTrTR_pHitiEntityHit );
         
             if( 
iEntityHit == )
             {
                new 
FloatvEndPos];
                
get_tr2pTrTR_vecEndPosvEndPos );
             
                  if( 
point_contentsvEndPos ) != CONTENTS_SKY )
                  {
                      new 
FloatvPlane];
                    
get_tr2pTrTR_vecPlaneNormalvPlane );
                 
                    
vEndPos] = vEndPos] + vPlane] * 40.0;
                    
vEndPos] = vEndPos] + vPlane] * 40.0;
                    
vEndPos] = vEndPos] + vPlane] * 40.0;
                 
                    
entity_set_originiPlayervEndPos );
                    return 
PLUGIN_HANDLED;
                 
                }
            }
        }
     
        
free_tr2pTr );
    }
    return 
PLUGIN_HANDLED;
}


public 
Player_TakeDamage iVictimiInflictoriAttackerFloat:fDamage 
{
    
    if ( 
iInflictor == iAttacker && IsPlayer iAttacker ) && is_player_vipiAttacker ) ) 
    {
        
SetHamParamFloat 4fDamage floatget_pcvar_numvip_dmg_cvar ) ) );
        return 
HAM_HANDLED;
        
    }
        return 
HAM_IGNORED;
    
}

public 
ReviveCMDid )
{
    if( 
is_user_aliveid ) )
    {
        
CCid"!n[ !vVIP!n ] Numai jucatorii morti pot folosi aceasta comanda!" );
        return 
PLUGIN_HANDLED;
    }

    if( !
is_player_vipid ) )
    {
        
CC(id"!n[ !vVIP!n ] Numai daca esti !eVIP!n poti folosi aceasta comanda!" );
        return 
PLUGIN_HANDLED;
    }
    
    
ExecuteHamHam_CS_RoundRespawnid );
    return 
PLUGIN_HANDLED;
    
}

public 
client_putinserverid )
{
    new 
szName32 ];
    
get_user_nameidszNamecharsmaxszName ) );

    if( 
is_player_vipid ) )
    {
        
CC(0"!V[ !e%s !n%s !v] !nVIP-ul !v%s!n s-a connectat de pe server!"PLUGINVERSIONszName );
    }
}

public 
client_disconnectid )
{
    new 
szName32 ];
    
get_user_nameidszNamecharsmaxszName ) );

    if( 
is_player_vipid ) )
    {
        
CC(0"!V[ !e%s !n%s !v] !nVIP-ul !v%s!n s-a deconnectat de pe server!"PLUGINVERSIONszName );
    }
}

bool:is_player_vipid )
{
    new 
szVIP60 ];
    
get_pcvar_stringvip_acces_cvarszVIPcharsmaxszVIP ) - );

    if( 
has_all_flagsidszVIP ) )
    {
        return 
true;
    }
    return 
false;
}

CC(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msgcharsmax(msg), "!v""^4")
    
replace_all(msgcharsmax(msg), "!n""^1")
    
replace_all(msgcharsmax(msg), "!e""^3")
    
    if (
idplayers[0] = id; else get_players(playerscount"ch")
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }
}

auto_exec_config(const szName[], bool:bAutoCreate=true

    new 
szFileName[32
    new 
iLen copy(szFileNamecharsmax(szFileName), szName
    if( 
iLen <= || !equal(szFileName[iLen-4], ".cfg") ) 
    { 
        
add(szFileNamecharsmax(szFileName), ".cfg"
    } 

    new 
szConfigPath[96
    
get_localinfo("amxx_configsdir"szConfigPathcharsmax(szConfigPath)) 
    
format(szConfigPathcharsmax(szConfigPath), "%s/%s"szConfigPathszFileName

    if( 
file_exists(szConfigPath) ) 
    { 
        
server_cmd("exec %s"szConfigPath
        
server_exec() 
        return 

    

    else if( 
bAutoCreate 
    { 
        new 
fp fopen(szConfigPath"wt"
        if( !
fp 
        { 
            return -

        

        new 
szPluginFileName[96], szPluginName[64], szAuthor[32], szVersion[32], szStatus[2
        new 
iPlugin get_plugin(-1,  
                    
szPluginFileNamecharsmax(szPluginFileName),  
                    
szPluginNamecharsmax(szPluginName),  
                    
szVersioncharsmax(szVersion),  
                    
szAuthorcharsmax(szAuthor),  
                    
szStatuscharsmax(szStatus) ) 

        
server_print("Plugin id is %d"iPlugin
        
fprintf(fp"; ^"%s^" configuration file^n"szPluginName
        
fprintf(fp"; Author : ^"%s^"^n"szAuthor
        
fprintf(fp"; Version : ^"%s^"^n"szVersion
        
fprintf(fp"; File : ^"%s^"^n"szPluginFileName

        new 
iMaxiszCommand[64], iCommandAccessszCmdInfo[128], szFlags[32
        
iMax get_concmdsnum(-1, -1
        
fprintf(fp"^n; Console Commands :^n"
        for(
i=0i<iMaxi++) 
        { 
            if( 
get_concmd_plid(i, -1, -1) == iPlugin 
            { 
                
get_concmd(i,  
                        
szCommandcharsmax(szCommand),  
                        
iCommandAccess,  
                        
szCmdInfocharsmax(szCmdInfo),  
                        -
1, -1
                
get_flags(iCommandAccessszFlagscharsmax(szFlags)) 
                
fprintf(fp"; %s | Access:^"%s^" | ^"%s^"^n"szCommandszFlagsszCmdInfo
            } 
        } 

        
iMax get_plugins_cvarsnum() 
        new 
iTempIdiPcvarszCvarName[256], szCvarValue[128
        
fprintf(fp"^n; Cvars :^n"
        for(new 
ii<iMaxi++) 
        { 
            
get_plugins_cvar(iszCvarNamecharsmax(szCvarName), _iTempIdiPcvar
            if( 
iTempId == iPlugin 
            { 
                
get_pcvar_string(iPcvarszCvarValuecharsmax(szCvarValue)) 
                
fprintf(fp"%s ^"%s^"^n"szCvarNameszCvarValue
            } 
        } 

        
fclose(fp
    } 
    return 

}    


give_user_weaponindex iWeaponTypeID iClip=iBPAmmo=)
{
    if( !( 
CSW_P228 <= iWeaponTypeID <= CSW_P90 ) || ( iClip ) || ( iBPAmmo ) || !is_user_aliveindex ) )
        return -
1;
    
    new 
GrenadeBits = ( ( << CSW_HEGRENADE ) | ( << CSW_FLASHBANG ) | ( << CSW_SMOKEGRENADE ) );
    new 
szWeaponName20 ] , iWeaponEntity;
    
get_weaponnameiWeaponTypeID szWeaponName charsmaxszWeaponName ) );
    
    if ( ( 
iWeaponEntity user_has_weaponindex iWeaponTypeID ) ? find_ent_by_owner( -szWeaponName index ) : give_itemindex szWeaponName ) ) > )
    {
        if ( !( 
GrenadeBits & ( << iWeaponTypeID ) ) )
            
cs_set_weapon_ammoiWeaponEntity iClip );
        
        
cs_set_user_bpammoindex iWeaponTypeID iBPAmmo ); 
    }
    
    return 
iWeaponEntity;


Last edited by Ykaru; 07-14-2020 at 09:12.
Ykaru is offline
Ykaru
Member
Join Date: Aug 2019
Old 07-15-2020 , 09:35   Re: Remove Model From Vip
Reply With Quote #2

Up, someone please ?
Ykaru is offline
Ykaru
Member
Join Date: Aug 2019
Old 07-16-2020 , 06:45   Re: Remove Model From Vip
Reply With Quote #3

up
Ykaru is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 07-16-2020 , 06:55   Re: Remove Model From Vip
Reply With Quote #4

What's going
hey up up up up

remove:
Code:
cs_set_user_model( id, "vip" );
__________________
Jailbreak AD 2.0

The greatest civilization of 🇮🇷IRAN🇮🇷

Last edited by alferd; 07-16-2020 at 07:00.
alferd is offline
Reply


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 23:10.


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