AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ReSpawn code (https://forums.alliedmods.net/showthread.php?t=82594)

ianglowz 12-26-2008 09:45

ReSpawn code
 
Anyone can give respawn code?It very hard to learn at CSDM.

SnoW 12-26-2008 10:11

Re: ReSpawn code
 
If it's hard to learn, then I suggest that you use fun.
Code:

spawn(index);

ianglowz 12-26-2008 10:19

Re: ReSpawn code
 
Can give one example with respawn code?

SnoW 12-26-2008 10:22

Re: ReSpawn code
 
Example... Do you mean something like this?

Code:

#include <fun>
 
public plugin_init()
    register_clcmd("respawn_me", "function");
 
public function(id)
    respawn(id);

Ofc I suggest that you use fakemeta but this is easier...

ConnorMcLeod 12-26-2008 10:22

Re: ReSpawn code
 
PHP Code:

stock respawnid )
{
    if( 
is_user_connected(id) && (<= get_pdata_int(id114) <= 2) )
    {
        
ExecuteHamBHam_Spawnid )
    }



SnoW 12-26-2008 10:23

Re: ReSpawn code
 
Ye, suggest that you use fakemeta just like Connor is showing you.

ianglowz 12-26-2008 10:31

Re: ReSpawn code
 
I think Fun more easier.
Quote:

Originally Posted by SnoW (Post 733418)
Example... Do you mean something like this?

Code:

#include <fun>
 
public plugin_init()
    register_clcmd("respawn_me", "function");
 
public function(id)
    respawn(id);

Ofc I suggest that you use fakemeta but this is easier...

I think you wrote this for when client die,he must write respawn_me at console and he respawn,right?

SnoW 12-26-2008 10:34

Re: ReSpawn code
 
Yes, it's a command with you can respawn yourself. Ofc if you are doing some DM or anything, you should hook player death and respawn him automatically, also not allow alive players to "teleport to their base".

ianglowz 12-26-2008 10:39

Re: ReSpawn code
 
If die with automatic respawn,what the code?

ianglowz 12-26-2008 10:46

Re: ReSpawn code
 
NVM.Auto respawn I will ask later.Now if I want to do limit on manual respawn?


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

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