AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   if(containi(szCommand,"vban")) PUG_HamKilledPost(id); // Infinite respawn fix (https://forums.alliedmods.net/showthread.php?t=217181)

^SmileY 05-30-2013 21:59

if(containi(szCommand,"vban")) PUG_HamKilledPost(id); // Infinite respawn fix
 
PHP Code:

public client_command(id)
{
    if(
g_bPregame)
    {
        new 
szCommand[32];
        
read_argv(0,szCommand,charsmax(szCommand));

        
strtolower(szCommand);
        
        if(
containi(szCommand,"vban")) PUG_HamKilledPost(id); // Infinite re-spawn fix
    
}
    return 
PLUGIN_CONTINUE;


Its correct to hook a internal client "vban" command to fix a infinite re-spawn?

If the player connect to server and join in any team after X seconds passed in round, its not re-spawn automatically.

Some suggestion?

ConnorMcLeod 05-31-2013 00:42

Re: if(containi(szCommand,"vban")) PUG_HamKilledPost(id); // Infinite respawn fix
 
For me that code means nothing, some other commands are sent automatically during the game such as VModEnable, specmode, spec_set_ad and client_buy_close.

Players are auto respawned if round time is less than 20 sec from round starts (or new round, whatever).
So what you want to do with this ?
What is "infinite" respawn ? triggers by a specific plugin ???

If you only want to prevent players from spawn outside of the new round spawns routine, just set spawn count player pdata to 1 when client_putinserver is sent.
PHP Code:

#include < amxmodx >
#include < fakemeta >

const m_iNumSpawns 365;

public 
client_putinserverid )
{
    if( !
is_user_bot(id) && !is_user_hltv(id) )
    {
        
set_pdata_int(idm_iNumSpawns1);
    }



Or maybe you need this : https://forums.alliedmods.net/showthread.php?t=191815
I've made a big mistake in that code so don't use it, just remind me to fix, if you need it.
Edit : Should be fixed

^SmileY 06-02-2013 11:17

Re: if(containi(szCommand,"vban")) PUG_HamKilledPost(id); // Infinite respawn fix
 
Thanks, for now the cmd vban its only called when a player join in any team for first time i testing this command, its really only called one time :)


All times are GMT -4. The time now is 16:18.

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