Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 05-30-2013 , 21:59   if(containi(szCommand,"vban")) PUG_HamKilledPost(id); // Infinite respawn fix
Reply With Quote #1

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?
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-31-2013 , 00:42   Re: if(containi(szCommand,"vban")) PUG_HamKilledPost(id); // Infinite respawn fix
Reply With Quote #2

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
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 05-31-2013 at 00:56.
ConnorMcLeod is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-02-2013 , 11:17   Re: if(containi(szCommand,"vban")) PUG_HamKilledPost(id); // Infinite respawn fix
Reply With Quote #3

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
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
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 11:26.


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