AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   spawn ---> fakemeta (https://forums.alliedmods.net/showthread.php?t=87589)

Empowers 03-14-2009 03:47

spawn ---> fakemeta
 
How can I respawn dead players using ONLY fakemeta? I tryed this:
Code:

dllfunc(DLLFunc_Spawn,id)
but when players respawns they are laying on the ground and have 0 hp

then I found this:
Code:

stock fm_respawn(id)
{
    set_pev(id, pev_deadflag, DEAD_RESPAWNABLE)
    dllfunc(DLLFunc_Spawn, id)
    set_pev(id, pev_iuser1, 0)
}

but it gives the same result :)

Arkshine 03-14-2009 05:38

Re: spawn ---> fakemeta
 
See fakemeta_utils.inc

Hunter-Digital 03-14-2009 06:05

Re: spawn ---> fakemeta
 
have you tried...

PHP Code:

stock fm_respawn(id)
{
    
set_pev(idpev_deadflagDEAD_RESPAWNABLE)
    
dllfunc(DLLFunc_Spawnid)
    
set_pev(idpev_iuser10)
    
set_pev(idpev_health100.0)


?

Empowers 03-14-2009 11:47

Re: spawn ---> fakemeta
 
oh thx i hadn't set the hp that was the problem

ConnorMcLeod 03-14-2009 12:09

Re: spawn ---> fakemeta
 
I don't think you need to set the HP.

Anyway, would be better to use hamsandwich :

ExecuteHamB(Ham_Spawn, id)

Dores 03-14-2009 13:05

Re: spawn ---> fakemeta
 
Quote:

Originally Posted by ConnorMcLeod (Post 780391)
ExecuteHamB(Ham_Spawn, id)

What is the difference between this and ExecuteHamB(Ham_CS_RoundRespawn, id)?

Exolent[jNr] 03-14-2009 14:14

Re: spawn ---> fakemeta
 
Quote:

Originally Posted by Dores (Post 780429)
ExecuteHamB(Ham_CS_RoundRespawn, id)?

That should be used to respawn a player if using HamSandwich, and it the best way to do it over any others.

Empowers 03-15-2009 05:29

Re: spawn ---> fakemeta
 
On my server there are plugins that are only using Fakemeta and CSDM modules.. so I don't want to add HamSandwich..

Anyway this works perfectly:
Code:

stock fm_respawn(id)
{
    set_pev(id, pev_deadflag, DEAD_RESPAWNABLE)
    dllfunc(DLLFunc_Spawn, id)
    set_pev(id, pev_iuser1, 0)
    set_pev(id, pev_health, 100.0)
}


MeRcyLeZZ 03-16-2009 23:16

Re: spawn ---> fakemeta
 
There is a thread in the Code Snippets/Tutorials forum in which you can find posts explaining how to properly get around those bugs when using the Fakemeta method (pages 2 and 3 IIRC).

Arkshine 03-17-2009 04:42

Re: spawn ---> fakemeta
 
#19 ^^


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

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