Raised This Month: $ Target: $400
 0% 

index retreive


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LynX
Veteran Member
Join Date: Oct 2004
Old 05-08-2005 , 11:07   index retreive
Reply With Quote #1

Well, I have this thing

Code:
public origin_set(id) { new index, bodypart get_user_aiming(id, index, bodypart) if(index) { New Float:origin[3] origin[2] -= 50.0 entity_set_origin(index,origin) } else { } return PLUGIN_HANDLED }

Now, in other public, where I CAN'T LOOK AT THAT ENTITY AGAIN, I must set its origin again... Now, how the heck I can do that?
I can't use "index" again... So, any help?
__________________
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 05-08-2005 , 11:12  
Reply With Quote #2

Make it global.
__________________
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 05-08-2005 , 11:20  
Reply With Quote #3

I mean, I can just make index outside as index[33] or just index ?
And then in another function just set its origin again without having to aim at it again
__________________
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 05-08-2005 , 11:28  
Reply With Quote #4

Or I guess you could do this:
Code:
public origin_set(id) {     new index, bodypart     get_user_aiming(id, index, bodypart)     if(index) {         New Float:origin[3]         origin[2] -= 50.0         entity_set_origin(index,origin)     }     else {     }     return PLUGIN_HANDLED } // Somewhere in that above function: myfunc(index,origin) public myfunc(parm,parm2) {     entity_set_origin(parm,parm2) }
__________________
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 05-08-2005 , 11:40  
Reply With Quote #5

Now I'm confused...
What parm and parm2 ?
Can you explain 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 05-08-2005 , 11:47  
Reply With Quote #6

They are replace with index and origin:
myfunc(index,origin)
__________________
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 05-09-2005 , 18:53  
Reply With Quote #7

Could I make it like this:

Code:
public myfunc(id, parm, parm2) { // }

Parm2 is replaced with float, right?
__________________
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 05-09-2005 , 18:59  
Reply With Quote #8

Yea.
Code:
myfunc(origin[1],origin[2])
Should work then..
__________________
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 05-10-2005 , 04:14  
Reply With Quote #9

I know I'm too boring, but since I don't understand this fully...
How would I make that player who went down gets right in front of player when I use that function?
__________________
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
sambro
Member
Join Date: May 2005
Old 05-12-2005 , 19:24  
Reply With Quote #10

I still can't figure out what you're trying to do.

Are you trying to set a users' origin when you execute this command pointing at them, then move them again after that in quick succession?

If so, you might be interested in set_task.
sambro is offline
Send a message via MSN to sambro
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 16:45.


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