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

[tf2] need to grant a condition to capping players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
possibly_yaboi_mark
Junior Member
Join Date: Jul 2022
Old 10-29-2022 , 14:20   [tf2] need to grant a condition to capping players
Reply With Quote #1

i need to grant a condition to capping players, specifically through an sdkhook of the clients thinking. if "sdk of the clients thinking" is a bit too vauge, which i'll admit it probably is, i have a script below for elaborating on what i mean.

PHP Code:
#pragma semicolon 1
#include <sourcemod>

#include <tf2>
#include <sdkhooks>

#pragma newdecls required

public void OnMapStart() {
    for (
int i 1<= MaxClientsi++) {
        if (
IsClientInGame(i)) {
            
OnClientPutInServer(i);
        }
    }
}

public 
void OnClientPutInServer(int client) {
    
SDKHook(clientSDKHook_PostThinkPostOnClientPostThinkPost);
}

void OnClientPostThinkPost(int client) {
    if (
INSERT CHECK FOR WHETHER THE CLIENT IS CAPPING HERE) { //the check for whether the client is capping would go here
        
TF2_AddCondition(client421.0client);
    }

possibly_yaboi_mark 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 00:34.


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