Raised This Month: $51 Target: $400
 12% 

Solved If there are ct in game, apply commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Enes05
Junior Member
Join Date: Feb 2018
Location: Istanbul | Turkey
Old 09-04-2018 , 17:23   If there are ct in game, apply commands
Reply With Quote #1

Hello there...

I have a question

I am developing a plugin for jb.

But,
If there are commands in the game I need an implementation of ct.
How do I do this?

Please help.

I have an code:
PHP Code:
#include <cstrike> 

for (int i 1<= MaxClientsi++) { 
    if (
IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == CS_TEAM_CT) { 
        
//do stuff 
    


is it true that this code?

Last edited by Enes05; 09-05-2018 at 09:34.
Enes05 is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 09-04-2018 , 18:52   Re: If there are ct in game, apply commands
Reply With Quote #2

Code:
#include <cstrike>

public void OnPluginStart()
{
	RegConsoleCmd("sm_test", OnTestCommand);
}
 
public Action OnTestCommand(int client, int args)
{
	// Skip dead players
	if (!IsPlayerAlive(client))
		return Plugin_Handled;

	// Skip players not on CS_TEAM_CT
	if (GetClientTeam(client) != CS_TEAM_CT)
		return Plugin_Handled;

	PrintToChat(client, "sm_test triggered by CT");
	return Plugin_Handled;
}
__________________
Neuro Toxin is offline
Enes05
Junior Member
Join Date: Feb 2018
Location: Istanbul | Turkey
Old 09-05-2018 , 08:02   Re: If there are ct in game, apply commands
Reply With Quote #3

not command, only verification
Enes05 is offline
Enes05
Junior Member
Join Date: Feb 2018
Location: Istanbul | Turkey
Old 09-05-2018 , 09:21   Re: If there are ct in game, apply commands
Reply With Quote #4

I am fixed this plugin, thanks anyway
Enes05 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 09:58.


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