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

RSSremove_entity


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Hi
I wanted to add how to copy blocks from this mod to base builder 6.5 mode
That's all I copied and everything works fine
PHP Code:

new bool:userClone[33]

public 
plugin_init()
{

    
register_impulse(100"impulseClone")

}
public 
impulseClone(id){

    
userClone[id]=!userClone[id]
    
    return 
PLUGIN_CONTINUE
}

public 
fw_PlayerPreThink(id)
{
    if( 
userClone[id] && g_iOwnedEnt[id] != 0){
    
        new 
newEnt createClone(g_iOwnedEnt[id])
        if( 
newEnt != -){
            
cmdStopEnt(id)
            
g_iOwnedEnt[id]=newEnt
        
}
        
userClone[id]=false
    
}
}

public 
fw_Traceline(Float:start[3], Float:end[3], conditionsidtrace)
{

        if( 
BlockLocker(ent) == 1)
            return 
0
        
else if( BlockLocker(ent) == ){
        
            new 
newEnt createClone(ent)
            
            if( 
newEnt != -){
                
ent newEnt;
            }else return 
0;
        }
}

public 
createClone(entView){
    new 
ent=create_entity("func_wall")
    if( !
pev_valid(ent) ){
        return -
1;
    }
    new 
szClassName[16]
    
pev(entViewpev_classnameszClassNamesizeof(szClassName))
    
set_pev(ent,pev_classnameszClassName)
    
    
pev(entViewpev_modelszClassNamesizeof(szClassName))
    
set_pev(ent,pev_modelszClassName)
    
    
    
set_pev(ent,pev_solidpev(entViewpev_solid))
    
set_pev(ent,pev_movetypepev(entViewpev_movetype))
    
set_pev(ent,pev_modelindexpev(entViewpev_modelindex))
    
set_pev(ent,pev_bodypev(entViewpev_body))
    
set_pev(ent,pev_skinpev(entViewpev_skin))
    
set_pev(ent,pev_flagspev(entViewpev_flags))
    
set_pev(ent,pev_spawnflagspev(entViewpev_spawnflags))
    
set_pev(ent,pev_teampev(entViewpev_team))
    
    new 
Float:fFloat[3]
    
pev(entViewpev_minsfFloat)
    
set_pev(entpev_minsfFloat)
    
    
pev(entViewpev_maxsfFloat)
    
set_pev(entpev_maxsfFloat)    
    
    
pev(entViewpev_vuser3fFloat)
    
set_pev(entpev_vuser3fFloat)
    
    
pev(entViewpev_vuser1fFloat)
    
set_pev(entpev_vuser1fFloat)    
    
    
pev(entViewpev_originfFloat)
    
entity_set_origin(entfFloat)
    
set_pev(entpev_iuser43)
    
    return 
ent;
        


But the problem is I can not delete the copied blocks in the next round
I do not understand this part
PHP Code:

public resetBlocks(){

    new 
szClass[10], szTarget[7];
    new 
Float:fOrigin[3];        
    for(new 
ent=maxPlayersent<maxEnts;ent ++){
        
        if( !
pev_valid(ent) ) continue;
        if( 
ent == gBarrier )  continue;
            
        
entity_get_string(entEV_SZ_classnameszClasssizeof(szClass));
        
entity_get_string(entEV_SZ_targetnameszTargetsizeof(szTarget));
        
        if( !
equal(szClass"func_wall") || containi(szTarget"ignore") !=-|| equal(szTarget"barrier")) continue;
        
        
unSetBlockent );
        
        if( 
getLock(ent) == remove_entity(ent);
        else if(
getLock(ent) ==  2){            
            
entity_get_vector(entEV_VEC_vuser3fOrigin );
            
entity_set_vector(entEV_VEC_vuser4fOrigin );
            
engfuncEngFunc_SetOriginentfOrigin );
        }else{    
            
engfuncEngFunc_SetOriginentFloat:{0.0,0.0,0.0} );            
            
set_pev(ent,pev_rendermode,kRenderNormal);
            
set_pev(ent,pev_rendercolorFloat:{ 0.00.00.0 });
            
set_pev(ent,pev_renderamt255.0 );
        }
    }
    return 
PLUGIN_CONTINUE;


Which I must add to this section
PHP Code:

public ev_RoundStart()
{
    
remove_task(TASK_BUILD)
    
remove_task(TASK_PREPTIME)
    
    
arrayset(g_iOwnedEntities0MAXPLAYERS+1)
    
arrayset(g_iColor0MAXPLAYERS+1)
    
arrayset(g_iColorOwner0MAX_COLORS)
    
arrayset(g_boolRepicktrueMAXPLAYERS+1)
    
    
g_boolRoundEnded false
    g_boolCanBuild 
true
    g_fRoundStartTime 
get_gametime()
    
    if (
g_iResetEnt)
    {
        new 
szClass[10], szTarget[7];
        for (new 
iEnt g_iMaxPlayers+1iEnt MAXENTSiEnt++)
        {
            
            if (
is_valid_ent(iEnt))
                
                
entity_get_string(iEntEV_SZ_classnameszClass9);
                
entity_get_string(iEntEV_SZ_targetnameszTarget6);

                if (!
BlockLocker(iEnt) && iEnt != g_iEntBarrier && equal(szClass"func_wall") && !equal(szTarget"ignore"))
                {
                    
set_pev(iEnt,pev_rendermode,kRenderNormal)
                    
engfuncEngFunc_SetOriginiEntFloat:{ 0.00.00.0 } );
                    
                    
UnsetLastMover(iEnt);
                    
UnsetEntMover(iEnt);
                }
                else if (
g_iLockBlocks && BlockLocker(iEnt))
                {
                    
UnlockBlock(iEnt)
                    
set_pev(iEnt,pev_rendermode,kRenderNormal)
                    
engfuncEngFunc_SetOriginiEntFloat:{ 0.00.00.0 } );
                    
                    
UnsetLastMover(iEnt);
                    
UnsetEntMover(iEnt);
                }
        }
    }


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

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...