Raised This Month: $ Target: $400
 0% 

Teleport


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 12-19-2005 , 17:36   Teleport
Reply With Quote #1

How would you set a teleport, to an origin with a sprite to a new origin?
Unidentified is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 12-19-2005 , 17:39  
Reply With Quote #2

You mean you want to set the origin of a entity from one place to another place?
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 12-19-2005 , 19:00  
Reply With Quote #3

Quote:
Originally Posted by teame06
You mean you want to set the origin of a entity from one place to another place?
No. like a teleport using a spr. Such as If I were to walk Into a certain origin or so, It would teleport me to a different origin. Catch my drift?
Unidentified is offline
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 12-20-2005 , 17:54  
Reply With Quote #4

Anyone?
Unidentified is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 12-20-2005 , 21:29  
Reply With Quote #5

EntMod
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
Bruno
Member
Join Date: Jun 2005
Old 12-20-2005 , 21:32  
Reply With Quote #6

Well you can just place the sprite where you want on the map, define the coordinates, and then use the set_user_origin function.
Bruno is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 12-20-2005 , 21:35  
Reply With Quote #7

Or that too
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
Bruno
Member
Join Date: Jun 2005
Old 12-20-2005 , 21:41  
Reply With Quote #8

I think this is right. If not, someone please correct me.

Code:
#include <amxmodx> #include <amxmisc> #include <fun> new teleportstart[3] = { x, y, z };         // Coordinates new teleportend[3] = { x, y, z };       // Coordinates public plugin_init() {     register_plugin("Name of plugin","version","Your name")         set_task(1.0,"teleport",0,"",0,"b") } public teleport(id) {     new num, players[32]     get_players(players,num,"ac")     for( new i = 0;  i < num; i++ )     {     new origin[3]     get_user_origin(players[i],origin)     if(get_distance(origin,teleportstart) <= 50)  //50 is radius of teleport     {                  set_user_origin(players[i],teleportend)         } }

Do you know how to insert a model or sprite into the map?
__________________
If you have but one shot at an opportunity, make it count.
Bruno is offline
Bruno
Member
Join Date: Jun 2005
Old 12-20-2005 , 21:42  
Reply With Quote #9

For some reason the spacing came out kind of screwed up.
Bruno is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 12-21-2005 , 08:26  
Reply With Quote #10

Heres a basic version without a sprite and cvars:
Code:
#include <amxmodx> #include <amxmisc> #include <fun> new telestart[3] = {x,y,z} new teleend[3] = {x,y,z}     public plugin_init() {     register_plugin("AMXX Teleporter","1.0.BETA","Charr")     register_cvar("amx_tele_enable","1")     register_cvar("amx_tele_distance","50") } public Client_PreThink(id) {     if(!is_user_alive(id) || !is_user_connected(id))         return PLUGIN_HANDLED     if(get_cvar_num("amx_tele_enable") == 0)         return PLUGIN_CONTINUE     new origin[3]     get_user_origin(id,origin,0)     if(get_distance(origin,telestart) <= get_cvar_num("amx_tele_distance"))         set_user_origin(id,teleend)     return PLUGIN_CONTINUE }
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
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:07.


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