Raised This Month: $ Target: $400
 0% 

[SOLVED]Help with SyncHud


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 11-01-2009 , 10:38   Re: Help with SyncHud
Reply With Quote #2

Try this (not tested)

PHP Code:
// Global
new respawntimer[32]
new 
respawnsegs[32]
new 
delay

public plugin_init()
{
    
delay register_cvar("amx_respawn_delay""3.0")
}

//Function to Init timer
public respawnFunc(player)
{
    new 
param[1]
    
param[0] = player
    respawntimer
[player] = CreateHudSyncObj()
    
respawnsegs[player] = get_pcvar_num(delay)
    
set_task(1.0"CmdHud"player TASK_HUDparam_"b")
}

// Function CmdHud
public CmdHud(param[])
{        
    
player param[0]

    if(
respawnsegs[player] <= 0)
    {
        
remove_task(player TASK_HUD)
        
chat_color(player"!g%s!y Para deshabilitar tu respawn,tipea!team /respawn!y."szPrefix)
    }
    else
    {
        
set_hudmessage(255255255, -1.00.7906.01.00.10.2)
        
ShowSyncHudMsg(playerrespawntimer[player], "Respawnearas en %d segundo%s"respawnsegs[id], get_pcvar_num(delay) < "" "s")
    }
    
respawnsegs[id]--

Add your code to call respawnFunc with player id as a parameter.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
 



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 17:35.


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