Raised This Month: $ Target: $400
 0% 

Semiclip not works


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 08-09-2014 , 15:33   Semiclip not works
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <cstrike>

new CsTeams:g_Team[33 char];
new 
g_Solidg_RestoreSolid;
new 
g_MaxPlayers;

public 
plugin_init() {
    
register_plugin("Team Semi-Clip""1.0.0""Exolent.-");
    
    
register_forward(FM_PlayerPreThink"fw_PlayerPreThink");
    
register_forward(FM_PlayerPostThink"fw_PlayerPostThink");
    
register_forward(FM_AddToFullPack"fw_AddToFullPack_Post"true);
    
    
g_MaxPlayers get_maxplayers();
}

public 
fwdPlayerPreThink(id) {
    static 
LastThinki;
    
    if(
id LastThink) {
        for(
1<= g_MaxPlayersi++) {
            if(!
is_user_alive(i)) {
                
g_Solid &= ~(1<<i);
                continue;
            }
            
            
g_Team{i} = cs_get_user_team(i);
            
            if(
pev(ipev_solid) == SOLID_SLIDEBOX)
                
g_Solid |= (1<<i);
            else
                
g_Solid &= ~(1<<i);
        }
    }
    
    
LastThink id;
    
    if(~
g_Solid & (1<<id))
    {
        return 
FMRES_IGNORED;
    }
    
    for(
1<= g_MaxPlayersi++) {
        if(~
g_Solid & (1<<i) || g_RestoreSolid & (1<<i) || == id)
            continue;
        
        if(
g_Team{id} == g_Team{i}){
            
set_pev(ipev_solidSOLID_NOT);
            
g_RestoreSolid |= (1<<i);
        }
    }
    
    return 
FMRES_IGNORED;
}

public 
fwdPlayerPostThink(id) {
    static 
i;
    
    for(
1<= g_MaxPlayersi++) {
        if(
g_RestoreSolid & (1<<i)) {
            
set_pev(ipev_solidSOLID_SLIDEBOX);
            
g_RestoreSolid &= ~(1<<i);
        }
    }
    
    return 
FMRES_IGNORED;
}

public 
fwdAddToFullPackPost(eseenthosthostflagsplayerpSet) {
    if(
player && g_Solid & (1<<host) && g_Solid & (1<<ent) && g_Team{host} == g_Team{ent}){
        
set_es(esES_SolidSOLID_NOT);
        
        static 
Float:flDistance
        flDistance 
entity_range(hostent)
        if( 
flDistance 512.0 )
        {
            
set_es(esES_RenderModekRenderTransAlpha)
            
set_es(esES_RenderAmtfloatround(flDistance)/2)
        }
    }
    
    return 
FMRES_IGNORED;

__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-09-2014 , 17:49   Re: Semiclip not works
Reply With Quote #2

If you have an issue with a plugin, post in the plugin's thread.
__________________
fysiks is offline
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 08-09-2014 , 18:09   Re: Semiclip not works
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
If you have an issue with a plugin, post in the plugin's thread.
no, this plugin not works!
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 08-09-2014 , 20:14   Re: Semiclip not works
Reply With Quote #4

https://forums.alliedmods.net/showthread.php?t=59594
__________________
Eagle07 is offline
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 08-09-2014 , 20:42   Re: Semiclip not works
Reply With Quote #5

Quote:
Originally Posted by Eagle07 View Post
i need help with my code, no need other link, thanks.
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
Old 08-12-2014, 16:39
Roccoxx
This message has been deleted by hornet. Reason: Wait 14 days before you bump
colossus
Member
Join Date: Sep 2013
Old 08-12-2014 , 19:28   Re: Semiclip not works
Reply With Quote #6

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include <engine>

#define PLUGIN "[CS] Semiclip"
#define VERSION "1.0"
#define AUTHOR "colossus"


new g_bSolidg_bHasSemiclipFloat:g_fOrigin[33][3], g_maxplayers

const SEMICLIP_TRANSAMOUNT     =    75
const SEMICLIP_DISTANCE     =     125

#define flag_get(%1,%2)                (%1 & (1 << (%2 & 31)))
#define flag_set(%1,%2)                (%1 |= (1 << (%2 & 31)))
#define flag_unset(%1,%2)            (%1 &= ~(1 << (%2 & 31)))

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_AddToFullPack"fw_AddToFullPack_Post"1)
    
    
g_maxplayers get_maxplayers()
}

public 
client_PostThink(plr)
{
    if(!
is_user_alive(plr))
        return

    for(new 
id 1id <= g_maxplayersid++)
    {
        if (
is_user_alive(id) && flag_get(g_bHasSemiclipid))
        {
            
entity_set_int(idEV_INT_solidSOLID_SLIDEBOX)
            
flag_unset(g_bHasSemiclipid)
        }
    }
}


public 
client_PreThink(id)
{    
    if (!
is_user_alive(id))
        return;
        
    static 
last_thinki
    
    
if (last_think id)
    {
        for(
1<= g_maxplayersi++)
        {
            if (
is_user_alive(i))
            {
                if(
entity_get_int(iEV_INT_solid) == SOLID_SLIDEBOX)
                    
flag_set(g_bSolidi)
                else
                    
flag_unset(g_bSolidi)
                
entity_get_vector(iEV_VEC_origing_fOrigin[i])
            }
            else 
flag_unset(g_bSolidi)
        }
    }
    
    
last_think id
    
    
if (flag_get(g_bSolidid))
    {
        for(
1<= g_maxplayersi++)
        {
            if (
is_user_alive(i) && flag_get(g_bSolidi) && get_distance_f(g_fOrigin[id], g_fOrigin[i]) <= SEMICLIP_DISTANCE && != id)
            {
                if (
get_user_team(id) == get_user_team(i))
                {
                    
entity_set_int(iEV_INT_solidSOLID_NOT)
                    
flag_set(g_bHasSemiclipi)
                }
            }
        }
    }
}

public 
fw_AddToFullPack_Post(es_handleeenthosthostflagsplayerpSet

    if(!
player
        return 
FMRES_IGNORED;
     
    if (
flag_get(g_bSolidhost) && flag_get(g_bSolident) && get_distance_f(g_fOrigin[host], g_fOrigin[ent]) <= SEMICLIP_DISTANCE)
    {
        if (
get_user_team(host) == get_user_team(ent))
        {
            
set_es(es_handleES_SolidSOLID_NOT)
            
set_es(es_handleES_RenderModekRenderTransAlpha)
            
set_es(es_handleES_RenderAmtSEMICLIP_TRANSAMOUNT)
        }
    }
    return 
FMRES_IGNORED

colossus is offline
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 08-14-2014 , 19:55   Re: Semiclip not works
Reply With Quote #7

Quote:
Originally Posted by colossus View Post
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include <engine>

#define PLUGIN "[CS] Semiclip"
#define VERSION "1.0"
#define AUTHOR "colossus"


new g_bSolidg_bHasSemiclipFloat:g_fOrigin[33][3], g_maxplayers

const SEMICLIP_TRANSAMOUNT     =    75
const SEMICLIP_DISTANCE     =     125

#define flag_get(%1,%2)                (%1 & (1 << (%2 & 31)))
#define flag_set(%1,%2)                (%1 |= (1 << (%2 & 31)))
#define flag_unset(%1,%2)            (%1 &= ~(1 << (%2 & 31)))

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_AddToFullPack"fw_AddToFullPack_Post"1)
    
    
g_maxplayers get_maxplayers()
}

public 
client_PostThink(plr)
{
    if(!
is_user_alive(plr))
        return

    for(new 
id 1id <= g_maxplayersid++)
    {
        if (
is_user_alive(id) && flag_get(g_bHasSemiclipid))
        {
            
entity_set_int(idEV_INT_solidSOLID_SLIDEBOX)
            
flag_unset(g_bHasSemiclipid)
        }
    }
}


public 
client_PreThink(id)
{    
    if (!
is_user_alive(id))
        return;
        
    static 
last_thinki
    
    
if (last_think id)
    {
        for(
1<= g_maxplayersi++)
        {
            if (
is_user_alive(i))
            {
                if(
entity_get_int(iEV_INT_solid) == SOLID_SLIDEBOX)
                    
flag_set(g_bSolidi)
                else
                    
flag_unset(g_bSolidi)
                
entity_get_vector(iEV_VEC_origing_fOrigin[i])
            }
            else 
flag_unset(g_bSolidi)
        }
    }
    
    
last_think id
    
    
if (flag_get(g_bSolidid))
    {
        for(
1<= g_maxplayersi++)
        {
            if (
is_user_alive(i) && flag_get(g_bSolidi) && get_distance_f(g_fOrigin[id], g_fOrigin[i]) <= SEMICLIP_DISTANCE && != id)
            {
                if (
get_user_team(id) == get_user_team(i))
                {
                    
entity_set_int(iEV_INT_solidSOLID_NOT)
                    
flag_set(g_bHasSemiclipi)
                }
            }
        }
    }
}

public 
fw_AddToFullPack_Post(es_handleeenthosthostflagsplayerpSet

    if(!
player
        return 
FMRES_IGNORED;
     
    if (
flag_get(g_bSolidhost) && flag_get(g_bSolident) && get_distance_f(g_fOrigin[host], g_fOrigin[ent]) <= SEMICLIP_DISTANCE)
    {
        if (
get_user_team(host) == get_user_team(ent))
        {
            
set_es(es_handleES_SolidSOLID_NOT)
            
set_es(es_handleES_RenderModekRenderTransAlpha)
            
set_es(es_handleES_RenderAmtSEMICLIP_TRANSAMOUNT)
        }
    }
    return 
FMRES_IGNORED

thanks man
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
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 01:04.


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