Raised This Month: $ Target: $400
 0% 

respawn plugin help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kp3t3h
Senior Member
Join Date: Feb 2011
Old 05-12-2012 , 13:40   respawn plugin help
Reply With Quote #1

can someone find the flaws here
its not working as it should'
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <fun>

#define PLUGIN "Respawn"
#define VERSION "1.0"
#define AUTHOR "01"


new Countdown[33]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("DeathMsg","StartCountdown","a")
}

public 
StartCountdown(id)
{
       
       
        
Countdown[id] = 20    
        
        
if(task_exists(id 3431))
        {
                
remove_task(id 3431)
        }
        
set_task(1.0"fin"id 3431__"b")
        
        return 
PLUGIN_CONTINUE
}

public 
fin(task_id)
{
        new 
id task_id 3431
        
        set_hudmessage
(02550, -1.00.406.01.0)
        
show_hudmessage(id"Respawn za : %d"Countdown[id]) 
        
        
Countdown[id] -= 
        
        
if(Countdown[id] <= 0)
        {
                if(
task_exists(task_id))
                {
                        
remove_task(task_id)
                }
                
respawn(id)
        }
}

public 
respawn(id
{      
    if (!
is_user_connected(id) || is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR)         return; 
    
    
set_pev(idpev_deadflagDEAD_RESPAWNABLE
    
dllfunc(DLLFunc_Thinkid
    
    if (
is_user_bot(id) && pev(idpev_deadflag) == DEAD_RESPAWNABLE
    { 
        
dllfunc(DLLFunc_Spawnid
    } 

__________________
need help with the following
no.1, no.2, no.3, no.4 no.5
kp3t3h 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 00:23.


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