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

No one knows how to pause statsx.amxx?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GoldNux
Senior Member
Join Date: Mar 2018
Old 04-15-2018 , 00:05   No one knows how to pause statsx.amxx?
Reply With Quote #1

I don't want statsx.amxx to record kills and deaths on warmup.cfg
But I want it to record kills and deaths on start.cfg

I have tried pausing it like I do any other plugin but it wont let me.
I also tried to make a plugin that sets the kills and deaths to zero on warmup.
But it still records the frags/deaths..

I tried looking at statsx.sma but I cant find how to pause it.

Please someone help!
__________________
Try my version of de_dust2, I think it's great and you should check it out!
https://gamebanana.com/mods/83731
GoldNux is offline
polimpo4
Member
Join Date: Jan 2017
Old 04-16-2018 , 01:04   Re: No one knows how to pause statsx.amxx?
Reply With Quote #2

i believe it will be complicated to made but if it can be possible you need to create a plugin using syntax from csx.inc function ...

bomb_defused

Syntax
forward bomb_defused(defuser);

Usage

defuser
Defuser client index

Description
Called after a bomb defuse has finished.

Return
This forward ignores the returned value

And Then Set It To Not Frag To All Counter-Terrorist Team And To The Defuser With A Condition.

For Terrorist You Need Create Another Condition And Use Another function


bomb_explode

Syntax
forward bomb_explode(planter, defuser);

Usage
planter
Planter client index

defuser
Defuser client index, if applicable

Description
Called when the bomb exploded.

Return
This forward ignores the returned value.

And Make It To Not Frag To Terrorist With Condition Too.

Last edited by polimpo4; 04-16-2018 at 01:07. Reason: wrong style 2
polimpo4 is offline
GoldNux
Senior Member
Join Date: Mar 2018
Old 04-16-2018 , 03:25   Re: No one knows how to pause statsx.amxx?
Reply With Quote #3

Quote:
Originally Posted by polimpo4 View Post
i believe it will be complicated to made but if it can be possible you need to create a plugin using syntax from csx.inc function ...

bomb_defused

Syntax
forward bomb_defused(defuser);

Usage

defuser
Defuser client index

Description
Called after a bomb defuse has finished.

Return
This forward ignores the returned value

And Then Set It To Not Frag To All Counter-Terrorist Team And To The Defuser With A Condition.

For Terrorist You Need Create Another Condition And Use Another function


bomb_explode

Syntax
forward bomb_explode(planter, defuser);

Usage
planter
Planter client index

defuser
Defuser client index, if applicable

Description
Called when the bomb exploded.

Return
This forward ignores the returned value.

And Make It To Not Frag To Terrorist With Condition Too.
It does sound complicated..
I was thinking maybe someone could rewrite the plugin.

Here is a link to the statsx.sma
https://github.com/alliedmodders/amx...ike/statsx.sma
__________________
Try my version of de_dust2, I think it's great and you should check it out!
https://gamebanana.com/mods/83731
GoldNux is offline
CookieCrumbler
Senior Member
Join Date: Feb 2013
Location: Australia
Old 04-16-2018 , 04:20   Re: No one knows how to pause statsx.amxx?
Reply With Quote #4

You could try something like this.

Register a new CVAR that must have correct value before parsing code and place in the respective .cfg file eg: stats_switch 0 , stats_switch 1

if(get_pcvar_num(g_statsswitch))
{
//code here
}

or

Create a concmd to hook the switching state of a bool to place in your .cfg file

Create a bool and then parse PLUGIN_HANDLED if the bool is true at the start of that piece of code



new bool:stats_logging_switch // Automatically set to false by default

register_concmd( "statsx_switch", "toggle_switch")


public toggle_switch()
{
stats_logging_switch = !stats_logging_switch
}



// place code below before any code at the point you want to stop code being executed

if (stats_logging_switch == true )
return PLUGIN_HANDLED
__________________
--------------------------------------------------
C is for cookie ... thats good enuff 4 me

Last edited by CookieCrumbler; 04-16-2018 at 05:10.
CookieCrumbler is offline
GoldNux
Senior Member
Join Date: Mar 2018
Old 04-16-2018 , 11:06   Re: No one knows how to pause statsx.amxx?
Reply With Quote #5

Quote:
Originally Posted by CookieCrumbler View Post
You could try something like this.

Register a new CVAR that must have correct value before parsing code and place in the respective .cfg file eg: stats_switch 0 , stats_switch 1
...
Thank you for helping me out!

I will try to do this.
__________________
Try my version of de_dust2, I think it's great and you should check it out!
https://gamebanana.com/mods/83731
GoldNux is offline
Reply


Thread Tools
Display Modes

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 11:35.


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