Raised This Month: $ Target: $400
 0% 

Problem on Locking Teams in CSS...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 09-30-2008 , 17:33   Problem on Locking Teams in CSS...
Reply With Quote #1

I am trying to get it to where when they first join, they can either choose T, CT, or Auto Join. Once they are on a team, if they try and change teams it doesn't allow them to. Not sure what the problem is, but when they join, it gives them the message "Team Change Is Not Allowed".

Code:
public Action:Command_JoinTeam(client, args) { decl String:teamString[3]; //Get the team the Player is trying to join GetCmdArg(1, teamString, sizeof(teamString)); new NewTeam = StringToInt(teamString); // Get the players current team new CurTeam = GetClientTeam(client); //Disallow Spectators if(NewTeam == SPECTATOR) { PrintToChat(client, "\x04[FF] \x01Spectator Mode Is Not Allowed"); return Plugin_Handled; } //If they already had a team and attempted to switch else if(CurTeam != NOTEAM || CurTeam != SPECTATOR) { if(CurTeam != NewTeam) { PrintToChat(client, "\x04[FF] \x01Team Change Is Not Allowed"); ChangeClientTeam(client, CurTeam); return Plugin_Handled; } else { return Plugin_Continue; } }   return Plugin_Continue; }
__________________

Last edited by CrimsonGT; 09-30-2008 at 17:44.
CrimsonGT is offline
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 09-30-2008 , 17:47   Re: Problem on Locking Teams in CSS...
Reply With Quote #2

Nevermind >.>

WTB delete button
__________________
CrimsonGT is offline
XARIUS
SourceMod Donor
Join Date: May 2008
Location: Atlanta, GA
Old 09-30-2008 , 20:42   Re: Problem on Locking Teams in CSS...
Reply With Quote #3

Sometimes you have to make a post in order to find the answer. =)
XARIUS 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 07:06.


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