Approved Grenade Status

Plug-ins compatibility with Zombie Escape 1.x only!


Post Reply
User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

Grenade Status

#1

Post by Night Fury » 7 years ago

Hi, everyone. :)

Description:
  • This plugin will show icon for Frost and Fire Nades and also will replace the old "Fire in the hole!" message with another colored one the color based on nade type like: [Fire] [Frost] This also will replace old grenade sounds with new ones random from 6 sounds.
Description:
  • ze_grenade_status_team 0 Which team to show? 0 = Show message to all | 1 = Show message to same teams only
Instruction:
  • If you need to change texts appear like "Fire in the hole!" you will need to open the code then edit:

    1. #define FIRE_IN_THE_HOLE "Fire in the hole!"
    2. #define FIRE_NADE "Fire Nade"
    3. #define FROST_NADE "Frost Nade"

    Then ReCompile the plugin again.
Screenshots:
  • ImageImageImage
Changelog:
  • Spoiler!
    Version 1.0
    • First Release.
    Version 1.1
    • Optimized, Fixed some problems.
    Version 1.2 [Current Version]
    • Used now client_print_color() from AMXMODX v 1.8.3

Downloads:
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#2

Post by johnnysins2000 » 7 years ago

Nice Job bro

This Grenade status plugin is available for zp as well but now For ze also
Nobody Is That Busy If They Make Time :roll:

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#3

Post by Raheem » 7 years ago

1-You tested it? It give many errors just see it:
  • Code: Select all

    L 04/30/2017 - 08:26:27: Invalid message argument 3
    L 04/30/2017 - 08:26:27: [AMXX] Displaying debug trace (plugin "ze_grenade_status.amxx")
    L 04/30/2017 - 08:26:27: [AMXX] Run time error 10: native error (native "get_msg_arg_string")
    L 04/30/2017 - 08:26:27: [AMXX]    [0] ze_grenade_status.sma::Block_Msg_Text (line 83)
    L 04/30/2017 - 08:26:27: Invalid message argument 3
    L 04/30/2017 - 08:26:27: [AMXX] Displaying debug trace (plugin "ze_grenade_status.amxx")
    L 04/30/2017 - 08:26:27: [AMXX] Run time error 10: native error (native "get_msg_arg_string")
    L 04/30/2017 - 08:26:27: [AMXX]    [0] ze_grenade_status.sma::Block_Msg_Text (line 83)
    L 04/30/2017 - 08:26:27: Invalid message argument 3
    L 04/30/2017 - 08:26:27: [AMXX] Displaying debug trace (plugin "ze_grenade_status.amxx")
    L 04/30/2017 - 08:26:27: [AMXX] Run time error 10: native error (native "get_msg_arg_string")
    L 04/30/2017 - 08:26:27: [AMXX]    [0] ze_grenade_status.sma::Block_Msg_Text (line 83)
    L 04/30/2017 - 08:26:27: Invalid message argument 3
    L 04/30/2017 - 08:26:27: [AMXX] Displaying debug trace (plugin "ze_grenade_status.amxx")
    L 04/30/2017 - 08:26:27: [AMXX] Run time error 10: native error (native "get_msg_arg_string")
    L 04/30/2017 - 08:26:27: [AMXX]    [0] ze_grenade_status.sma::Block_Msg_Text (line 83)
    L 04/30/2017 - 08:26:28: Invalid message argument 3
2-It doesn't work correctly if i switched the weapon the icon won't be removed.
3-You need to make a cvars to make things much easier.
4-You need to follow the posting style.

Till you do these things the plugin Un-Apporved as it's not works. If you don't fix it so it will be trashed.
He who fails to plan is planning to fail

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#4

Post by Night Fury » 7 years ago

Raheem wrote: 7 years ago 1-You tested it? It give many errors just see it:
  • Code: Select all

    L 04/30/2017 - 08:26:27: Invalid message argument 3
    L 04/30/2017 - 08:26:27: [AMXX] Displaying debug trace (plugin "ze_grenade_status.amxx")
    L 04/30/2017 - 08:26:27: [AMXX] Run time error 10: native error (native "get_msg_arg_string")
    L 04/30/2017 - 08:26:27: [AMXX]    [0] ze_grenade_status.sma::Block_Msg_Text (line 83)
    L 04/30/2017 - 08:26:27: Invalid message argument 3
    L 04/30/2017 - 08:26:27: [AMXX] Displaying debug trace (plugin "ze_grenade_status.amxx")
    L 04/30/2017 - 08:26:27: [AMXX] Run time error 10: native error (native "get_msg_arg_string")
    L 04/30/2017 - 08:26:27: [AMXX]    [0] ze_grenade_status.sma::Block_Msg_Text (line 83)
    L 04/30/2017 - 08:26:27: Invalid message argument 3
    L 04/30/2017 - 08:26:27: [AMXX] Displaying debug trace (plugin "ze_grenade_status.amxx")
    L 04/30/2017 - 08:26:27: [AMXX] Run time error 10: native error (native "get_msg_arg_string")
    L 04/30/2017 - 08:26:27: [AMXX]    [0] ze_grenade_status.sma::Block_Msg_Text (line 83)
    L 04/30/2017 - 08:26:27: Invalid message argument 3
    L 04/30/2017 - 08:26:27: [AMXX] Displaying debug trace (plugin "ze_grenade_status.amxx")
    L 04/30/2017 - 08:26:27: [AMXX] Run time error 10: native error (native "get_msg_arg_string")
    L 04/30/2017 - 08:26:27: [AMXX]    [0] ze_grenade_status.sma::Block_Msg_Text (line 83)
    L 04/30/2017 - 08:26:28: Invalid message argument 3
2-It doesn't work correctly if i switched the weapon the icon won't be removed.
3-You need to make a cvars to make things much easier.
4-You need to follow the posting style.

Till you do these things the plugin Un-Apporved as it's not works. If you don't fix it so it will be trashed.
Updated.
1- If it gives you errors, then it's your poor CS.
2- Fixed.
3- Useless, nothing needs Cvar here, if you talk about cvar to turn on/off grenade icon or fire in the hole message then it's no sense (USELESS).
4- What's post style?! O.o :shock: :o
Approved.
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#5

Post by johnnysins2000 » 7 years ago

Jack GamePlay wrote: 7 years ago
Raheem wrote: 7 years ago 1-You tested it? It give many errors just see it:
  • Code: Select all

    L 04/30/2017 - 08:26:27: Invalid message argument 3
    L 04/30/2017 - 08:26:27: [AMXX] Displaying debug trace (plugin "ze_grenade_status.amxx")
    L 04/30/2017 - 08:26:27: [AMXX] Run time error 10: native error (native "get_msg_arg_string")
    L 04/30/2017 - 08:26:27: [AMXX]    [0] ze_grenade_status.sma::Block_Msg_Text (line 83)
    L 04/30/2017 - 08:26:27: Invalid message argument 3
    L 04/30/2017 - 08:26:27: [AMXX] Displaying debug trace (plugin "ze_grenade_status.amxx")
    L 04/30/2017 - 08:26:27: [AMXX] Run time error 10: native error (native "get_msg_arg_string")
    L 04/30/2017 - 08:26:27: [AMXX]    [0] ze_grenade_status.sma::Block_Msg_Text (line 83)
    L 04/30/2017 - 08:26:27: Invalid message argument 3
    L 04/30/2017 - 08:26:27: [AMXX] Displaying debug trace (plugin "ze_grenade_status.amxx")
    L 04/30/2017 - 08:26:27: [AMXX] Run time error 10: native error (native "get_msg_arg_string")
    L 04/30/2017 - 08:26:27: [AMXX]    [0] ze_grenade_status.sma::Block_Msg_Text (line 83)
    L 04/30/2017 - 08:26:27: Invalid message argument 3
    L 04/30/2017 - 08:26:27: [AMXX] Displaying debug trace (plugin "ze_grenade_status.amxx")
    L 04/30/2017 - 08:26:27: [AMXX] Run time error 10: native error (native "get_msg_arg_string")
    L 04/30/2017 - 08:26:27: [AMXX]    [0] ze_grenade_status.sma::Block_Msg_Text (line 83)
    L 04/30/2017 - 08:26:28: Invalid message argument 3
2-It doesn't work correctly if i switched the weapon the icon won't be removed.
3-You need to make a cvars to make things much easier.
4-You need to follow the posting style.

Till you do these things the plugin Un-Apporved as it's not works. If you don't fix it so it will be trashed.
Updated.
1- If it gives you errors, then it's your poor CS.
2- Fixed.
3- Useless, nothing needs Cvar here, if you talk about cvar to turn on/off grenade icon or fire in the hole message then it's no sense (USELESS).
4- What's post style?! O.o :shock: :o
Approved.

4- Post style

By post style he means That Post the Plug-ins the way Raheem post it follow that style of posting

Anyway My exams Start after 2 days That is why I haven't test or posted anything
But I will get free soon to test it
Nobody Is That Busy If They Make Time :roll:

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#6

Post by Raheem » 7 years ago

So why you again approve plugin you don't write? And you are so lazy to optimize it using ReAPI!!

1-You don't fix the error, You only fixed that when change weapon the icon will be removed only!! Your code not optimized seems that you copy without thinking. I optimized and fixed it. Code:
    1. #include <zombie_escape>
    2.  
    3. new gi[33][32]
    4.  
    5. new const grenade_snds[][] =
    6. {
    7.     "radio/grenades/ct_flashbang01.wav",
    8.     "radio/grenades/ct_flashbang02.wav",
    9.     "radio/grenades/ct_flashbang03.wav",
    10.     "radio/grenades/ct_grenade01.wav",
    11.     "radio/grenades/ct_grenade02.wav",
    12.     "radio/grenades/ct_grenade03.wav",
    13.     "radio/grenades/ct_smoke01.wav",
    14.     "radio/grenades/ct_smoke02.wav",
    15.     "radio/grenades/ct_smoke03.wav",
    16.     "radio/grenades/t_flashbang01.wav",
    17.     "radio/grenades/t_flashbang02.wav",
    18.     "radio/grenades/t_flashbang03.wav",
    19.     "radio/grenades/t_grenade01.wav",
    20.     "radio/grenades/t_grenade02.wav",
    21.     "radio/grenades/t_grenade03.wav",
    22.     "radio/grenades/t_smoke01.wav",
    23.     "radio/grenades/t_smoke02.wav",
    24.     "radio/grenades/t_smoke03.wav"
    25. }
    26.  
    27. new grenade_txts[charsmax(grenade_snds)][65], g_txt_enabled = 1
    28.  
    29. public plugin_precache()
    30. {
    31.     for(new i = 0; i < charsmax(grenade_snds); i++)
    32.         precache_sound(grenade_snds[i])
    33. }
    34.  
    35. public plugin_init()
    36. {
    37.     register_plugin("[ZE] Addon: Grenade Status", "2.0", "Jack")
    38.    
    39.     register_event("CurWeapon","grenade_icon","be","1=1")
    40.    
    41.     register_message(get_user_msgid("SendAudio"), "Block_Msg_Audio")
    42.     register_message(get_user_msgid("TextMsg"), "Block_Msg_Text")
    43.    
    44.     RegisterHookChain(RG_CBasePlayer_Killed, "Fw_Killed", 1)
    45.    
    46.     new szFilepath[64]; get_localinfo("amxx_configsdir", szFilepath, charsmax(szFilepath))
    47.     add(szFilepath, charsmax(szFilepath), "/grenade_messages.ini")
    48.     if(!file_exists(szFilepath))
    49.     {
    50.         g_txt_enabled = 0
    51.         return
    52.     }
    53.  
    54.     new f = fopen(szFilepath, "rt")
    55.     new szData[64], i = 0
    56.  
    57.     while( !feof(f) && i < charsmax(grenade_snds))
    58.     {
    59.         fgets(f, szData, charsmax(szData))
    60.         trim(szData)
    61.         if(!szData[0] || szData[0] == ';' || szData[0] == '/' && szData[1] == '/')
    62.             continue
    63.        
    64.         copy(grenade_txts[i], charsmax(szData), szData)
    65.         i++
    66.     }
    67.     fclose(f)
    68. }
    69.  
    70. public ze_user_infected(id) remove_grenade_icon(id)
    71. public Fw_Killed(id)    remove_grenade_icon(id)
    72. public Block_Msg_Audio(msg_id, msg_dest, msg_entity)
    73. {
    74.     if(get_msg_args() != 3 || get_msg_argtype(2) != ARG_STRING)
    75.         return PLUGIN_CONTINUE
    76.  
    77.     new arg2[20]; get_msg_arg_string(2, arg2, charsmax(arg2))
    78.     if(equal(arg2[1], "!MRAD_FIREINHOLE"))
    79.         return PLUGIN_HANDLED
    80.  
    81.     return PLUGIN_CONTINUE
    82. }
    83.  
    84. public Block_Msg_Text()
    85. {
    86.     if(g_txt_enabled != 1 || get_msg_args() != 5 || get_msg_argtype(3) != ARG_STRING || get_msg_argtype(5) != ARG_STRING) {
    87.         return PLUGIN_CONTINUE
    88.     }
    89.  
    90.     new arg3[16]
    91.     get_msg_arg_string(3, arg3, 15)
    92.     if(!equal(arg3, "#Game_radio")) {
    93.         return PLUGIN_CONTINUE
    94.     }
    95.  
    96.     new arg5[20]
    97.     get_msg_arg_string(5, arg5, 19)
    98.     if(equal(arg5, "#Fire_in_the_hole"))
    99.     {
    100.         return PLUGIN_HANDLED
    101.     }
    102.    
    103.     return PLUGIN_CONTINUE
    104. }
    105.  
    106. public grenade_throw(id, grenid, wpnid)
    107. {
    108.     if(!is_user_alive(id))  return
    109.    
    110.     new players[32], pnum, playername[32], flag, temp
    111.     get_players(players, pnum, "a")
    112.     get_user_name(id, playername, charsmax(playername))
    113.     if(get_member(id, m_iTeam) == TEAM_CT)  flag = 0    // CS_TEAM_CT no sence to include cstrike for 1 constant
    114.     else    flag = 9
    115.    
    116.     for(new i = 1; i < pnum + 1; i++)
    117.     {
    118.         if(!is_user_alive(i))   continue
    119.         if(get_member(i, m_iTeam) == get_member(id, m_iTeam)) // Same team?
    120.         {
    121.             switch(wpnid)
    122.             {
    123.                 case CSW_HEGRENADE: temp = random_num(0, 4) + flag
    124.                 case CSW_FLASHBANG, CSW_SMOKEGRENADE:   temp = random_num(5, 8) + flag
    125.             }
    126.  
    127.             client_cmd(i, "spk ^"%s^"", grenade_snds[temp])
    128.             ColorPrint(i, "!t%s !y(!gRADIO!y): !t%s !y[!g%s!y]", playername, grenade_txts[temp], get_user_weapon(id) == CSW_HEGRENADE ? "Fire Nade" : "Freeze Nade")
    129.             remove_grenade_icon(id)
    130.         }
    131.     }
    132. }
    133.  
    134. public grenade_icon(id)
    135. {
    136.     if(!is_user_alive(id))  return
    137.    
    138.     remove_grenade_icon(id)
    139.    
    140.     new red, green, blue
    141.    
    142.     if(read_data(2) == CSW_HEGRENADE)   // Fire
    143.     {
    144.         gi[id] = "dmg_heat"
    145.         red = 255
    146.         green = 0
    147.         blue = 0
    148.     }
    149.     else if(read_data(2) == CSW_FLASHBANG || read_data(2) == CSW_SMOKEGRENADE)  // Frost
    150.     {
    151.         gi[id] = "dmg_cold"
    152.         red = 0
    153.         green = 255
    154.         blue = 255
    155.     }
    156.    
    157.     message_begin(MSG_ONE, get_user_msgid("StatusIcon"), {0,0,0}, id)
    158.     write_byte(1)   // 1- Show || 2- Flash
    159.     write_string(gi[id])
    160.     write_byte(red)
    161.     write_byte(green)
    162.     write_byte(blue)
    163.     message_end()
    164. }
    165.  
    166. public remove_grenade_icon(id)
    167. {
    168.     if(!is_user_alive(id))  return
    169.    
    170.     message_begin(MSG_ONE, get_user_msgid("StatusIcon"), {0,0,0}, id)
    171.     write_byte(0)
    172.     write_string(gi[id])
    173.     message_end()
    174. }
    175.  
    176. stock ColorPrint(const id, const input[], any:...)  
    177. {  
    178.     new count = 1, players[32];  
    179.     static msg[191];  
    180.     vformat(msg, 190, input, 3);  
    181.  
    182.     replace_all(msg, 190, "!g", "^x04"); // Green Color  
    183.     replace_all(msg, 190, "!y", "^x01"); // Default Color  
    184.     replace_all(msg, 190, "!t", "^x03"); // Team Color  
    185.  
    186.     if (id) players[0] = id; else get_players(players, count, "ch");  
    187.     {  
    188.         for (new i = 0; i < count; i++)  
    189.         {  
    190.             if (is_user_connected(players[i]))  
    191.             {  
    192.                 message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);  
    193.                 write_byte(players[i]);  
    194.                 write_string(msg);  
    195.                 message_end();  
    196.             }  
    197.         }  
    198.     }  
    199. }
2-The sounds is say Fire, Flashbang, Smoke and our nades is only Fire and Frost!! So why you add simply sounds? Or you leave it as you copy it?
3-Why you don't post photos like this?
  • ImageImageImage
4-Why you don't follow good style in posting better than the shit you do every time you post something? EX:
Raheem wrote: 7 years ago
Zombies Best Infector
Description:
  • This plugin will get the best infector in Zombies teams based on the infects made by zombie. It will compare all players infects and the highest infects is the best infector. Best infector will be awarded double jumb and will be printed at the new round that he was best infector in the previous round.
Cvars:
  • ze_give_best_infector_multijump 1 Enable or Disable MultiJump Award? 1 = Enable | 0 = Disable
  • ze_best_infc_chat_notice 1 Enable or Disable Chat Notice? 1 = Enable | 0 = Disable
  • ze_best_infc_give_xp 40 XP amount to be given For Best Infector? If you make it 0 he won't get anything.
  • ze_best_infc_give_ec 20 Escape Coins amount to be given For Best Infector? If you make it 0 he won't get anything.

Installation & Instructions:
Changelog:
  • Spoiler!
    Version: 1.0
    • First Release.
    Version: 1.1 [Current Version]
    • New Algorithm used to detect Highest one infect Humans.
    • New Cvar Added so you can give Best Infector some XP.
    • New Cvar Added so you can give Best Infector Some Escape Coins.
    • Chat Notice Message Updated with XP, EC Amounts.
    • Some Problems in Spawn Event has been fixed.

Screenshots:
  • ImageImage

Downloads:
5-Where the description for your plugin? How someone understand how this works? How we can change the text? Or you think we know the original plugin you copied?

If you are so lazy to do things above so no one interested in your plugins you can simply use them without spam here. Don't post things you don't made or at least don't approve them. Rules should be for all, Me you and all should follow same rules.
He who fails to plan is planning to fail

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#7

Post by Night Fury » 7 years ago

Why do you think everything i do is "copy~paste"?!
And if i got the code from anther plugin, why don't you stop yelling & make yours?! I think i made good thing not bad, fixing those kinda errors isn't hard but your CS is poor no more.
I added sounds you'd never get them, those sounds can't be copied too?!
You didn't do anything in the code except making low letter up & up letter down, i can use register_event instead of ReAPI, it's the same.
I see you didn't add anything new, just some checking natives. (~_~)
It's waste of time to add like that style, instead of blaming me, go fix it. :P
1 photo is enough, the member should test it & see how to works not to decicde from photos.
I know what i do & i think before i do. :3 (○_●)
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#8

Post by Raheem » 7 years ago

I have no time now to make these things. I'll do it later.
He who fails to plan is planning to fail

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#9

Post by Night Fury » 7 years ago

Raheem wrote: 7 years ago I have no time now to make these things. I'll do it later.
So am I.
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#10

Post by Raheem » 7 years ago

Ok, Reply on the chat ::: http://escapers-zone.xyz/app.php/mchat
He who fails to plan is planning to fail

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#11

Post by Raheem » 6 years ago

Plugin Updated/Optimized, Now you can use. Have fun :lol:
He who fails to plan is planning to fail

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#12

Post by Raheem » 6 years ago

Fixed some problems and updated to version 1.1
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#13

Post by Spir0x » 6 years ago

version 1.1 not good raheem you removed grenade_messages.ini :3
put it next update it's more good must listen Grenade out and read Player (RADIO) Grenade Out!

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#14

Post by Spir0x » 6 years ago

I cannot xD i dont know how i'm new at these things.

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#15

Post by Raheem » 6 years ago

Spir0x wrote: 6 years ago I cannot xD i dont know how i'm new at these things.
I'am working on series of videos explaining AMXMODX programming language in arabic. Everyday i work in it, it takes from me alot of time. When i publish them you will learn from them everything about that language and will be able to do and won't say "cannot" again.
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#16

Post by Spir0x » 6 years ago

we wait !

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#17

Post by Raheem » 6 years ago

New version available: 1.2
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#18

Post by Spir0x » 6 years ago

then anyone uses this plugin & uses blind bomb extra of zombies. when zombie use a blind bomb others can hear sounds of this grenade fix it.

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#19

Post by Raheem » 6 years ago

For now and officially no support for other bombs which mean only support now for Napalm and Frost.

Soon maybe i'll add support for blind bomb and force-field bomb in custom version.
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#20

Post by Spir0x » 6 years ago

ok. thanks

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: No registered users and 0 guests