Raised This Month: $ Target: $400
 0% 

how to allow unlimited team changes?


Post New Thread Reply   
 
Thread Tools Display Modes
spfc
Junior Member
Join Date: Mar 2009
Old 03-15-2009 , 01:21   Re: how to allow unlimited team changes?
Reply With Quote #11

Quote:
Originally Posted by ConnorMcLeod View Post
That is what i thought, haven't tested yet

-edit-
PHP Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Unlimited ChooseTeam"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

public plugin_init()
{
    
register_pluginPLUGINVERSIONAUTHOR )
    
register_clcmd("chooseteam""ClientCommand_ChooseTeam")
}

public 
ClientCommand_ChooseTeamid )
{
    
set_pdata_int(id125get_pdata_int(id1255) & ~(1<<8), 5)

it works!
Credits for ConnorMcLeod
+ karma
thanks

Last edited by spfc; 03-15-2009 at 01:23.
spfc is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-15-2009 , 03:59   Re: how to allow unlimited team changes?
Reply With Quote #12

I haven't found a way to make the server think that the player can then respawn.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
spfc
Junior Member
Join Date: Mar 2009
Old 03-16-2009 , 21:59   Re: how to allow unlimited team changes?
Reply With Quote #13

Quote:
Originally Posted by ConnorMcLeod View Post
I haven't found a way to make the server think that the player can then respawn.
i just call spawn() function. It works but was at the begin of round

try this

PHP Code:
set_pev(idpev_deadflagDEAD_RESPAWNABLE)
dllfunc(DLLFunc_Spawnid
spfc is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 03-17-2009 , 10:02   Re: how to allow unlimited team changes?
Reply With Quote #14

@spfc:

What you did is good for CZ bots. For players you should make them think and since you can't make CZ bots think, you use DLLFunc_Spawn instead

For players:
PHP Code:
// MeRcyLeZZ.
set_pev(idpev_deadflagDEAD_RESPAWNABLE);
dllfunc(DLLFunc_Thinkid); 
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 05-07-2010 , 17:50   Re: how to allow unlimited team changes?
Reply With Quote #15

PHP Code:
public ClientCommand_ChooseTeamid )
{
    
set_pdata_int(id125get_pdata_int(id1255) & ~(1<<8), 5)

Hi, I would like to know which offset is 125 (m_i....) and which arguments ( 1<<8 ) I can use.

Thanks in advance
Leon
Leon M. is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 05-07-2010 , 21:53   Re: how to allow unlimited team changes?
Reply With Quote #16

Quote:
Originally Posted by Leon M. View Post
Hi, I would like to know which offset is 125 (m_i....)
Not sure but maybe m_iJoiningState
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
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 13:35.


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