|
SourceMod Donor
|
03-14-2013
, 18:56
Re: CollisionHook
|
#16
|
Quote:
Originally Posted by Mirandor
Works on cs:s but get random crashs...
Code:
#include <sourcemod>
#include <collisionhook>
#define VERSION "1.0"
#pragma semicolon 1
public Plugin:myinfo =
{
name = "NoCollide using CollisionHook (with Team Filter)",
author = "",
description = "Players dont collide with team-mates.",
version = VERSION,
url = ""
};
public OnPluginStart()
{
CreateConVar( "sm_nocollideteam_version", VERSION, "Version of NoCollide Team Filter", FCVAR_PLUGIN | FCVAR_REPLICATED | FCVAR_NOTIFY );
}
public Action:CH_PassFilter( ent1, ent2, &bool:result)
{
if ( IsValidClient( ent1 ) && IsValidClient( ent2 ) )
{
if( GetClientTeam( ent1 ) != GetClientTeam( ent2 ) )
{
result = true;
return Plugin_Handled;
}
result = false;
return Plugin_Handled;
}
return Plugin_Continue;
}
stock bool:IsValidClient( client )
{
if ( 0 < client <= MaxClients && IsClientInGame(client) )
return true;
return false;
}
SM 1.5dev MM1.10.0dev - linux
|
Quote:
Are you compiling from source?
|
__________________
Need help? PM me or add me on Steam.
My Steam
Quote:
Originally Posted by Rp.KryptoNite
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
|
|
|
|
|