AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Choose team death (https://forums.alliedmods.net/showthread.php?t=174177)

unethost.com 12-16-2011 13:55

Choose team death
 
When players choose teams,He will be put to death.
Can make this plugin?

joshknifer 12-16-2011 15:08

Re: Choose team death
 
I think this will work, but untested:

PHP Code:

#include <amxmodx>
#include <cstrike>


new CsTeams:g_p_team[33//stores current team of every connected player

public player_change_team(idCsTeams:new_team){
    if (
new_team == g_p_team[id])
         return
         
client_print (id,print_chat,"You are not allowed to change teams!"//tell them they are not allowed to switch
         
user_kill (id//slay them for switching



fysiks 12-16-2011 15:32

Re: Choose team death
 
Quote:

Originally Posted by joshknifer (Post 1614330)
I think this will work, but untested:

PHP Code:

#include <amxmodx>
#include <cstrike>


new CsTeams:g_p_team[33//stores current team of every connected player

public player_change_team(idCsTeams:new_team){
    if (
new_team == g_p_team[id])
         return
         
client_print (id,print_chat,"You are not allowed to change teams!"//tell them they are not allowed to switch
         
user_kill (id//slay them for switching



And how does this function get executed?

joshknifer 12-16-2011 16:01

Re: Choose team death
 
Hrm, well i was trying to look through code pieces that call a team change event, and found a couple of different pieces and tried to combine them to do what was requested, I am not sure, in looking at it, that it will work. :/

unethost.com 12-16-2011 21:32

Re: Choose team death
 
Quote:

Originally Posted by joshknifer (Post 1614330)
I think this will work, but untested:

PHP Code:

#include <amxmodx>
#include <cstrike>


new CsTeams:g_p_team[33//stores current team of every connected player

public player_change_team(idCsTeams:new_team){
    if (
new_team == g_p_team[id])
         return
         
client_print (id,print_chat,"You are not allowed to change teams!"//tell them they are not allowed to switch
         
user_kill (id//slay them for switching




PHP Code:

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

Warning
Loose indentation on line 10
Header size
:            180 bytes
Code size
:              184 bytes
Data size
:              280 bytes
Stack
/heap size:      16384 bytesestimated maxusage=41 cells (164 bytes)
Total requirements:   17028 bytes

1 Warning
.
Done

What is the problem?
He would still have .amxx,But it is without any effect.

unethost.com 12-16-2011 22:47

Re: Choose team death
 
When players press the "M"(chooseteam),System is mandatory to death.
He will not be any replacement of the team menu or message.


All times are GMT -4. The time now is 20:53.

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