Raised This Month: $32 Target: $400
 8% 

spawn 3 times a round?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 01-22-2012 , 22:07   spawn 3 times a round?
Reply With Quote #1

is there anyone who can show me how to spawn 3 times ..... a round? please?
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 01-22-2012 , 23:23   Re: spawn 3 times a round?
Reply With Quote #2

Re spawns player 3 times. no additional checks. If you play with bots they stand still after the bombs planted. atleast in cz they do. (cz bots are stupid)

Untested but in theory it works. same basic concept that is in my plugin for custom DM

PHP Code:
#include <amxmodx>
#include <hamsandwich>

const MAX_PLAYERS 32;

new 
g_iToggleg_iSpawnsAllowedg_iMaxPlayersg_iRespawnedTimes[MAX_PLAYERS+1];

public 
plugin_init()
{
    
register_plugin("Respawn Ticketing""0.0.1""ME!!!");
    
    
register_event("HLTV""eNewRound""a""1=0""2=0");
    
RegisterHam(Ham_Killed"player""fwdPlayerDeath"1);
    
    
g_iToggle register_cvar("rt_toggle""1");
    
g_iSpawnsAllowed register_cvar("rt_spawntimes""3");
    
    
g_iMaxPlayers get_maxplayers();
}

public 
eNewRound()
{
    for(new 
i=1i<g_iMaxPlayersi++)
    {
        
g_iRespawnedTimes[i] = 0;
    }
}

public 
fwdPlayerDeath(iVictimiKilleriDmgBits)
{
    if(
get_pcvar_num(g_iToggle))
        return 
HAM_IGNORED;
        
    if(
is_user_connected(iVictim) && g_iRespawnedTimes[iVictim] < get_pcvar_num(g_iSpawnsAllowed))
    {
        ++
g_iRespawnedTimes[iVictim];
        
ExecuteHamB(Ham_SpawniVictim);
        return 
HAM_IGNORED;
    }
    return 
HAM_IGNORED;


Last edited by Doc-Holiday; 01-22-2012 at 23:23.
Doc-Holiday is offline
Reply



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 05:08.


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