AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   My semiclip code don't work (https://forums.alliedmods.net/showthread.php?t=164126)

m0skVi4a 08-07-2011 14:54

My semiclip code don't work
 
Hello.
This is my simple semiclip plugin, but it doesn't work
PHP Code:

#include <amxmodx>
#include <fakemeta>

#define DISTANCE 220

new g_on
new Float:g_fOrigin[33][3];

public 
plugin_init() 
{
    
register_plugin("Semiclip""1.0""m0skVi4a")
    
    
g_on register_cvar("semiclip_on""1")
    
    
register_forwardFM_PlayerPreThink"fwdPlayerPreThink" );
}

public 
fwdPlayerPreThink(onetwo
{
    if(
get_pcvar_num(g_on))
    {
        if(
get_user_team(one) == get_user_team(two)) 
        {
            if(
get_distance_f(g_fOrigin[one], g_fOrigin[two] ) <= DISTANCE && one != two)
            {
                
set_pev(onetwopev_solidSOLID_BBOX)
                
set_es(oneES_RenderModekRenderTransAlpha );
                
set_es(oneES_RenderAmt85 );
                
set_es(twoES_RenderModekRenderTransAlpha );
                
set_es(twoES_RenderAmt85 );
            }
            else
            {
                
set_pev(onetwopev_solidSOLID_NOT)
            }
        }
    }


Where is the problem

ConnorMcLeod 08-07-2011 15:00

Re: My semiclip code don't work
 
Why would it work ?

m0skVi4a 08-07-2011 15:04

Re: My semiclip code don't work
 
It doesn't do enithig. It don't work the renderig, the main semiclip. Try it

ConnorMcLeod 08-07-2011 15:06

Re: My semiclip code don't work
 
Don't need to try it to see it doesn't work.
What is "two" ???

m0skVi4a 08-07-2011 15:08

Re: My semiclip code don't work
 
one is the id of the first player, two is the id of the second player

ConnorMcLeod 08-07-2011 16:11

Re: My semiclip code don't work
 
Since when PreThink is passing 2 players indexes ?

This gonna makes your life easier : http://forums.alliedmods.net/showthread.php?t=163322

m0skVi4a 08-08-2011 05:57

Re: My semiclip code don't work
 
Dude. This is for source. And i want to use my code, because is much more simpler and i want to add it to my plugin that is very big.
Can you help me to fix it

abdul-rehman 08-08-2011 06:19

Re: My semiclip code don't work
 
That is for HL 1 not source !

fysiks 08-08-2011 08:02

Re: My semiclip code don't work
 
Quote:

Originally Posted by m0skVi4a (Post 1528058)
Dude. This is for source. And i want to use my code, because is much more simpler and i want to add it to my plugin that is very big.
Can you help me to fix it

Nothing in this thread or even this whole section is for source games. Scripting for source games is done with SourceMod.

m0skVi4a 08-08-2011 12:07

Re: My semiclip code don't work
 
Yes my problem is for HL1, Not source


All times are GMT -4. The time now is 01:30.

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