Raised This Month: $ Target: $400
 0% 

Barrier & find_ent_by_model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LynX
Veteran Member
Join Date: Oct 2004
Old 03-31-2005 , 10:35   Barrier & find_ent_by_model
Reply With Quote #1

1 ) I'm looking for a way that I would make that other players can not close to player on which this function is in progress. So, if an opponent closes to player which has this barrier on - it tosses him away, so he cannot get to player close. So, basically I'm looking for code that will swat opponent back 12 meters if he closed on 3 metres to player. I know this is possible, because I've seen it on server and it worked just beautfull. I think you need to do something with vectors or somthing - but can you show me as I never used vectors.

2) find_ent_by_model function works for finding entity by model, right? But, I just want to find entity by model, not by classname because I don't know classname.

I made it like this:

Code:
SpriteIndex[id] = find_ent_by_model(id, _ , "banner.spr")

But it gave me erros and didn't wanted to compile.
I created new array SpriteIndex[33], so that's not the problem. Problem is that it does not accept "_" , so I don't know what to do. I just want to find by model, not by model AND classname. Any suggestions?

Thanks.
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-31-2005 , 12:45  
Reply With Quote #2

Well no duh it wont accept "_", its not a valid variable.

find_ent_by_model ( StartEntity, Classname[], Model[] )

You have to specify a classname. You cannot NOT specify one. You might be able to put in "" or "*", but why the hell did you think _ would work.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
LynX
Veteran Member
Join Date: Oct 2004
Old 03-31-2005 , 13:32  
Reply With Quote #3

Well, it works all the time when I don't specify something in, let's say set_task.
But I'll try it now. Thnx Mel ^^ .

Any idea on push-away ( barrier ) thing?
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
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 10:02.


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