Raised This Month: $ Target: $400
 0% 

Model should work only in a specific radius


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
D o o m
Veteran Member
Join Date: Sep 2005
Location: Germany
Old 05-01-2008 , 00:01   Model should work only in a specific radius
Reply With Quote #1

Hello all together

I've got a little problem with a hero.
I wanna set a model, if player A is in a specific radius to player B.

The model setting works and I tried to use an if-command to check about the radius, but it isn't working (the model is always set.. It doesn't matter if the players are in the radius or outside).

Maybe some1 knows another way to do it or how to fix it..

*EDIT*
To make it more clear for you, I wanna do a mix between Hulk and Wonder Woman.
Enemies around the player should all be frozen and the model should be set.

Well, I think the problem is, I'm asking if the player and the player's team is in range..
But the model setting worked this way and the problem is I couldn't find a command in the amxmodx.inc file to check the enemy..
Attached Files
File Type: sma Get Plugin or Get Source (sh_wonderwoman.sma - 287 views - 6.5 KB)
__________________
Heroes
:+: Deadpool :+:

Last edited by D o o m; 05-01-2008 at 09:39.
D o o m is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 05-01-2008 , 01:15   Re: Model should work only in a specific radius
Reply With Quote #2

line 144: new enemy = get_user_team(id)

That would get 0 1 2 or 3... and you are using it as an player index not as the team index...

What you need to do is pass set_model in your for loop to send the correct info.


----------------
Also, your posted example for radius is just wrong, luckily you did it right in the code.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
D o o m
Veteran Member
Join Date: Sep 2005
Location: Germany
Old 05-01-2008 , 09:28   Re: Model should work only in a specific radius
Reply With Quote #3

I'm such an idiot! >.<

Thank you very much vittu
It works now perfect.

There's only 1 problem left: If you get catched by the hero and you have a sniper and begin to scope, you can leave the "lasso"..
Is there an opportunity to avoid this?
__________________
Heroes
:+: Deadpool :+:
D o o m is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 05-01-2008 , 14:04   Re: Model should work only in a specific radius
Reply With Quote #4

Quote:
Originally Posted by D o o m View Post
There's only 1 problem left: If you get catched by the hero and you have a sniper and begin to scope, you can leave the "lasso"..
Is there an opportunity to avoid this?
That is a bug in the speed system, which should be fixed in the next release. (it was not checked against before)
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
D o o m
Veteran Member
Join Date: Sep 2005
Location: Germany
Old 05-01-2008 , 17:32   Re: Model should work only in a specific radius
Reply With Quote #5

I see, thank you very much for your help

Topic could be closed as long as it's not needed anymore.
__________________
Heroes
:+: Deadpool :+:
D o o m 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 00:22.


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