Страница 1 от 2

spawn protection проблем

Публикувано на: 16 Апр 2018, 14:46
от petr0w
Понеже не използвам csdm, добавям отделна спаун протекция. Проблемът е, че квара не променя колко секунди да е самата протекция и тя е много дълга (прекалено дълга .. ). Давам кода който ползвам и се надявам някой да помогне ако не с преработка на този плъгин то поне да ме насочи към друг.

Код за потвърждение: Избери целия код

//----------------------------------------------------------//
/* CREDITS :
      Thanks to Xeroblood, JJkiller, KingPin for helping me make
      this plugin and Firestorm for helping adding a lot of things

   INSTALLING :
      Download .SMA to Scripting folder, run compiler, copy the
      file from Compiled folder and paste in Plugins folder, add the plugin name
      in the Amxx plugins.ini ie : spawnprotection.amxx

   DESCRIPTION :
      Protects players when the spawn from being killed

   CHANGELOG :
      Version 1.0 - First Release
      Version 2.0 - Fixed godmode cvar problems
      Version 3.0 - Added message time control cvar
      Version 4.0 - Fixed errors
      Version 5.0 - Added message control cvar
      Version 6.0 - Fixed errors - THANKS VEN!
      Version 7.0 - Cleaned up plugin and fixed errors - THANKS
                    AVALANCHE, VEN and SubStream!
*/
//----------------------------------------------------------//
#include <amxmodx>
#include <amxmisc>
#include <fun>
//----------------------------------------------------------//
public plugin_init()
{
   register_plugin("Spawn Protection", "7.0", "Peli") // Plugin Information
   register_concmd("amx_sptime", "cmd_sptime", ADMIN_CVAR, "1 through 10 to set Spawn Protection time") // Concmd (Console Command) for the CVAR time
   register_concmd("amx_spmessage", "cmd_spmessage", ADMIN_CVAR, "1 = Turn Spawn Protection Message on , 0 = Turn Spawn Protection message off") // Concmd for the CVAR message
   register_concmd("amx_spshellthickness", "cmd_spshellthickness", ADMIN_CVAR, "1 through 100 to set Glow Shellthickness") // Concmd for the shellthickness
   register_cvar("sv_sp", "1") // Cvar (Command Variable) for the plugin on/off
   register_cvar("sv_sptime", "2") // Cvar for controlling the message time (1-10 seconds)
   register_cvar("sv_spmessage", "0") // Cvar for controlling the message on/off
   register_cvar("sv_spshellthick", "90") // Cvar for controlling the glow shell thickness
   register_event("ResetHUD", "sp_on", "be")
   register_clcmd("fullupdate", "clcmd_fullupdate")
}
//----------------------------------------------------------//
public client_disconnect(id)
{
   remove_task(id)
   return PLUGIN_HANDLED
}
//----------------------------------------------------------//
public cmd_sptime(id, level, cid) // This is the function for the cvar time control
{
   if(!cmd_access(id, level, cid, 2))
   return PLUGIN_HANDLED

   new arg_str[3]
   read_argv(1, arg_str, 3)
   new arg = str_to_num(arg_str)

   if(arg > 10 || arg < 1)
   {
      client_print(id, print_chat, "You have to set the Spawn Protection time between 1 and 10 seconds")
      return PLUGIN_HANDLED
   }

   else if (arg > 0 || arg < 11)
   {
      set_cvar_num("sv_sptime", arg)
      client_print(id, print_chat, "You have set the Spawn Protection time to %d second(s)", arg)
      return PLUGIN_HANDLED
   }
   return PLUGIN_CONTINUE
}
//----------------------------------------------------------//
public cmd_spmessage(id, level, cid) // This is the function for the cvar message control
{
   if (!cmd_access(id, level, cid, 2))
   {
      return PLUGIN_HANDLED
   }

   new sp[3]
   read_argv(1, sp, 2)

   if (sp[0] == '1')
   {
      set_cvar_num("amx_spmessage", 1)
   }

   else if (sp[0] == '0')
   {
      set_cvar_num("amx_spmessage", 0)
   }

   else if (sp[0] != '1' || sp[0] != '0')
   {
      console_print(id, "Usage : amx_spmessage 1 = Messages ON | 0 = Messages OFF")
      return PLUGIN_HANDLED
   }

   return PLUGIN_HANDLED
}
//----------------------------------------------------------//
public cmd_spshellthickness(id, level, cid)
{
   if(!cmd_access(id, level, cid, 2))
   return PLUGIN_HANDLED

   new arg_str[3]
   read_argv(1, arg_str, 3)
   new arg = str_to_num(arg_str)

   if(arg > 100 || arg < 1)
   {
      client_print(id, print_chat, "You have to set the Glow Shellthickness between 1 and 100")
      return PLUGIN_HANDLED
   }

   else if (arg > 0 || arg < 101)
   {
      set_cvar_num("sv_spshellthickness", arg)
      client_print(id, print_chat, "You have set the Glow Shellthickness to %d", arg)
      return PLUGIN_HANDLED
   }
   return PLUGIN_CONTINUE
}
//----------------------------------------------------------//
public sp_on(id) // This is the function for the event godmode
{
   if(get_cvar_num("sv_sp") == 1)
   {
      set_task(0.1, "protect", id)
   }

   return PLUGIN_CONTINUE
}
//----------------------------------------------------------//
public protect(id) // This is the function for the task_on godmode
{
   new Float:SPTime = get_cvar_float("sv_sptime")
   new SPSecs = get_cvar_num("sv_sptime")
   new FTime = get_cvar_num("mp_freezetime")
   new SPShell = get_cvar_num("sv_spshellthick")
   set_user_godmode(id, 1)

   if(get_user_team(id) == 1)
   {
      set_user_rendering(id, kRenderFxGlowShell, 255, 215, 0, kRenderNormal, SPShell)
   }

   if(get_user_team(id) == 2)
   {
      set_user_rendering(id, kRenderFxGlowShell, 148, 0, 211, kRenderNormal, SPShell)
   }

   if(get_cvar_num("sv_spmessage") == 1)
   {
      set_hudmessage(255, 1, 1, -1.0, -1.0, 0, 6.0, SPTime+FTime, 0.1, 0.2, 4)
      show_hudmessage(id, "Spawn Protection is enabled for %d second(s)", SPSecs)
   }

   set_task(SPTime+FTime, "sp_off", id)
   return PLUGIN_HANDLED
}
//----------------------------------------------------------//
public sp_off(id) // This is the function for the task_off godmode
{
   new SPShell = get_cvar_num("sv_spshellthick")
   if(!is_user_connected(id))
   {
      return PLUGIN_HANDLED
   }

   else
   {
      set_user_godmode(id, 0)
      set_user_rendering(id, kRenderFxGlowShell, 0, 0,0, kRenderNormal, SPShell)
      return PLUGIN_HANDLED
   }

   return PLUGIN_HANDLED
}
//----------------------------------------------------------//
public clcmd_fullupdate(id)
{
   return PLUGIN_HANDLED
}
//----------------------------------------------------------//

spawn protection проблем

Публикувано на: 16 Апр 2018, 14:50
от You Owe Me
Ами защо не ползваш на OciXCrom плъгина?

spawn protection проблем

Публикувано на: 16 Апр 2018, 15:56
от petr0w
Не съм видял, че има иначе .. crx rlz ! Благодаря.

spawn protection проблем

Публикувано на: 16 Апр 2018, 19:44
от thoughtz
Ако не се лъжа в последния ъпдейт на regamedll в конфиг файла (game.cfg) последната команда е за това.
mp_respawn_immunitytime "0"

spawn protection проблем

Публикувано на: 13 Авг 2021, 18:43
от EKOLOGA
Как може да се премахне при положение че всичко съм спрял и пак имам протекция макар и за 2 секунди да е след което добавих следните команди
но резолтата е същия кофика в за респлна е

Код за потвърждение: Избери целия код

;================================================================;
; CSDM Configuration File
; Default settings by Vaqtincha
;================================================================;

[settings]
; Sets the spawn waiting time.
respawn_delay = 0.7

; Spawn wait statusbar.
; Note: It works if "respawn_delay" above 1.4 sec.
show_respawn_bar = 0

; To be fair, play a spawn noise at new location.
block_gunpickup_sound = 0

; Set whether free for all mode is enabled by default.
free_for_all = 0

; Sets game modes:
; 0 - normal hit
; 1 - headshots only
; 2 - always hit head
; 3 - auto healer
gameplay_mode = 0

[misc]
; Weapon state remember: m4a1, usp, famas, glock.
weaponstate_remember = 1

; Refill clip ammo on kill.
; 1 - only active weapon
; 2 - all weapons (slot1 & slot2)
refill_clip_weapons = 2

; Customize HUD.
; c - crosshair
; f - flashlight
; m - money
; h - health, armor, radar
; t - timer
hide_hud_flags = "ft"

[protection]
; Number of seconds someone is respawned for.
; 0 = disable
protection_time = 0

; Protection time icon (notify).
; Note: It works if "protection_time" above 1.9 sec.
; Sprite name defined in hud.txt ("" = disabled).
sprite_name = "suithelmet_full"

; Colors of glow shell, leave this in quotes
; The digits are "R G B"
; random value "random"
render_color_tt = "220 0 0"
render_color_ct = "0 0 220"

; Alpha transparency (as A gets higher, the glow shell is thicker)
render_alpha = 15

; Protected player can't take damage
block_damage = 1


[mapcleaner]
; Map objectives are removed by their flags.
; a - "as_" & "es_" objectives (vip assasination & escape)
; b - buyzones
; c - "cs_" objectives (hostage rescue)
; d - "de_" objectives (bomb defuse)
; e - equips (map auto-equip's)
; w - world weapons (map armoury's)
remove_objective_flags = "abcdew"

; Remove dropped weapons.
remove_dropped_weapons = 1
; Sets 1 to exclude bomb from auto-removing.
exclude_bomb = 0


[equip]
; 0 - [autoitems] only
; 1 - equip menu ([secondary] & [primary] + [autoitems])
; 2 - randomly weapons ([secondary] & [primary] + [autoitems])
; 3 - free buy (only buying)
equip_mode = 1

; Free buy time in seconds (weapon buy flood protect!)
; 0 - no time limit
freebuy_time = 20

; Free buy spawn money
; 0 - default max money (used cvar mp_maxmoney)
freebuy_money = 5000

; Allow to open equip menu always when not have weapon
always_open_menu = 0

; Block default spawn items (usp, glock)
block_default_items = 0

; ========== Auto Items ===========
; Format for autoitems is: 
; "item_name" "team" "amount|ammo"
; 0 - default amount
; all - any
; ct - counter-terorists
; tt - terorists

[autoitems]
; item_longjump			"all"	0
; item_thighpack		"ct"	0
; item_kevlar 	 	 	"all"	0
item_assaultsuit 	 	"all"	0
weapon_knife			"all"	0
;weapon_smokegrenade  	"tt"	0
; weapon_flashbang	 	"ct"	0
weapon_hegrenade 	 	"all"	2
; weapon_deagle 		"all"	0

; ========== Equip Menu ========== 
; Format for equip menus is:
; "WeaponName" "Display Name"
; Example: 
; weapon_m4a1 "Colt M4A1 Carbine"

[secondary]
weapon_usp 			"USP"
weapon_glock18 		"Glock"
weapon_deagle 		"Deagle"
weapon_p228 		"P228"
weapon_elite 		"Elite"
weapon_fiveseven 	"Five Seven"

[primary]
weapon_m4a1			"M4A1"
weapon_ak47 		"AK47"
weapon_famas 		"Famas"
weapon_galil 		"Galil"
weapon_awp 			"AWP"
weapon_mp5navy 		"MP5 Navy"
weapon_p90 			"P90"
weapon_aug 			"AUG"
weapon_sg552 		"SG552"
weapon_scout 		"Scout"
; weapon_ump45 		"UMP 45"
; weapon_sg550 		"SG550"
; weapon_m249 		"M249"
; weapon_g3sg1 		"G3SG1"
; weapon_m3 		"M3"
; weapon_xm1014 	"XM1014"
; weapon_tmp 		"TMP"
; weapon_mac10 		"Mac 10"
; weapon_shield		"Tac. Shield"


; List weapons here the bots can randomly have.
[botsecondary]
weapon_usp
weapon_glock18
weapon_deagle
weapon_p228
weapon_elite
weapon_fiveseven

[botprimary]
weapon_m4a1
weapon_ak47
weapon_famas
weapon_galil
weapon_awp
weapon_mp5navy
weapon_p90
weapon_aug
weapon_sg552
; weapon_scout
; weapon_ump45
; weapon_sg550
; weapon_m249
; weapon_g3sg1
; weapon_m3
; weapon_xm1014
; weapon_tmp
; weapon_mac10




mp_respawn_immunity_force_unset 0
mp_respawn_immunity_effects 0
mp_respawn_immunitytime 0
mp_hegrenade_penetration 0

spawn protection проблем

Публикувано на: 13 Авг 2021, 19:12
от Lethality

Код за потвърждение: Избери целия код

; Protected player can't take damage
block_damage = 1
---->

Код за потвърждение: Избери целия код

Protected player can't take damage
block_damage = 0
Щом ти е спрян от ReGameDLL, направи така. Ако не се получи, вероятно имаш друг плъгин, който има нещо общо с respawn protection.

spawn protection проблем

Публикувано на: 13 Авг 2021, 19:14
от EKOLOGA
И пак излиза надписа за спаун протекция плъгин е спрян също и с пуснат плъгин
същата работа

spawn protection проблем

Публикувано на: 13 Авг 2021, 19:28
от impossible
Изключил ли си плъгините от cstrike/addons/amxmodx/configs/plugins-CSDM_ReAPI.ini

Код за потвърждение: Избери целия код

; Vsichki plugini sa spreni po podrazbirane. Ako iskate deathmatch/respawn server mahnete ; pred pluginite dolu.
 ; Main plugin
;csdm_core.amxx          
 ; Additions
;csdm_equip_manager.amxx 
;csdm_map_cleaner.amxx   
;csdm_misc.amxx          
;csdm_protection.amxx    
;csdm_spawn_manager.amxx 

spawn protection проблем

Публикувано на: 13 Авг 2021, 20:04
от EKOLOGA
попринцип не всички са вкючени :) трябва да са изкючени ли щото не виждам логиката при положение че изпозвам и всичките а като ги спра следователно няма да работят...
; Main plugin
csdm_core.amxx debug
; Additions
csdm_equip_manager.amxx
csdm_map_cleaner.amxx
csdm_misc.amxx
csdm_protection.amxx
csdm_spawn_manager.amxx

spawn protection проблем

Публикувано на: 13 Авг 2021, 20:07
от impossible
Какъв е мода classic или Respawn