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

[Plugin Request] Top Status


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
QuickDroLLL
Senior Member
Join Date: Dec 2021
Location: AMX Mod X Land
Old 04-18-2023 , 07:48   [Plugin Request] Top Status
Reply With Quote #1

Hello every one, QuickDroLLL here, so basicly iam loking for /status for my server the plugin has those functions when someone type /status a menu will shown have those functions as well:
Top Money it will show motd for the 15 best with the who have the most money in server (using jbe_get_user_money(id) native)
Top Kills it will show motd for the 15 best with kills in the server
Top Deaths it will show motd for the 15 best who got killed in server xD
Top Time Played it will show motd for the 15 best time played in server
QuickDroLLL is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 04-18-2023 , 16:09   Re: [Plugin Request] Top Status
Reply With Quote #2

Code:
#include <amxmodx> native jbe_get_user_money(id) enum _:type{     kills = 0,     deaths,     time_played,     money } public plugin_init(){     register_clcmd("say /status", "handleStatus") } public handleStatus(id){     new menu = menu_create("Top Player Stats", "handleMenu")     menu_additem(menu, fmt("Most Kills: %n", get_most(kills)))     menu_additem(menu, fmt("Most Deaths: %n", get_most(deaths)))     menu_additem(menu, fmt("Most Time Played: %n", get_most(time_played)))     menu_additem(menu, fmt("Most Money: %n", get_most(money)))     menu_display(id, menu) } public handleMenu(id, menu){     menu_destroy(menu) } stock get_most(const most_type){     new return_player[MAX_PLAYERS], players[MAX_PLAYERS], num, id, highest, highest_id     get_players(players, num, "ch")     for (new i = 0; i < num; i++){         id = players[i]         switch (most_type){             case kills: return_player[id] = get_user_frags(id)             case deaths: return_player[id] = get_user_deaths(id)             case time_played: return_player[id] = get_user_time(id)             case money: return_player[id] = jbe_get_user_money(id)         }     }     for (new j = 0; j < sizeof(return_player); j++){         if (highest < return_player[j] && return_player[j]){             highest = return_player[j]             highest_id = j         }     }     return highest_id }
__________________
bigdaddy424 is offline
QuickDroLLL
Senior Member
Join Date: Dec 2021
Location: AMX Mod X Land
Old 04-19-2023 , 09:30   Re: [Plugin Request] Top Status
Reply With Quote #3

Quote:
Originally Posted by bigdaddy424 View Post
Code:
#include <amxmodx> native jbe_get_user_money(id) enum _:type{     kills = 0,     deaths,     time_played,     money } public plugin_init(){     register_clcmd("say /status", "handleStatus") } public handleStatus(id){     new menu = menu_create("Top Player Stats", "handleMenu")     menu_additem(menu, fmt("Most Kills: %n", get_most(kills)))     menu_additem(menu, fmt("Most Deaths: %n", get_most(deaths)))     menu_additem(menu, fmt("Most Time Played: %n", get_most(time_played)))     menu_additem(menu, fmt("Most Money: %n", get_most(money)))     menu_display(id, menu) } public handleMenu(id, menu){     menu_destroy(menu) } stock get_most(const most_type){     new return_player[MAX_PLAYERS], players[MAX_PLAYERS], num, id, highest, highest_id     get_players(players, num, "ch")     for (new i = 0; i < num; i++){         id = players[i]         switch (most_type){             case kills: return_player[id] = get_user_frags(id)             case deaths: return_player[id] = get_user_deaths(id)             case time_played: return_player[id] = get_user_time(id)             case money: return_player[id] = jbe_get_user_money(id)         }     }     for (new j = 0; j < sizeof(return_player); j++){         if (highest < return_player[j] && return_player[j]){             highest = return_player[j]             highest_id = j         }     }     return highest_id }
can you make it shows as motd and shows the 15 best not only 1 thank you for your time <3

and when i try to compile it he give me those errors:

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "fmt" on line 18
Error: Undefined symbol "fmt" on line 19
Error: Undefined symbol "fmt" on line 20
Error: Undefined symbol "fmt" on line 21
Error: Undefined symbol "MAX_PLAYERS" on line 30
Error: Invalid expression, assumed zero on line 30
Error: Undefined symbol "players" on line 30
Error: Too many error messages on one line on line 30

Compilation aborted.
8 Errors.
Could not locate output file C:\Users\Ilyes\Desktop\gg.amx (compile failed).

Last edited by QuickDroLLL; 04-19-2023 at 09:36.
QuickDroLLL is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 04-19-2023 , 12:18   Re: [Plugin Request] Top Status
Reply With Quote #4

compile on 1.9+
__________________
bigdaddy424 is offline
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 06:28.


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