Raised This Month: $ Target: $400
 0% 

Simple respawning, bodies does not disappear


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
naven
Veteran Member
Join Date: Jun 2008
Location: Poland, Cieszyn
Old 06-27-2009 , 14:31   Simple respawning, bodies does not disappear
Reply With Quote #1

Hi,
I am using this code for respawning(works fine):
Code:
public DeathMsg()
{
    new victim;
    victim = read_data(2)
    if (get_cvar_num("amx_respawn") > 0)
    set_task(1.0, "respawn_player", victim + 483) 
} 
public respawn_player(id)
{
    id -= 483;
    if (!is_user_connected(id) || is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR)         return;
    set_pev(id, pev_deadflag, DEAD_RESPAWNABLE)
    dllfunc(DLLFunc_Think, id)
    if (is_user_bot(id) && pev(id, pev_deadflag) == DEAD_RESPAWNABLE)
    {
    dllfunc(DLLFunc_Spawn, id)
    }
    
}
public sayrespawn(gracz)
{
    if (!is_user_connected(gracz) || cs_get_user_team(gracz) == CS_TEAM_SPECTATOR)         return PLUGIN_HANDLED;
    set_pev(gracz, pev_deadflag, DEAD_RESPAWNABLE)
    dllfunc(DLLFunc_Think, gracz)
    dllfunc(DLLFunc_Spawn, gracz)
    return PLUGIN_HANDLED;
}
("gracz" is id)
But I want bodies to disappear just right after death, at the moment some maps looks like this: http://iv.pl/images/f8kvcr040qy9ha48y.jpg
Check out fps- not really good fps for surf
Note: I need this for my surf mod, and I want to keep as many fps as I can
__________________
naven.com.pl
"At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.
naven is offline
 



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 15:37.


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