Raised This Month: $51 Target: $400
 12% 

Solved Blocking func_conveyor.


Post New Thread Reply   
 
Thread Tools Display Modes
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-24-2022 , 08:47   Re: Blocking func_conveyor.
Reply With Quote #11

In rmv and addx you are missing ent = ArrayGetCell(g_conveyorEnts, i) to get the actual entity, on which you should do entity_set_vector.
__________________
HamletEagle is offline
Old 04-24-2022, 14:27
kww
This message has been deleted by kww. Reason: nbm
zXCaptainXz
Member
Join Date: May 2017
Old 04-24-2022 , 15:04   Re: Blocking func_conveyor.
Reply With Quote #12

Quote:
Originally Posted by JocAnis View Post
Hi, there is option to change entity's value, in this situation it would be 'speed' but problem is that u need it only for specific players/duel. You can try to solve this with pev_groupinfo maybe?

What he said works, you can try this if you want, type amx_disable to disable to disable all conveyors, amx_enable to enable them all again, you can use whatever is inside cmdDisable and cmdEnable in your last request code (Disable on start, Enable on finish...)

PHP Code:
#include <amxmodx>
#include <engine>

new bool:Disabled

public plugin_init()
{
    
register_concmd("amx_disable""cmdDisable")
    
register_concmd("amx_enable""cmdEnable")
}

public 
cmdDisable()
{
    if(
Disabled)
        return;
    
    
Disabled true;

    new 
ent
    
while((ent find_ent_by_class(ent,"func_conveyor")) != 0)
    {
        
entity_set_float(entEV_FL_fuser1entity_get_float(entEV_FL_speed))
        
entity_set_float(entEV_FL_speed0.0)
    }
}

public 
cmdEnable()
{
    if(!
Disabled)
    {
        return;
    }

    
Disabled false;
    
    new 
ent
    
while((ent find_ent_by_class(ent,"func_conveyor")) != 0)
    {
        
entity_set_float(entEV_FL_speedentity_get_float(entEV_FL_fuser1))
    }

zXCaptainXz is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 04-25-2022 , 05:29   Re: Blocking func_conveyor.
Reply With Quote #13

Thanks again Captain, your code works perfectly .
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
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 23:56.


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