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

[SOLVED] [CSS] Entity Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Razmo51
Senior Member
Join Date: Aug 2011
Location: Event "player_death
Old 04-07-2012 , 18:36   [SOLVED] [CSS] Entity Problem
Reply With Quote #1

hello,

I'm looking to delete a button on a certain map, i'm sure of the coordinate of the button, so I tested a code, but It don't work ;X

PHP Code:
public OnPluginStart()
{
    
HookEvent("round_start"Event_Start);    
}

public 
Action:Event_Start(Handle:event,const String:name[],bool:dontBroadcast)
{
    
CreateTimer(2.0,delete);
}

public 
Action:delete(Handle:timer)
{
    new 
entindex = -1;
    while ((
entindex FindEntityByClassname(entindex"func_button")) != -1)
    {
        if(
IsValidEntity(entindex))
        {
            new 
Float:pos[3];
            
GetEntPropVector(entindexProp_Send"m_vecOrigin"pos);
            if(
pos[0] == 465.500000 && pos[1] == -4.010009 && pos[2] == -42.000000)
            {
                
PrintToChatAll("\x04Button: %i",entindex);
                
AcceptEntityInput(entindex"Kill");
                
PrintToChatAll("\x04Button: %i deleted",entindex);
            }
        }
    }

I put a delay of 2 seconds because the button is attached to a prop that is falling at the start of the round.

the code doesn't work, can you have a look ?

thx
__________________
Sorry for my bad English, I'm Belgian

Last edited by Razmo51; 04-08-2012 at 19:05.
Razmo51 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 04-07-2012 , 19:22   Re: [CSS] Entity Problem
Reply With Quote #2

try
if((pos[0] == 465.500000) && (pos[1] == -4.010009) && (pos[2] == -42.000000))
idk what that would do, worth a try.
"button is attached to a prop that is falling at the start of the round"
and your trying to get an origin of a falling prop? Try getting the m_iName of the button instead.
Mitchell is offline
TheAvengers2
BANNED
Join Date: Jul 2011
Old 04-07-2012 , 19:28   Re: [CSS] Entity Problem
Reply With Quote #3

If the prop is falling then there's no guarantee as to what the final coordinates will be. I would highly recommend installing Stripper:Source. You can then try to find the prop in question using stripper_dump. After that, you can easily modify or remove it entirely using Stripper:Source.

Quote:
Originally Posted by Mitchell View Post
try
if((pos[0] == 465.500000) && (pos[1] == -4.010009) && (pos[2] == -42.000000))
idk what that would do, worth a try.
That won't do anything differently. The code will behave exactly the same way it did without the parentheses.

Last edited by TheAvengers2; 04-07-2012 at 19:38.
TheAvengers2 is offline
Razmo51
Senior Member
Join Date: Aug 2011
Location: Event "player_death
Old 04-07-2012 , 19:45   Re: [CSS] Entity Problem
Reply With Quote #4

when I compared the coordinate before and after the falling, the prop fall 0.5 and stop moove, and the prop fall a the same coordinate at all the time

Quote:
You can then try to find the prop in question using stripper_dump. After that, you can easily modify or remove it entirely using Stripper:Source.
Can you tell me moore about that, I don't know this thing
__________________
Sorry for my bad English, I'm Belgian
Razmo51 is offline
TheAvengers2
BANNED
Join Date: Jul 2011
Old 04-07-2012 , 19:52   Re: [CSS] Entity Problem
Reply With Quote #5

You can look up information about it on its thread or website.
TheAvengers2 is offline
Razmo51
Senior Member
Join Date: Aug 2011
Location: Event "player_death
Old 04-08-2012 , 06:36   Re: [CSS] Entity Problem
Reply With Quote #6

I installed Stripper:Source successfully, I've put in global_filters.cfg:

PHP Code:
remove:
{
    
"classname"    "func_button"
    "origin"    "465.500000 -4.010009 -42.000000"

but It doesn't work anymoore ><
__________________
Sorry for my bad English, I'm Belgian
Razmo51 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-08-2012 , 09:47   Re: [CSS] Entity Problem
Reply With Quote #7

can you tell map name ? adn what game.
__________________
Do not Private Message @me
Bacardi is offline
Razmo51
Senior Member
Join Date: Aug 2011
Location: Event "player_death
Old 04-08-2012 , 09:57   Re: [CSS] Entity Problem
Reply With Quote #8

mg_big_city on a CSS server
__________________
Sorry for my bad English, I'm Belgian
Razmo51 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-08-2012 , 11:02   Re: [CSS] Entity Problem
Reply With Quote #9

This ??
I don't find anything that coordinates, it locate high at sky. Can't see anything fall from sky...

*edt
type in your own console
getpos
you get coordinates where you are.

Do you want remove button from one of those vehicles ?

Last edited by Bacardi; 04-08-2012 at 12:33.
Bacardi is offline
Razmo51
Senior Member
Join Date: Aug 2011
Location: Event "player_death
Old 04-08-2012 , 14:57   Re: [CSS] Entity Problem
Reply With Quote #10

I want to remove the second button (a the right) of the helicopter, I'm sure of the coordinate of the button

I thought that the helicoper were falling, but now, It doesn't, this is the same coordinate at all the time, so don't need a timer...

but I don't understand why the Stripper:Source don't remove the button
__________________
Sorry for my bad English, I'm Belgian
Razmo51 is offline
Reply


Thread Tools
Display Modes

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 18:43.


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