Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

Paintball Mod Help With Entitys


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Hello everyone! well, i need help with this paintball script

I do not want bullets to break entities on the map, at least not the base boxes, but I do want them to break glass or bars,
I found a small solution to this, which is only allowing some entities to be affected by the painting and the rest not, however some entities are affected because their EntIDs are the same, I publish the part of the code that is what affects this.

I wanted to know if it is possible to make that for each map, I can choose which entities can be broken


PHP Code:

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

#define PLUGIN "Paintball Gun"
#define VERSION "3.4"
#define AUTHOR "WhooKid"

new const boxes []=
{
    
//de_nuke
    
111,
    
114,
    
115,
    
165,
    
166,
    
169,
    
172,
    
185,
    
//de_inferno
    
179,
    
//de_prodigy
    
86,
    
98,
    
99,
    
100,
    
125,
    
157,
    
158,
    
//de_survivor
    
100,
    
146,
    
147,
    
148,
    
149,
    
//de_cpl_mill
    
236,
    
//de_mirage
    
69,
    
70,
    
71,
    
72,
    
77,
    
81
}

public 
fw_touch(bulletent)
{
new 
bool:valid_surface = (is_ent_alive || containi(class2"door") != -1) ? false true;
if (
pev(entpev_health) && !is_ent_alive// && pev(ent, pev_takedamage) != DAMAGE_NO)
            
{
            new 
bool:isbox true
            
for(new 0sizeof(boxes); i++)
            if(
ent == boxes[i])
                {
                
isbox false
                
break
                }
                
            if(!
isbox)
        
ExecuteHam(Ham_TakeDamageentownerownerfloat(pev(entpev_health)), 0);
        
valid_surface false;
        }
        
        
        if (
valid_surface)
        {
            
paint_splat(bullet);
            
set_task(float(get_pcvar_num(blife)), "paint_reset"bullet+TASK_PB_RESET);
        }
        else
            
paint_reset(bullet+TASK_PB_RESET);

        return 
FMRES_HANDLED
    }
    return 
FMRES_IGNORED;


Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

×
×
  • Dodaj nową pozycję...