Raised This Month: $ Target: $400
 0% 

3 questions.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LynX
Veteran Member
Join Date: Oct 2004
Old 11-02-2005 , 13:51   3 questions.
Reply With Quote #1

1. I need to do a function the moment player hits water. How can I do that ?
2. Is there a way to set rendering mode on all water on map ( set_rendering or smthing ).
3. Let's say I have player in air flying. I need to find out his origin as he wasn't flying ( ground ). I just want to find out ground origin of him, that its exactly ground, not few feet down of ground, etc.

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
Zenith77
Veteran Member
Join Date: Aug 2005
Old 11-02-2005 , 13:55  
Reply With Quote #2

1.


Code:
new bool:isinWater[id] public client_PreThink(id) {   new flags = get_user_flags(id)   if( (flags &FL_INWATER) && !isinWater[id]) { // make sure we only execute the function once!              isinWaTer[id]  = true                    myFunc() // execute the function    }    if( !(flags  &FL_INWATER) ) {          isinWater[id] = false     } }

2. Dont know

3.

Code:
new iOrigin[3] get_user_origin(id, iOrigin, 0) origin[1] -= origin [1]
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 11-02-2005 , 14:10  
Reply With Quote #3

1. Ok, thanks.

2. Anybody?

3. I just need origin on GROUND. Not on all the way to ground >.<
__________________
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
Zenith77
Veteran Member
Join Date: Aug 2005
Old 11-02-2005 , 14:19  
Reply With Quote #4

Quote:
3. I just need origin on GROUND. Not on all the way to ground >.<

huh?
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 11-02-2005 , 14:25  
Reply With Quote #5

[img]http://img328.**************/img328/4162/newacdsee60bmpimage1mo.jpg[/img]

I need to know just origin on ground, that I spawn something on it.
__________________
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
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-02-2005 , 15:02  
Reply With Quote #6

Code:
new origin1[3]; get_user_origin(id,origin1); new origin2[3]; origin2[0] = origin1[0]; origin2[1] = origin1[1]; origin2[2] = origin1[2] + 20;
Use origin2
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 11-02-2005 , 15:25  
Reply With Quote #7

Thanks v3x. I'm gonna try.

Btw, second question. Anybody knows how to do stuff on water? I mean, water is entity so I should be able to render it and such.
If its possible please gimme a snippet.
__________________
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
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-02-2005 , 18:10  
Reply With Quote #8

Just spawn something at the player's origin and use drop_to_floor
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 11-03-2005 , 04:26  
Reply With Quote #9

I think that is better idea then v3x, I'm gonna use it.

Anyone to help with water ( how can I use set_rendering on water ? )
__________________
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
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 11-03-2005 , 07:52  
Reply With Quote #10

Code:
new ent; while((ent = find_ent_by_class(ent,"func_water")) != 0) // forgot if it's func water or not {     set_rendering(whatever); }

If it's not that, then I think it's just a func_wall with solid turned off on it. You could cycle through all ents and if a keyval is solid 0, and some other stuff that's water specific, render it.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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:44.


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