Raised This Month: $ Target: $400
 0% 

SEMI CLIP surf


  
 
 
Thread Tools Display Modes
Author Message
manguedebol
Veteran Member
Join Date: Feb 2010
Location: France,Somme,Abbeville
Old 10-22-2011 , 09:32   SEMI CLIP surf
#1

Bonjour , je cherche un "nobloc" semiclip pour mon serveur surf ,

j'ai pris celui-ci :

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

new const VERSION[] = "0.7.0"

const MAX_PLAYERS = 32

new g_iPlayers[MAX_PLAYERS], g_iNum, g_iPlayer, i
new const g_szAliveFlags[] = "a"
#define RefreshPlayersList()   get_players(g_iPlayers, g_iNum, g_szAliveFlags)

public plugin_init()
{
   register_plugin("Semiclip", VERSION, "ConnorMcLeod")

   register_forward(FM_AddToFullPack, "FM_client_AddToFullPack_Post", 1)

   RegisterHam(Ham_Player_PreThink, "player", "Ham_CBasePlayer_PreThink_Post", 1)
}

public FM_client_AddToFullPack_Post(es, e, iEnt, id, hostflags, player, pSet)
{
   if( player && id != iEnt && get_orig_retval() && is_user_alive(id) )
   {
      set_es(es, ES_Solid, SOLID_NOT)

      static Float:flDistance
      flDistance = entity_range(id, iEnt)
      if( flDistance < 512.0 )
      {
         set_es(es, ES_RenderMode, kRenderTransAlpha)
         set_es(es, ES_RenderAmt, floatround(flDistance)/2)
      }
   }
}

public Ham_CBasePlayer_PreThink_Post(id)
{
   if( !is_user_alive(id) )
   {
      return
   }

   RefreshPlayersList()

   for(i = 0; i<g_iNum; i++)
   {
      g_iPlayer = g_iPlayers[i]
      if( id != g_iPlayer )
      {
         set_pev(g_iPlayer, pev_solid, SOLID_NOT)
      }
   }
}

public client_PostThink(id)
{
   if( !is_user_alive(id) )
   {
      return
   }

   RefreshPlayersList()

   for(i = 0; i<g_iNum; i++)
   {
      g_iPlayer = g_iPlayers[i]
      if( g_iPlayer != id )
      {
         set_pev(g_iPlayer, pev_solid, SOLID_SLIDEBOX)
      }
   }
}
Mais dès qu'on tombe de la map on meurs, ( alors qu'au surf , on revient au début ) et y a des perte de gravité a certain endroit de la map , il y a t-il un autre semi clip qui serait sans bug ?

Cordialement
manguedebol is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-22-2011 , 10:04   Re: SEMI CLIP surf
#2

Ca n'a à priori rien à voir avec le plugin.
Sur les maps surf quand tu tombes tu meurs, sauf si un plugin t'en empêche et te téléporte au début.
Ceci dit y'a une version de ce plugin en module, donc qui utilise moins de ressources.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 10-22-2011 at 10:04.
ConnorMcLeod is offline
manguedebol
Veteran Member
Join Date: Feb 2010
Location: France,Somme,Abbeville
Old 10-22-2011 , 10:16   Re: SEMI CLIP surf
#3

je joue sur surf_ski_2 , et quand tu tombe , sa te téléporte dans la jail , mais j'ai retiré la jail avec un plugn qui permet donc de revenir au début a chaque fois qu'on tombe, et avec ton plugin , si on tombé on était plus téléporté au début , on mourrais ,

j'ai mis ce plugin :

Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "Semiclip"
#define VERSION "1.31"
#define AUTHOR "skyjur"

new bool:plrSolid[33]
new bool:plrRestore[33]
new plrTeam[33]

new maxplayers

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_forward(FM_PlayerPreThink, "preThink")
    register_forward(FM_PlayerPostThink, "postThink")
    
    register_forward(FM_AddToFullPack, "addToFullPack", 1)
    
    maxplayers = get_maxplayers()
}

public addToFullPack(es, e, ent, host, hostflags, player, pSet)
{
    if(player)
    {
        if(plrSolid[host] && plrSolid[ent] && plrTeam[host] == plrTeam[ent])
        {
            set_es(es, ES_Solid, SOLID_NOT)
            set_es(es, ES_RenderMode, kRenderTransAlpha)
            set_es(es, ES_RenderAmt, 85)
        }
    }
}

FirstThink()
{
    for(new i = 1; i <= maxplayers; i++)
    {
        if(!is_user_alive(i))
        {
            plrSolid[i] = false
            continue
        }
        
        plrTeam[i] = get_user_team(i)
        plrSolid[i] = pev(i, pev_solid) == SOLID_SLIDEBOX ? true : false
    }
}

public preThink(id)
{
    static i, LastThink
    
    if(LastThink > id)
    {
        FirstThink()
    }
    LastThink = id

    
    if(!plrSolid[id]) return
    
    for(i = 1; i <= maxplayers; i++)
    {
        if(!plrSolid[i] || id == i) continue
        
        if(plrTeam[i] == plrTeam[id])
        {
            set_pev(i, pev_solid, SOLID_NOT)
            plrRestore[i] = true
        }
    }
}

public postThink(id)
{
    static i
    
    for(i = 1; i <= maxplayers; i++)
    {
        if(plrRestore[i])
        {
            set_pev(i, pev_solid, SOLID_SLIDEBOX)
            plrRestore[i] = false
        }
    }
} 


et la ces nikel , il y a le semiclip .


manguedebol is offline
 



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 20:01.


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