AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   about teleport (https://forums.alliedmods.net/showthread.php?t=143919)

Jacob 11-26-2010 22:27

about teleport
 
I use the code below to teleport a player.if the one is teleported,his hp will become 100,how to make his hp unchanged.
PHP Code:

ExecuteHamB(Ham_CS_RoundRespawnid


r4ndomz 11-26-2010 22:42

Re: about teleport
 
Quote:

Originally Posted by Jacob (Post 1357528)
I use the code below to teleport a player.if the one is teleported,his hp will become 100,how to make his hp unchanged.
PHP Code:

ExecuteHamB(Ham_CS_RoundRespawnid



Did you try spawn(id) from fun?

Exolent[jNr] 11-26-2010 22:44

Re: about teleport
 
Quote:

Originally Posted by r4ndomz (Post 1357532)
Did you try spawn(id) from fun?

That function is not to be used. Ham_CS_RoundRespawn is the best method for spawn.

Quote:

Originally Posted by Jacob (Post 1357528)
I use the code below to teleport a player.if the one is teleported,his hp will become 100,how to make his hp unchanged.
PHP Code:

ExecuteHamB(Ham_CS_RoundRespawnid


Get the player's health before you spawn them, then set their health back to the old health.

r4ndomz 11-26-2010 22:46

Re: about teleport
 
Quote:

Originally Posted by Exolent[jNr] (Post 1357534)
That function is not to be used.

Why isnt spawn to be used?

Exolent[jNr] 11-26-2010 22:48

Re: about teleport
 
Quote:

Originally Posted by r4ndomz (Post 1357536)
Why isnt spawn to be used?

Quote:

Originally Posted by Exolent[jNr] (Post 1357534)
Ham_CS_RoundRespawn is the best method for spawn.

spawn() doesn't properly spawn the player.

Kreation 11-26-2010 22:49

Re: about teleport
 
Quote:

Originally Posted by r4ndomz (Post 1357536)
Why isnt spawn to be used?

Because Ham is the best method. He just said that.

Jacob 11-26-2010 23:12

Re: about teleport
 
Quote:

Originally Posted by Exolent[jNr] (Post 1357534)
That function is not to be used. Ham_CS_RoundRespawn is the best method for spawn.



Get the player's health before you spawn them, then set their health back to the old health.

thank you,:crab:


All times are GMT -4. The time now is 11:22.

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