Page 1 of 1

Beacon Effect

Posted: 21 Apr 2017, 19:46
by Raheem
Beacon Effect

Description:
  • This plugin will allow admins to give any player a special effect it's circle around him. Also admin can remove it from the player.

Commands:
  • amx_beacon "Player Name" Add the circle effect to the player.
  • amx_remove_beacon "Player Name" Remove the circle from the player.

Installation & Instructions:
  • Simply install it like any plugin.
  • You can change the admin access from this line: #define ACCESS ADMIN_BAN and you will need to recompile the plugin again.
  • Human circle color is Blue and Zombies circle color is Red. You can change the RGB Color from from these lines:

    1. // For Humans
    2. write_byte(0)           // red  
    3. write_byte(0)           // green
    4. write_byte(250)         // blue
    5.  
    6. // For Zombies
    7. write_byte(250)         // red  
    8. write_byte(0)           // green
    9. write_byte(0)           // blue
Changelog:
  • Spoiler!
    Version: 1.0
    • First Release.
    Version: 1.1
    • Fixed: When player die or round end the circle effect will be removed.
    Version: 1.2 [Current Version]
    • Fixed: When player disconnect from server the circle effect will be removed.
    • Added sound for the effect. It appear every time the circle comes.

Screenshots:
  • ImageImageImageImage

Downloads:

Re: Beacon Effect

Posted: 22 Apr 2017, 06:44
by johnnysins2000
I see so this is Beacon . Nice And Users Can Now Change Color as Well from it like We Change COlors of Hud messages :)

Nice Plugin

Re: Beacon Effect

Posted: 22 Apr 2017, 08:09
by kair
Something like this , Im not sure what but a kinda beeping sound. (speed x2)

https://www.youtube.com/watch?v=GVm8pFDxUjU&t=248s

Also can u make it if u give someone beacon end of round it disappears ?

Nice work bro, love your work.

Re: Beacon Effect

Posted: 22 Apr 2017, 08:48
by johnnysins2000
kair wrote: 7 years ago Something like this , Im not sure what but a kinda beeping sound. (speed x2)

https://www.youtube.com/watch?v=GVm8pFDxUjU&t=248s

Also can u make it if u give someone beacon end of round it disappears ?

Nice work bro, love your work.

I see So u want this beeping sound As well when that Round Circle beacon things Come

Download This Beeping Sound from anywhere and Provide The File in.mp3 or .wav to Raheem

Then he will add this sound As well

Re: Beacon Effect

Posted: 22 Apr 2017, 08:49
by johnnysins2000
And Raheem u know This Beacon effect U could give it to escape leader as Well It will be Nice Idea

Re: Beacon Effect

Posted: 22 Apr 2017, 14:16
by Raheem
kair wrote: 7 years ago Something like this , Im not sure what but a kinda beeping sound. (speed x2)

https://www.youtube.com/watch?v=GVm8pFDxUjU&t=248s

Also can u make it if u give someone beacon end of round it disappears ?

Nice work bro, love your work.
I made new version 1.1 see the changelog. And about sound give me it in .wav format and it should be 1 or 2 seconds only.
johnnysins2000 wrote: 7 years ago And Raheem u know This Beacon effect U could give it to escape leader as Well It will be Nice Idea
Will be added in the next Release for the mod. It will be there is cvar you can enable it only or enable glow only or enable the two at same time.

Re: Beacon Effect

Posted: 23 Apr 2017, 19:23
by kair

Re: Beacon Effect

Posted: 23 Apr 2017, 19:56
by Raheem
Ok added, Now current version: 1.2

Re: Beacon Effect

Posted: 31 Jul 2019, 14:00
by Templaso
Invalid player id 0
[AMXX] Displaying debug trace (plugin "ze_beacon_effect.amxx", version "1.2")
[AMXX] Run time error 10: native error (native "get_user_origin")
[AMXX] [0] ze_beacon_effect.sma::Beacon (line 119)
[AMXX] [1] ze_beacon_effect.sma::Beacon_AddCmd (line 39)

someone fix this and if i say in console "amx_beacon Player" then appear this "Unknown command amx_beacon" same with amx_remove_beacon

Re: Beacon Effect

Posted: 31 Jul 2019, 14:16
by Raheem
Mystic Viper wrote: 4 years ago Invalid player id 0
[AMXX] Displaying debug trace (plugin "ze_beacon_effect.amxx", version "1.2")
[AMXX] Run time error 10: native error (native "get_user_origin")
[AMXX] [0] ze_beacon_effect.sma::Beacon (line 119)
[AMXX] [1] ze_beacon_effect.sma::Beacon_AddCmd (line 39)

someone fix this and if i say in console "amx_beacon Player" then appear this "Unknown command amx_beacon" same with amx_remove_beacon
  1. #include <zombie_escape>
  2.  
  3. #define ACCESS ADMIN_BAN
  4.  
  5. new g_iBeaconSprite
  6. new const g_szSound[] = "zombie_escape/blip1.wav"
  7.  
  8. public plugin_init()
  9. {
  10.     register_plugin("[ZE] Beacon Effect", "1.2", "Raheem")
  11.    
  12.     // Hook Chains
  13.     RegisterHookChain(RG_CBasePlayer_Killed, "Fw_PlayerKilled_Post", 1)
  14.    
  15.     // Commands
  16.     register_concmd("amx_beacon", "Beacon_AddCmd")
  17.     register_concmd("amx_remove_beacon", "Beacon_RemoveCmd")
  18. }
  19.  
  20. public plugin_precache()
  21. {  
  22.     g_iBeaconSprite = precache_model("sprites/shockwave.spr")
  23.     precache_sound(g_szSound)
  24. }
  25.  
  26. public Beacon_AddCmd(id, level, cid)
  27. {
  28.     if (!(get_user_flags(id) & ACCESS))
  29.     {
  30.         ze_colored_print(id, "!tYou have no access to that command!y.")
  31.         return PLUGIN_HANDLED
  32.     }
  33.    
  34.     new szName[32]
  35.     read_argv(1, szName , 31)
  36.    
  37.     new iIndex = get_user_index(szName)
  38.    
  39.     if (!is_user_connected(id))
  40.         return PLUGIN_HANDLED
  41.    
  42.     Beacon(iIndex)
  43.    
  44.     return PLUGIN_HANDLED
  45. }
  46.  
  47. public Beacon_RemoveCmd(id, level, cid)
  48. {
  49.     if (!(get_user_flags(id) & ACCESS))
  50.     {
  51.         ze_colored_print(id, "!tYou have no access to that command!y.")
  52.         return PLUGIN_HANDLED
  53.     }
  54.    
  55.     new szName[32]
  56.     read_argv(1, szName , 31)
  57.    
  58.     new iIndex = get_user_index(szName)
  59.    
  60.     remove_task(iIndex)
  61.    
  62.     return PLUGIN_HANDLED
  63. }
  64.  
  65. public ze_roundend(WinTeam)
  66. {
  67.     for (new i = 0; i <= 32; i++)
  68.     {
  69.         if (!is_user_alive(i) || !task_exists(i, 0))
  70.             continue
  71.        
  72.         remove_task(i)
  73.     }
  74. }
  75.  
  76. public client_disconnect(id)
  77. {
  78.     if (task_exists(id, 0))
  79.     {
  80.         remove_task(id)
  81.     }
  82. }
  83.  
  84. public Fw_PlayerKilled_Post(id)
  85. {
  86.     if (task_exists(id, 0))
  87.     {
  88.         remove_task(id)
  89.     }
  90. }
  91.  
  92. public Beacon(id)
  93. {
  94.     if (!is_user_connected(id))
  95.         return
  96.    
  97.     if(get_member(id, m_iTeam) == TEAM_CT)
  98.     {
  99.         static origin[3]
  100.         get_user_origin(id, origin)
  101.         message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
  102.         write_byte(TE_BEAMCYLINDER) // TE id
  103.         write_coord(origin[0])      // x
  104.         write_coord(origin[1])      // y
  105.         write_coord(origin[2]-20)   // z
  106.         write_coord(origin[0])      // x axis
  107.         write_coord(origin[1])      // y axis
  108.         write_coord(origin[2]+200)  // z axis
  109.         write_short(g_iBeaconSprite)    // sprite
  110.         write_byte(0)           // startframe  
  111.         write_byte(1)           // framerate  
  112.         write_byte(6)           // life
  113.         write_byte(4)           // width
  114.         write_byte(1)               // noise    
  115.         write_byte(0)           // red  
  116.         write_byte(0)               // green
  117.         write_byte(250)         // blue
  118.         write_byte(200)         // brightness
  119.         write_byte(0)           // speed
  120.         message_end()
  121.     }
  122.     else
  123.     {
  124.         static origin[3]
  125.         get_user_origin(id, origin)
  126.         message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
  127.         write_byte(TE_BEAMCYLINDER) // TE id
  128.         write_coord(origin[0])      // x
  129.         write_coord(origin[1])      // y
  130.         write_coord(origin[2]-20)   // z
  131.         write_coord(origin[0])      // x axis
  132.         write_coord(origin[1])      // y axis
  133.         write_coord(origin[2]+200)  // z axis
  134.         write_short(g_iBeaconSprite)    // sprite
  135.         write_byte(0)           // startframe  
  136.         write_byte(1)           // framerate  
  137.         write_byte(6)           // life
  138.         write_byte(4)           // width
  139.         write_byte(1)               // noise    
  140.         write_byte(250)         // red  
  141.         write_byte(0)               // green
  142.         write_byte(0)           // blue
  143.         write_byte(200)         // brightness
  144.         write_byte(0)           // speed
  145.         message_end()
  146.     }
  147.    
  148.     set_task(1.0, "Beacon", id)
  149.     emit_sound(id, CHAN_BODY, g_szSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
  150. }

Re: Beacon Effect

Posted: 31 Jul 2019, 16:16
by Templaso
Invalid player id 0
[AMXX] Displaying debug trace (plugin "ze_beacon_effect.amxx", version "1.2")
[AMXX] Run time error 10: native error (native "get_user_origin")
[AMXX] [0] ze_beacon_effect.sma::Beacon (line 122)
[AMXX] [1] ze_beacon_effect.sma::Beacon_AddCmd (line 42)

not working bro

Re: Beacon Effect

Posted: 31 Jul 2019, 16:37
by Raheem
Updated code, check: viewtopic.php?p=10340#p10340

Re: Beacon Effect

Posted: 31 Jul 2019, 16:55
by Templaso
Fixed