Raised This Month: $ Target: $400
 0% 

Blocking Spawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 06-24-2012 , 06:23   Blocking Spawn
Reply With Quote #1

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.
SpeeDeeR is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-24-2012 , 06:55   Re: Blocking Spawn
Reply With Quote #2

#define m_iSpawnCount 365

Set it to 1 or more, not 0, but i'm not sure it works in RoundRestart.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 06-24-2012 , 14:35   Re: Blocking Spawn
Reply With Quote #3

Quote:
Originally Posted by SpeeDeeR View Post
As I saw in a Connor`s post before
Quote:
Originally Posted by ConnorMcLeod View Post
...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 View Post
After first join (player offset that stores spawn nums is = 0).
Quote:
Originally Posted by ConnorMcLeod View Post
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.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS 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 06:18.


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