AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Blocking Spawn (https://forums.alliedmods.net/showthread.php?t=188248)

SpeeDeeR 06-24-2012 06:23

Blocking Spawn
 
I`m trying to block spawn for a player, using player offset 365, but it doesn`t seem to work.
I want him to not spawn for the whole round. As I saw in a Connor`s post before, setting it to 0 was enough to block the spawn, but it doesn`t work for me.
PHP Code:

#include <amxmodx>
#include <fakemeta>
 
public client_putinserverid )
{
    
set_pdata_int(id36505);


And another question. If a have an outside function that spawns the player, can I block this spawning by setting the offset or it can`t be done.

ConnorMcLeod 06-24-2012 06:55

Re: Blocking Spawn
 
#define m_iSpawnCount 365

Set it to 1 or more, not 0, but i'm not sure it works in RoundRestart.

meTaLiCroSS 06-24-2012 14:35

Re: Blocking Spawn
 
Quote:

Originally Posted by SpeeDeeR (Post 1735017)
As I saw in a Connor`s post before

Quote:

Originally Posted by ConnorMcLeod (Post 1366528)
...you can set player offset 365 ( m_iSpawnTimes ) to more than 0 just before the game checks if player can be respawned.

PHP Code:

#include <amxmodx>
#include <fakemeta>

#define XO_PLAYER                5
#define m_iMenuCode                205
#define m_iSpawnTimes            365

#define Menu_ChooseAppearance    3
#define cs_get_user_menu(%0)    get_pdata_int(%0, m_iMenuCode, XO_PLAYER)

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
register_clcmd("joinclass""ClCmd_CoudBeChoosingAppearance")
    
register_clcmd("menuselect""ClCmd_CoudBeChoosingAppearance")
}

public 
ClCmd_CoudBeChoosingAppearanceid )
{
    if( 
cs_get_user_menu(id) == Menu_ChooseAppearance )
    {
        
set_pdata_int(idm_iSpawnTimes1XO_PLAYER)
    }



Quote:

Originally Posted by ConnorMcLeod (Post 1674649)
After first join (player offset that stores spawn nums is = 0).

Quote:

Originally Posted by ConnorMcLeod (Post 1570531)
Player offset m_iSpawnTimes (365) set to > 0 at right place will prevent player from spawning ;)

You have an incredible search system on your brain buddy.


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

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