Raised This Month: $ Target: $400
 0% 

Teleport player to spawn!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 11-03-2005 , 16:00   Teleport player to spawn!
Reply With Quote #1

how do i teleport a player to their spawn without typing the origins! or get the spawnpoint

"Cant look at the functions in home cuz its screwed up"
__________________
atomic is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-03-2005 , 16:13  
Reply With Quote #2

I'm guessing get their spawnpoints in ResetHUD and save them, then use that?

Code:
register_event("ResetHUD", "GetSpawnOrigin", "b"); // ... new g_iOrigin[33][3]; public GetSpawnOrigin( id ) {   get_user_origin(id, g_iOrigin[id], 0); }
__________________
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
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 11-03-2005 , 16:24  
Reply With Quote #3

or i can just use the function "spawn (id)"... will that work?
__________________
atomic is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 11-03-2005 , 19:09  
Reply With Quote #4

No, it will not. You need to spawn(id) twice, because of some stupid bug in the HL engine. Like this:

Code:
public whatever(id) {     set_task(0.5,"spawnage",id);     set_task(0.7,"spawnage",id); } public spawnage(id)     spawn(id);
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-03-2005 , 21:05  
Reply With Quote #5

If you're not using the older AMXX versions, use cs_user_spawn. It seems to work perfectly
__________________
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
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 11-04-2005 , 01:34  
Reply With Quote #6

Quote:
Originally Posted by Hawk552
No, it will not. You need to spawn(id) twice, because of some stupid bug in the HL engine. Like this:

Code:
public whatever(id) {     set_task(0.5,"spawnage",id);     set_task(0.7,"spawnage",id); } public spawnage(id)     spawn(id);
spawn(id) creates a new entity, it doesn't spawn a player. However, it CAN spawn a fake player....
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-04-2005 , 01:39  
Reply With Quote #7

Doh.. Well, if you want to just move the already alive player to where he first spawned at, just use set_user_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
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 11-04-2005 , 09:43  
Reply With Quote #8

ill just go and look at the wc3 mod code... warden respawn!
__________________
atomic is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-04-2005 , 11:20  
Reply With Quote #9

w8w8... do you want respawn or teleport into base
if teleport take from uwc3's warpgate instead
[ --<-@ ] Black Rose is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-04-2005 , 18:54  
Reply With Quote #10

Try this:
Code:
#include <amxmodx> #include <amxmisc> #include <fun> public plugin_init() {   register_plugin("Telly to spawn", "0.1", "v3x");   register_clcmd("telly", "ClCmd_Teleport", ADMIN_KICK);   register_clcmd("fullupdate", "BlockCmd");   register_event("ResetHUD", "GetSpawnOrigin", "b"); } new g_iOrigin[33][3]; public GetSpawnOrigin( id ) {   get_user_origin(id, g_iOrigin[id], 0); } public ClCmd_Teleport( id, lvl, cid ) {   if(!cmd_access(id, lvl, cid, 0))     return PLUGIN_HANDLED;   set_user_origin(id, g_iOrigin[id]);   client_print(id, 3, "If all went well, you should be where you spawned.");   return PLUGIN_HANDLED; } public BlockCmd( id ) {   return PLUGIN_HANDLED; }
After you spawn, go somewhere else. Then type "telly" in console.
__________________
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
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:36.


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