View Single Post
Jakesterdog123
Senior Member
Join Date: Oct 2012
Location: California
Old 06-23-2013 , 22:45   Re: Set Cvars everytime player joins
Reply With Quote #5

PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <tf2>

public Plugin:myinfo = {
    
name        "[TF2] All Crits",
    
author        "Dr. McKay",
    
description    "Gives all players crit boost",
    
version        "1.0.0",
    
url            "Dr. McKay"
};

public 
OnPluginStart() {
    
HookEvent("player_spawn"Event_PlayerSpawn);
    
HookEvent("player_healedbymedic"Event_PlayerHealedbymedic);
    
HookEvent("localplayer_healed"Event_LocalplayerHealed);
}

public 
Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast) {
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
TF2_AddCondition(clientTFCond_Kritzkrieged9999999.9);

If that's not correct (because I don't know what I'm doin >_>) please show me how to do it

Edit: What I'm aiming for is always having crits on

Edit #2: after finally reading the sourcepawn documentation, now i see what I did wrong *facepalm

Quote:
Originally Posted by Tylerst View Post
Use TFCond_CritOnWin instead, it doesn't get removed on heal.
I fixed my mistake it worked ilu very much ty both for helping me gets crits on my server ^.^

Last edited by Jakesterdog123; 06-25-2013 at 01:01. Reason: i was stupid :'(
Jakesterdog123 is offline