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

Solved [req] auto scoreboard on ded screen


Post New Thread Reply   
 
Thread Tools Display Modes
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 02-13-2024 , 10:49   Re: [req] auto scoreboard on ded screen
Reply With Quote #11

unlike previous betas, this one has compassion for the admins, so they can perform their role. since if there is no such filter, you will not even be able to open the menu:

Code:
#include <amxmodx> #include <hamsandwich> #if AMXX_VERSION_NUM > 182     #define client_disconnect client_disconnected #else     #define MAX_PLAYERS 32 #endif new bool:showscore[MAX_PLAYERS + 1] const taskid = 666 public plugin_init() {     RegisterHam(Ham_Spawn, "player", "Ham_Spawn_Player_post", 1)     RegisterHam(Ham_Killed, "player", "Ham_Killed_Player_post", 1) } public client_disconnect(id) {     if(showscore[id])     {         showscore[id] = false                 remove_task(id + taskid)     } } public Ham_Spawn_Player_post(id) {     if(showscore[id] && is_user_alive(id))     {         showscore[id] = false                 remove_task(id + taskid)                 client_cmd(id, "-showscores")     } } public Ham_Killed_Player_post(id) {     if(get_user_flags(id) & ADMIN_MENU) //<-omited admin's!     {         return HAM_IGNORED     }         showscore[id] = true         set_task(0.1, "showscores", id + taskid, .flags="b")         return HAM_IGNORED } public showscores(id) {     id -= taskid         client_cmd(id, "+showscores") }

curious fact
__________________

Last edited by mlibre; 02-13-2024 at 11:34. Reason: const
mlibre 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 13:16.


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