Raised This Month: $ Target: $400
 0% 

Origin help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DiscoBBQ
Veteran Member
Join Date: Jan 2005
Location: Clemson, South Carolina
Old 03-14-2005 , 20:29   Origin help
Reply With Quote #1

Ok well. For my server i made an inventory mod
and theres likea few 'rare items' that im adding.
one is a teleport necklas.
I want it so when you type the cmd i want it to set you 200 coords infront of the direction your facing.
Right now it just sets you 200 coords in one dirrection in which you cannot change. Help + example maybe?
Thanks,
Pinkfairie

This is what i use now, but only in one direction. NOT where you point...

Quote:
new origin[3];
get_user_origin(id,origin);
origin[1] += 200;
set_user_origin(id,origin);
__________________
"Every man is guilty of all the good he did not do"
DiscoBBQ is offline
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 03-14-2005 , 21:01  
Reply With Quote #2

hehe teleporting necklace for rp? are you sure your rp mod is going to be realistic

anyways, id find a way to reset one's view so it is centered (isnt there a command that does that?) then get where they are aiming, then use some math to find out which way to teleport them (i.e. north south east or west of their position.) you could do (where 1 = player positon and 2 = aiming position) if y2-y1 < 0, then set the player origin to his origin but -200 y. if y2-y1 > 0 then set player origin to his origin but +200 y. If y2-y1 = 0, then do the same thign but with x's (i.e. x2-x1 < 0 and > 0)
It might not work, but its worth a try!
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
Crazywelder1
Member
Join Date: Mar 2004
Location: CA
Old 03-15-2005 , 00:55  
Reply With Quote #3

i think u just need to add 1 like so

Code:
new origin[3]; 
get_user_origin(id,origin,1); 
origin[1] += 200; 
set_user_origin(id,origin);
__________________
AKA = oM`|Garrett
oM CLAN
Soon to have a server in Soon
Crazywelder1 is offline
Send a message via MSN to Crazywelder1
DiscoBBQ
Veteran Member
Join Date: Jan 2005
Location: Clemson, South Carolina
Old 03-15-2005 , 20:42   eh
Reply With Quote #4

im gonna try the 2nd persons. Its easy

and no, my rp isnt that realistic.
I have like 24 inventory items so far, gems that convert to armor, 4 rare items (tele necklas, Pink robes, dragon armor+helmet), 5 drugs, 5 foods, and potions.

and then every holdiday i add new rare items. such as this friday im making a leprecuan pickaxe to make them able to mine gold which converts to coins.
then on easter. a white bunny suit it glows + somethin else
ext
__________________
"Every man is guilty of all the good he did not do"
DiscoBBQ is offline
Crazywelder1
Member
Join Date: Mar 2004
Location: CA
Old 03-15-2005 , 22:33  
Reply With Quote #5

did this work???
or was i wrong
i just want to know
__________________
AKA = oM`|Garrett
oM CLAN
Soon to have a server in Soon
Crazywelder1 is offline
Send a message via MSN to Crazywelder1
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-16-2005 , 13:41  
Reply With Quote #6

Crazywelder, yours wouldn't work. It will always move the user in the same direction no matter which direction they are facing. You have to figure out the correct mathematical formula to find a position in front of their view, which I don't happen to know.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 14:17.


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