Raised This Month: $ Target: $400
 0% 

Solved Blocking func_conveyor.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 04-23-2022 , 08:15   Re: Blocking func_conveyor.
Reply With Quote #1

Quote:
Originally Posted by Craxor View Post
The entity or whatever is the "speed band on deathrun zones"you know the speed band from deathrum mode that terorist have .

I've used FM_touch to find out its Entity ClassName, and it printed as being func_conveyor and the portal as trigger_teleport , i've tried to block them with register_touch() on trigger_teleport it worked perfectly but func_conveyor doesn't work .

I'll try to make some tests to see if it working (my goal is to block them when the DUEL is on so the players wont use it in duels ) .

Edit: Isn't there a way just to block touching it? I mean even if you touch you wont gain speed or anything ?
Looking at your code from 1st post I thought you want to block it forever.

Then you can make it like this:
PHP Code:
// I will stand by my opinion until get other way to block it
#include <everything_you_need>

new Array:g_conveyorEnts,
    
outside_map[3] = { -4096.0, -4096.0, -4096.0 },
    
back_to_map[3] = { 0.00.00.0 }

public 
plugin_init()
{
    
// ...
    
    
register()
}

public 
register()
{
    
g_conveyorEnts ArrayCreate(1)
    
    new 
ent = -1
    
    
do {
        
ent find_ent_by_class(ent"func_conveyor")
        
        if(
is_valid_ent(ent)) // i forgor to check if it is valid
        
{
            
ArrayPushCell(g_conveyorEntsent// if there are any entity, register it
        
}
    }
    while(
ent
}

public 
plugin_end()
{
    
ArrayDestroy(g_conveyorEnts)
}

public 
execute_me_on_duel_start()
{
    
// on duel start, loop through every registered entity and move it outside of the map
    
for(new iArraySize(g_conveyorEnts); i++)
    {
        
entity_set_vector(iEV_VEC_originoutside_map)
    }
}

public 
execute_me_on_duel_end_or_new_round()
{
    
// on duel end, loop through every registered entity and move it back
    
for(new iArraySize(g_conveyorEnts); i++)
    {
        
entity_set_vector(iEV_VEC_originback_to_map)
    }

__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951

Last edited by kww; 04-23-2022 at 08:22.
kww is offline
Reply



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 21:19.


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