hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2025.06.18. 13:10



Jelenlévő felhasználók

Jelenleg 350 felhasználó van jelen :: 1 regisztrált, 0 rejtett és 349 vendég

A legtöbb felhasználó (2761 fő) 2025.01.09. 20:06-kor tartózkodott itt.

Regisztrált felhasználók: Bing [Bot]az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása Hozzászólás a témához  [5 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Kezdővédelem
HozzászólásElküldve:2012.02.11. 13:25 
Offline
Őstag

Csatlakozott:2011.06.12. 20:51
Hozzászólások:1089
Megköszönt másnak: 3 alkalommal
Megköszönték neki: 44 alkalommal
Üdv valaki át tudná úgy írni ezt a plugint hogy a kezdővédelem a újraéledés után 1-2mp-vel aktiválódjon? (dm knifera kéne hogy 35hp-val kezdjenek)

Kód:
//----------------------------------------------------------//
/* 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""5"// Cvar for controlling the message time (1-10 seconds)
   
register_cvar("sv_spmessage""1"// Cvar for controlling the message on/off
   
register_cvar("sv_spshellthick""25"// 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(idlevelcid// This is the function for the cvar time control
{
   if(!
cmd_access(idlevelcid2))
   return 
PLUGIN_HANDLED

   
new arg_str[3]
   
read_argv(1arg_str3)
   new 
arg str_to_num(arg_str)

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

   else if (
arg || arg 11)
   {
      
set_cvar_num("sv_sptime"arg)
      
client_print(idprint_chat"You have set the Spawn Protection time to %d second(s)"arg)
      return 
PLUGIN_HANDLED
   
}
   return 
PLUGIN_CONTINUE
}
//----------------------------------------------------------//
public cmd_spmessage(idlevelcid// This is the function for the cvar message control
{
   if (!
cmd_access(idlevelcid2))
   {
      return 
PLUGIN_HANDLED
   
}

   new 
sp[3]
   
read_argv(1sp2)

   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(idlevelcid)
{
   if(!
cmd_access(idlevelcid2))
   return 
PLUGIN_HANDLED

   
new arg_str[3]
   
read_argv(1arg_str3)
   new 
arg str_to_num(arg_str)

   if(
arg 100 || arg 1)
   {
      
client_print(idprint_chat"You have to set the Glow Shellthickness between 1 and 100")
      return 
PLUGIN_HANDLED
   
}

   else if (
arg || arg 101)
   {
      
set_cvar_num("sv_spshellthickness"arg)
      
client_print(idprint_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(id1)

   if(
get_user_team(id) == 1)
   {
      
set_user_rendering(idkRenderFxGlowShell25500kRenderNormalSPShell)
   }

   if(
get_user_team(id) == 2)
   {
      
set_user_rendering(idkRenderFxGlowShell00255kRenderNormalSPShell)
   }

   if(
get_cvar_num("sv_spmessage") == 1)
   {
      
set_hudmessage(2550255, -1.0, -1.026.0SPTime+FTime0.10.24)
      
show_hudmessage(id"Kezdovedelem %dmp ig aktiv! "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(id0)
      
set_user_rendering(idkRenderFxGlowShell00,0kRenderNormalSPShell)
      return 
PLUGIN_HANDLED
   
}

   return 
PLUGIN_HANDLED
}
//----------------------------------------------------------//
public clcmd_fullupdate(id)
{
   return 
PLUGIN_HANDLED
}
//----------------------------------------------------------//
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
*/
 

_________________
[img]semmi[/img]


A hozzászólást 1 alkalommal szerkesztették, utoljára fuck604 2012.03.23. 19:12-kor.

Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Kezdővédelem
HozzászólásElküldve:2012.02.11. 23:44 
Offline
Őstag
Avatar

Csatlakozott:2011.08.27. 23:19
Hozzászólások:1023
Megköszönt másnak: 3 alkalommal
Megköszönték neki: 11 alkalommal
Minek 35_hp ra kezdő védelem?? xD

_________________
[kozep]t/s[/kozep]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Kezdővédelem
HozzászólásElküldve:2012.02.11. 23:53 
Offline
Őstag

Csatlakozott:2011.06.12. 20:51
Hozzászólások:1089
Megköszönt másnak: 3 alkalommal
Megköszönték neki: 44 alkalommal
Death match ha valaki újraéled ne haljon meg rögtön

_________________
[img]semmi[/img]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Kezdővédelem
HozzászólásElküldve:2012.02.12. 09:03 
Offline
Tiszteletbeli

Csatlakozott:2010.02.04. 19:12
Hozzászólások:3528
Megköszönt másnak: 26 alkalommal
Megköszönték neki: 180 alkalommal
Kód:
//----------------------------------------------------------//
/* 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""5"// Cvar for controlling the message time (1-10 seconds)
   
register_cvar("sv_spmessage""1"// Cvar for controlling the message on/off
   
register_cvar("sv_spshellthick""25"// 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(idlevelcid// This is the function for the cvar time control
{
   if(!
cmd_access(idlevelcid2))
   return 
PLUGIN_HANDLED

   
new arg_str[3]
   
read_argv(1arg_str3)
   new 
arg str_to_num(arg_str)

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

   else if (
arg || arg 11)
   {
      
set_cvar_num("sv_sptime"arg)
      
client_print(idprint_chat"You have set the Spawn Protection time to %d second(s)"arg)
      return 
PLUGIN_HANDLED
   
}
   return 
PLUGIN_CONTINUE
}
//----------------------------------------------------------//
public cmd_spmessage(idlevelcid// This is the function for the cvar message control
{
   if (!
cmd_access(idlevelcid2))
   {
      return 
PLUGIN_HANDLED
   
}

   new 
sp[3]
   
read_argv(1sp2)

   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(idlevelcid)
{
   if(!
cmd_access(idlevelcid2))
   return 
PLUGIN_HANDLED

   
new arg_str[3]
   
read_argv(1arg_str3)
   new 
arg str_to_num(arg_str)

   if(
arg 100 || arg 1)
   {
      
client_print(idprint_chat"You have to set the Glow Shellthickness between 1 and 100")
      return 
PLUGIN_HANDLED
   
}

   else if (
arg || arg 101)
   {
      
set_cvar_num("sv_spshellthickness"arg)
      
client_print(idprint_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(2.0"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(id1)

   if(
get_user_team(id) == 1)
   {
      
set_user_rendering(idkRenderFxGlowShell25500kRenderNormalSPShell)
   }

   if(
get_user_team(id) == 2)
   {
      
set_user_rendering(idkRenderFxGlowShell00255kRenderNormalSPShell)
   }

   if(
get_cvar_num("sv_spmessage") == 1)
   {
      
set_hudmessage(2550255, -1.0, -1.026.0SPTime+FTime0.10.24)
      
show_hudmessage(id"Kezdovedelem %dmp ig aktiv! "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(id0)
      
set_user_rendering(idkRenderFxGlowShell00,0kRenderNormalSPShell)
      return 
PLUGIN_HANDLED
   
}

   return 
PLUGIN_HANDLED
}
//----------------------------------------------------------//
public clcmd_fullupdate(id)
{
   return 
PLUGIN_HANDLED
}
//----------------------------------------------------------//
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
*/ 

_________________
http://www.ebateam.eu/


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Kezdővédelem
HozzászólásElküldve:2012.02.13. 12:28 
Offline
Őstag

Csatlakozott:2011.06.12. 20:51
Hozzászólások:1089
Megköszönt másnak: 3 alkalommal
Megköszönték neki: 44 alkalommal
Működik. Köszi.

_________________
[img]semmi[/img]


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése: Rendezés 
Új téma nyitása Hozzászólás a témához  [5 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 22 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole