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

Ultimate Break Message v1.1


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
CT_Spawn
Junior Member
Join Date: Apr 2024
Old 04-14-2024 , 12:10   Ultimate Break Message v1.1
Reply With Quote #1

Ultimate Break Message v1.1

Description:
  • This plugin is inspired by Raheem. This plugin will print a message in the chat if the player breaks anything on the map. The print is done and appears only to the admin or even to all players depending on the options in the cvar. This may be useful in some cases for administrators to find out who is violating the rules. This program is also useful in zombie escape servers.
  • The new thing here is that previous plugins did not show the player break messages that occur by throwing grenades.
  • also ,The name of the thing that broke appears, and this is based on a data base that you will fill out during the game, and the player’s team appears


    Quote:
    [human] Player1 has broken a bridge
    [zombie] Fullserver has broken a wood bridge

Cvars:
  • ct_break_message_type 1 0 = Disabled | 1 = Admins only see | 2 =All player see
  • ct_break_message_show_hint 0 0 = disable | 1 = show on all admins | 2 dont show hint beakable entity for all admin only by command say /brshow <on|off>
Commands Usage:

amx_cvar ct_break_message_show_hint 1 for show hint of all entity
amx_cvar ct_break_message_show_hint 2 for show hint of all entity by say /brshow on command

say /brshow on for show breakable entity info
say /brshow off for disable show breakable entity info

say /brmsg 28 "a bridge" for set name of entity
say /brmsg 28 off for delete name of entity

Installation & Instructions:
  • Let's start learning how to install this plugin, So let's first start with what is the Requirements for this plugin?
    Simply install it like any plugin.
  1. Latest AMX Mod X 1.9+:
    • for this plugins work you need AMX Mod X 1.9 or up , not using v1.8.2
  2. Add Print Center Fix Module(optional):
    • if center message not work u will do . First download Print Center Fix 2022-01-06, move the files into this folder, here addons\amxmodx\dlls
    • and go here addons\metamod\plugins.ini , and add this line in windows server in the end of file :
      Code:
      win32   addons\amxmodx\dlls\printcenterfix_mm.dll
    • or add this line in linux server in the end of file :
      Code:
      linux addons/amxmodx/dlls/printcenterfix_mm_i386.so
  3. plugin Installation:
    • (Same as when you install plugin compile ".sma" and copy ".amxx" file form complied folder to plugins folder and go to plugins.ini and write it's name, also you need to define the module to run).
Changelog:
Spoiler

Screenshots:

Attached Files
File Type: sma Get Plugin or Get Source (ultimate_break_message.sma - 76 views - 6.1 KB)
File Type: sma Get Plugin or Get Source (ultimate_break_message_hint.sma - 73 views - 8.4 KB)
File Type: zip addons.zip (230.6 KB, 77 views)

Last edited by CT_Spawn; 04-15-2024 at 11:03.
CT_Spawn is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 04-14-2024 , 14:07   Re: Ultimate Break Message v1.1
Reply With Quote #2

adds a "changelog" from previous versions, what's new or removed, added...
__________________
mlibre is offline
CT_Spawn
Junior Member
Join Date: Apr 2024
Old 04-14-2024 , 19:36   Re: Ultimate Break Message v1.1
Reply With Quote #3

Quote:
Originally Posted by mlibre View Post
adds a "changelog" from previous versions, what's new or removed, added...
Done ��
CT_Spawn is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 04-16-2024 , 21:00   Re: Ultimate Break Message v1.1
Reply With Quote #4

great idea, although your works lacks readability because its in someway hardcoded
  • use charsmax
  • put `get_mapname` in `plugin_init`, map name will never change
  • extensive use of `dir_exists` and `mkdir`, just create one directory on /configs and use `file_exists` pointing directly to end file and use a proper name on naming directory, dont promote your name. eg:configs/map_breakables/mapname.json should be just fine i suppose
  • `is_user_connected` is pointless
  • `entity_get_edict` doest return -1 but 0 read:https://www.amxmodx.org/api/engine/entity_get_edict
    `entity_get_edict2` returns -1 read:https://www.amxmodx.org/api/engine/entity_get_edict2
    _edict2 is recommended from devs being 'safer'
  • extensive use of `get_user_team` if/else statements, do this instead if you want to put a team name
    PHP Code:
    new const Teams[][] =
    {
        
    "UNASSIGNED",
        
    "Terrorist",
        
    "Counter-Terrorist",
        
    "Spectator"
    }
    server_print "Team %s"Teams[get_user_team(id)] 
  • or use maching team color on their name, its self explanatory and makes this plugin great for other gamemodes eg: `client_print_color(id, id, "^3%n ^1broke a structure", id)`
  • since youre dropping support for lower versions use `bind_pcvar_num` combined with `create_cvar`
  • reconstruct `ct_enitityname`
    PHP Code:
    public ct_enitityname(entity_name[], output[], len)
    {
        new 
    cells_written json_object_get_string(datajsonentity_nameoutputlen)
        if (!
    cells_written)
            
    copy(outputlen"a structure")

  • i would totally remove `send_to_admins` and send it to everyone, but id recommend having a cvar to toggle between sending the break entity message to your teammates & spectators or to everybody
__________________
bigdaddy424 is online now
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 19:49.


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