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

resolved


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lautaro2021
New Member
Join Date: Sep 2021
Old 12-26-2021 , 17:57   resolved
Reply With Quote #1

resolved

Last edited by lautaro2021; 04-01-2022 at 17:04. Reason: help with top
lautaro2021 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-26-2021 , 18:11   Re: ayuda con top
Reply With Quote #2

Give more information.
Does it show information for the current map or all time?
How is it a "top" if it shows stats for just one player?
Why is your title in another language?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Old 12-26-2021, 18:22
lautaro2021
This message has been deleted by lautaro2021.
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 12-26-2021 , 19:01   Re: ayuda con top
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
Does it show information for the current map or all time?
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
Old 12-26-2021, 19:20
lautaro2021
This message has been deleted by lautaro2021.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-27-2021 , 14:53   Re: ayuda con top
Reply With Quote #4

Command: /mystats

PHP Code:
#include <amxmodx>
#include <csstats>

public plugin_init()
{
    
register_plugin("Personal Stats""1.0""OciXCrom")
    
register_clcmd("say /mystats""Cmd_MyStats")
}

public 
Cmd_MyStats(id)
{
    new 
szTitle[128], iStats[8], iHits[8]
    
get_user_stats(idiStatsiHits)
    
formatex(szTitlecharsmax(szTitle), "Your Personal Stats^nYour Rank: \r#%i"iStats[7])

    new 
iMenu menu_create(szTitle"Menu_Handler")

    
menu_add_custom_item(iMenu"Kills: \y%i"iStats[0])
    
menu_add_custom_item(iMenu"Deaths: \y%i"iStats[1])
    
menu_add_custom_item(iMenu"Headshots: \y%i"iStats[2])

    new 
iStats2[4]
    
get_user_stats2(idiStats2)

    
menu_add_custom_item(iMenu"C4 Defuses: \y%i"iStats2[1])
    
menu_add_custom_item(iMenu"C4 Plants: \y%i"iStats2[2])

    
get_user_wstats(idCSW_KNIFEiStatsiHits)
    
menu_add_custom_item(iMenu"Knife Kills: \y%i"iStats[0])

    
menu_display(idiMenu)
    return 
PLUGIN_HANDLED
}

public 
Menu_Handler(idiMenuiItem)
{
    return 
PLUGIN_HANDLED
}

menu_add_custom_item(iMenuszItem[], any:...)
{
    new 
szMenuItem[128]
    
vformat(szMenuItemcharsmax(szMenuItem), szItem3)
    
menu_additem(iMenuszMenuItem)

__________________

Last edited by OciXCrom; 02-06-2022 at 15:35.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 12-27-2021 , 15:06   Re: ayuda con top
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
Command: /mystats

PHP Code:
#include <amxmodx>
#include <csstats>

public plugin_init()
{
    
register_plugin("Personal Stats""1.0""OciXCrom")
    
register_clcmd("say /mystats""Cmd_MyStats")
}

public 
Cmd_MyStats(id)
{
    new 
iMenu menu_create("Your Personal Stats""Menu_Handler")

    new 
iStats[8], iHits[8]
    
get_user_stats(idiStatsiHits)

    
menu_add_custom_item(iMenu"Kills: \y%i"iStats[0])
    
menu_add_custom_item(iMenu"Deaths: \y%i"iStats[1])
    
menu_add_custom_item(iMenu"Headshots: \y%i"iStats[2])

    new 
iStats2[4]
    
get_user_stats2(idiStats2)

    
menu_add_custom_item(iMenu"C4 Defuses: \y%i"iStats[1])
    
menu_add_custom_item(iMenu"C4 Plants: \y%i"iStats[2])

    
get_user_wstats(idCSW_KNIFEiStatsiHits)
    
menu_add_custom_item(iMenu"Knife Kills: \y%i"iStats[0])

    
menu_display(idiMenu)
    return 
PLUGIN_HANDLED
}

public 
Menu_Handler(idiMenuiItem)
{
    return 
PLUGIN_HANDLED
}

menu_add_custom_item(iMenuszItem[], any:...)
{
    new 
szMenuItem[128]
    
vformat(szMenuItemcharsmax(szMenuItem), szItem3)
    
menu_additem(iMenuszMenuItem)

I was think should create a code for checking when the player do plant or defuse for the bomb and saving it, i was gonna do this xD
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-27-2021 , 15:14   Re: ayuda con top
Reply With Quote #6

All that information is already saved in CSStats. No need for any additional saving.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 12-27-2021 , 15:17   Re: ayuda con top
Reply With Quote #7

Quote:
Originally Posted by OciXCrom View Post
All that information is already saved in CSStats. No need for any additional saving.
I know but i didn't think c4 already has the same thing, now i have known
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
Old 12-31-2021, 14:46
lautaro2021
This message has been deleted by lautaro2021.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-31-2021 , 15:20   Re: ayuda con top
Reply With Quote #8

The stats are read from your server's CSStats - previous stats will be available too, the counter doesn't start when you add the plugin. I don't see the harm in this.

If you want to reset CSStats, change the cvar "csstats_reset 1", change the map, then do "csstats_reset 0".
__________________

Last edited by OciXCrom; 12-31-2021 at 15:20.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Old 01-15-2022, 09:32
lautaro2021
This message has been deleted by lautaro2021.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-15-2022 , 10:11   Re: ayuda con top
Reply With Quote #9

Quote:
Originally Posted by lautaro2021 View Post
Hello, how are you? The plugin works but it marks other kills that I did not do, it does it at all, do you know if there is an error?
Read the comment above yours.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 01-26-2022 , 04:22   Re: ayuda con top
Reply With Quote #10

Quote:
Originally Posted by lautaro2021 View Post
Hello, how are you? The plugin works but it marks other kills that I did not do, it does it at all, do you know if there is an error?
PHP Code:
menu_add_custom_item(iMenu"C4 Defuses: \y%i"iStats[1])
    
menu_add_custom_item(iMenu"C4 Plants: \y%i"iStats[2]) 
->
PHP Code:
menu_add_custom_item(iMenu"C4 Defuses: \y%i"iStats2[1])
    
menu_add_custom_item(iMenu"C4 Plants: \y%i"iStats2[2]) 
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
Old 02-06-2022, 15:31
stuar
This message has been deleted by stuar.
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 12:48.


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