Raised This Month: $32 Target: $400
 8% 

Solved Question: What is a ConVar.FloatValue's expected value?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 12-24-2017 , 00:51   Re: Question: What is a ConVar.FloatValue's expected value?
Reply With Quote #11

I use the "SpecialWarn" message to let me know if it's working.

PHP Code:
if(iCompanionCount && iBotCount iPlayerCount 1)
{
    
flPlayerAloneStartTime[iPlayerIndex] = GetEngineTime();
    
bMsg[iPlayerIndex] = true;
}

else
{
    if(
bMsg[iPlayerIndex] && bIsValidClient(iPlayerIndex))
        
PrintHintText(iPlayerIndex"[ASS] %t""SpecialWarn");
    
bMsg[iPlayerIndex] = false;

When I use CreateTimer(cvPunishDetectionDelay.FloatValue, the message doesn't pop up when I pass the distance limit. When I use CreateTimer(0.1 the message appears.

This is all the relevant code for the ConVar:
PHP Code:
ConVar cvPunishDetectionDelay;

public 
void OnPluginStart()
{
     
cvPunishDetectionDelay CreateConVar("asspunish_detectiondelay""0.1""The Punishment system will check for Speedrunners every time this many seconds pass.\n(0 or X < 1: OFF)\n(X: ON, seconds allowed.)"
}

public 
void OnMapStart()
{
     if(
cvPunishDetectionDelay.IntValue != 0)
          
hPunishTimer CreateTimer(cvPunishDetectionDelay.FloatValueaAutoTimerUpdatePlayer_TIMER_REPEAT);

__________________

Last edited by Psyk0tik; 12-24-2017 at 00:52.
Psyk0tik 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 19:43.


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