AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Semiclip (https://forums.alliedmods.net/showthread.php?t=300063)

PurposeLessx 08-04-2017 07:54

Semiclip
 
I have a problem. When I use this semiclip, the server crashs.
Please do not say me that "Use other semiclip plugin." I need this plugin.
Could you help me about my problem?
Thanks for helping me

PHP Code:

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

#define IsPlayer(%1) (1 <= %1 <= get_maxplayers())

new players[32], inumsemiclip_cvarmp_friendlyfiresyncObj
new iTeams[33] = {-1, ...};

public 
plugin_init() {
    
register_plugin("Semiclip""1.1""Crusher918"// Edited by PurposeLess
    
    
RegisterHam(Ham_Player_PreThink"player""FwdHamPlayerPreThink"true)
    
RegisterHam(Ham_Killed"player""FwdHamPlayerKilled"true)
    
register_forward(FM_ShouldCollide"FwdShouldCollide")
    
register_forward(FM_AddToFullPack"FwdAddToFullPack"true)
    
    
semiclip_cvar register_cvar("semiclip""0")
    
mp_friendlyfire register_cvar("mp_friendlyfire""0")
    
syncObj CreateHudSyncObj();
}

public 
FwdHamPlayerPreThink(const id) {
    if(
get_pcvar_num(semiclip_cvar)) {
        
Semiclip(idSOLID_NOT)
    }
}

public 
client_PostThink(id) {
    if(
get_pcvar_num(semiclip_cvar)) {
        
Semiclip(idSOLID_SLIDEBOX)
    }
}

public 
FwdHamPlayerKilled() {
    if(
get_pcvar_num(semiclip_cvar)) {
        
get_players(playersinum"ae")
        for(new 
i=0inumi++) {
            
entity_set_int(players[i], EV_INT_solidSOLID_SLIDEBOX)
        }
    }
}

public 
FwdShouldCollide(const touched, const other) {
    if(
get_pcvar_num(mp_friendlyfire))
        return 
FMRES_IGNORED;
    
    if(
get_pcvar_num(semiclip_cvar)) {
        if(
IsPlayer(touched) && IsPlayer(other)) {
            
iTeams[touched]  = get_user_team(touched);
            
iTeams[other]    = get_user_team(other);
            
            if(
iTeams[touched] == iTeams[other]) {
                static 
idbody
                get_user_aiming
(touchedidbody)
                if(
id != touched && is_user_connected(id))
                {
                    static 
name[32]
                    
get_user_name(idnamecharsmax(name))
                    
set_hudmessage(255,0,00.00.870)
                    
ShowSyncHudMsg(touchedsyncObj"%s"name)
                }
                
forward_return(FMV_CELL0)
                return 
FMRES_SUPERCEDE;
            }
        }
    }
    return 
FMRES_IGNORED;
}

public 
FwdAddToFullPack(eseiEntidhostflagsplayerpSet) {
    if(
get_pcvar_num(semiclip_cvar)) {
        if(
player && id != iEnt && get_orig_retval()) {
            
iTeams[id]        = get_user_team(id); 
            
iTeams[iEnt]    = get_user_team(iEnt);
            if(
iTeams[id] == iTeams[iEnt])
                
set_es(esES_SolidSOLID_NOT)
        }
    }
}

Semiclip(const id, const solid) {
    if(
get_pcvar_num(semiclip_cvar)) {
        if(!
is_user_alive(id))
            return
        
        
get_players(playersinum"a")
        for(new 
0inumi++) {
            if(
id != players[i]) {
                
iTeams[id]        = get_user_team(id); 
                
iTeams[players[i]]    = get_user_team(players[i]);
                
                if(
iTeams[id] == iTeams[players[i]])
                    
entity_set_int(players[i], EV_INT_solidsolid)
            }
        }
    }



PurposeLessx 08-08-2017 18:06

Re: Semiclip
 
Isn't anyone gonna help me?
Please help me

PurposeLessx 08-10-2017 14:47

Re: Semiclip
 
Help me plz

SomewhereLost 08-10-2017 20:47

Re: Semiclip
 
Use other semiclip plugin.

PurposeLessx 08-11-2017 02:56

Re: Semiclip
 
Quote:

Originally Posted by SomewhereLost (Post 2540821)
Use other semiclip plugin.

Would you recommend me a semiclip plugin ?
It must be fixed. The door isn't opened while semiclip is on.
Thanks for helping

SomewhereLost 08-11-2017 10:06

Re: Semiclip
 
I would recommend you this one

https://forums.alliedmods.net/showthread.php?t=250891

Tested on my surf server long ago, was working fine.

PurposeLessx 08-11-2017 15:29

Re: Semiclip
 
I can not use it unfortunately.
In my server, metamod is not allowed. I can not upload .dll and .so.
I need the semiclip with sma.

kristi 08-11-2017 15:46

Re: Semiclip
 
https://forums.alliedmods.net/showthread.php?t=137980

PurposeLessx 08-11-2017 16:15

Re: Semiclip
 
Quote:

Originally Posted by kristi (Post 2540956)

It works but there is a door bug. I need the semiclip plugin that there isn't a bug.

PurposeLessx 08-13-2017 06:52

Re: Semiclip
 
Help?


All times are GMT -4. The time now is 23:12.

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