Raised This Month: $ Target: $400
 0% 

Solved Block jointeam T but allow CT and SPEC


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-16-2019 , 13:51   Re: Block jointeam T but allow CT and SPEC
Reply With Quote #8

hooking "jointeam" cmd
Code:
register_clcmd("jointeam", "join_team")
retrieving arguments of client command as string
Code:
new arg[2] read_argv(1, arg , charsmax(arg))
converting string (arg ) to num and checking if it matches with some numbers : (1= Team T , 2= Team CT , 5=Auto join and 6=Team Spectate)
Code:
if ( str_to_num(arg) == 1 || str_to_num(arg) == 5)
showing them chooseteam menu again , and blocking user from joining that team
Code:
engclient_cmd(id,"chooseteam") return PLUGIN_HANDLED
allow joining
Code:
return PLUGIN_CONTINUE
LearninG is offline
 



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 17:24.


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