hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.05.11. 09:45



Jelenlévő felhasználók

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

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-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  [ 2 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Beleírás
HozzászólásElküldve: 2015.07.13. 12:26 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2015.03.11. 20:11
Hozzászólások: 915
Megköszönt másnak: 52 alkalommal
Megköszönték neki: 317 alkalommal
Sziasztok!
Valaki ebbe beletudná írni, hogy sima játékosok egyet ugorhassanak, de VIP-ek pedig kettőt :D

SMA Forráskód: [ Mindet kijelol ]
  1. #include < amxmodx >
  2. #include < amxmisc >
  3. #include < fakemeta >
  4. #include < fun >
  5. #include < geoip >
  6. #include < cstrike >
  7. #include < colorchat >
  8. #include < hamsandwich >
  9.  
  10. #define PLUGIN "Simple Surf Vip"
  11. #define VERSION "1.1"
  12.  
  13. #define CN_SOUND "buttons/bell1.wav" // Csatlakozó hang
  14. #define DC_SOUND "fvox/blip.wav" // Lecsatlakozó hang
  15.  
  16. #define XO_PLAYER 5
  17. #define m_flFlashedUntil 514
  18. #define m_flFlashedAt 515
  19. #define m_flFlashHoldTime 516
  20. #define m_flFlashDuration 517
  21. #define m_iFlashAlpha 518
  22.  
  23. #define ALPHA_FULLBLINDED 255
  24.  
  25. #define VIP_ACCESS ADMIN_LEVEL_E
  26.  
  27. #define is_vip(%1) ( get_user_flags(%1) & VIP_ACCESS )
  28.  
  29. /* Mennyi életet kapjon a VIP, alap beállítás 130 */
  30. #define VIP_HEALTH ( 130 )
  31.  
  32. new g_pCvarHsBonus, g_pCvarKillBonus
  33. new g_pCvarHpPerHeadShot, g_pCvarHpPerKill
  34.  
  35. public plugin_init( )
  36. {
  37. register_plugin( PLUGIN, VERSION, "Baws" )
  38.  
  39. register_cvar( "surfvip_version", VERSION, FCVAR_SERVER | FCVAR_SPONLY );
  40. set_cvar_string( "surfvip_version", VERSION );
  41.  
  42. register_message( get_user_msgid( "SayText" ), "VipTag" );
  43.  
  44. RegisterHam( Ham_Spawn, "player", "Fwd_VipSpawn", true );
  45. RegisterHam( Ham_Killed, "player", "Fwd_PlayerKilled_Post", 1 );
  46.  
  47. register_event( "DeathMsg", "eDeathMsg", "a" );
  48. register_logevent( "eRoundStart", 2, "1=Round_Start" )
  49.  
  50. g_pCvarHpPerHeadShot = register_cvar( "surfvip_hp_per_hs", "30" ) //Mennyi életet kapjon fejlövésért.
  51. g_pCvarHpPerKill = register_cvar( "surfvip_hp_per_kill", "15" ) //Mennyi életet kapjon sima ölésért.
  52. g_pCvarHsBonus = register_cvar( "surfvip_money_per_hs", "500" ) //Mennyi pénzt kapjon fejlövésért.
  53. g_pCvarKillBonus = register_cvar( "surfvip_money_per_kill", "200" ) //Mennyi pénzt kapjon sima ölésért.
  54.  
  55. /* VIP ellenőrzés parancsok */
  56. register_clcmd( "say /vip", "showvips_online" )
  57. register_clcmd( "say_team /vip", "showvips_online" )
  58. register_clcmd( "say /vips", "showvips_online" )
  59. register_clcmd( "say_team /vips", "showvips_online" )
  60.  
  61. }
  62.  
  63. public showvips_online( id )
  64. {
  65. new iPlayers[ 32 ], iNum, iPlayerId, szName[ 32 ]
  66. get_players( iPlayers, iNum, "ch" )
  67.  
  68. new iLen, szMessage[ ( sizeof iPlayers ) * charsmax( szName ) ]
  69.  
  70. iLen = formatex( szMessage, charsmax( szMessage ), "^x04VIPEK ONLINE: " )
  71. for( new i; i < iNum; i++ )
  72. {
  73. iPlayerId = iPlayers[ i ]
  74. if( is_vip( iPlayerId ) )
  75. {
  76. get_user_name( iPlayerId, szName, 31 )
  77. iLen += formatex( szMessage[ iLen ], charsmax( szMessage ) - iLen, " %s%s", szName, iLen ? "," : "" )
  78. }
  79. }
  80. ColorChat( id, GREEN, szMessage )
  81. }
  82.  
  83. public client_putinserver( id )
  84. {
  85. if( !is_user_bot( id ) )
  86. {
  87. new szName[ 32 ], szCountry[ 46 ];
  88. get_user_name( id, szName, 31 );
  89. szCountry = get_user_country( id );
  90.  
  91. if( get_user_flags( id ) & VIP_ACCESS )
  92. {
  93. ColorChat( 0, GREEN, "^x04* ^x01DM VIP^x04 %s (%s)^x01 csatlakozott ^x04*", szName, szCountry );
  94. client_cmd( 0, "spk %s", CN_SOUND )
  95. }
  96. }
  97. }
  98.  
  99. public client_disconnect( id )
  100. {
  101. if( !is_user_bot( id ) )
  102. {
  103. new szName[ 32 ], szCountry[ 46 ];
  104. get_user_name( id, szName, 31 );
  105. szCountry = get_user_country( id );
  106.  
  107. if( get_user_flags( id ) & VIP_ACCESS )
  108. {
  109. ColorChat( 0, GREEN, "^x04* ^x01DM VIP^x04 %s (%s)^x01 lecsatlakozott ^x04*", szName, szCountry );
  110. client_cmd( 0, "spk %s", DC_SOUND )
  111. }
  112. }
  113. }
  114.  
  115. public Fwd_VipSpawn( id )
  116. {
  117. if( is_user_alive( id ) && get_user_flags( id ) & VIP_ACCESS )
  118. {
  119. set_user_health( id, VIP_HEALTH );
  120. }
  121. }
  122.  
  123. public get_user_country( index )
  124. {
  125. static szIP[ 32 ], szCountry[ 46 ];
  126. get_user_ip( index, szIP, 31 );
  127. geoip_country( szIP, szCountry );
  128.  
  129. if( equal( szCountry, "error" ) )
  130. {
  131. if( !contain( szIP, "192.168." ) || !contain( szIP, "10. " ) || !contain( szIP, "172." ) || equal( szIP, "127.0.0.1" ) )
  132. szCountry = "LAN";
  133.  
  134. else if( equal( szIP, "loopback" ) )
  135. szCountry = "ListenServer User";
  136.  
  137. else
  138. szCountry = "Unknown Country";
  139. }
  140. return szCountry;
  141. }
  142.  
  143. public VipTag( msgId, msgDest, msgEnt )
  144. {
  145. new id = get_msg_arg_int( 1 );
  146.  
  147. if( is_user_connected( id ) && get_user_flags( id ) & VIP_ACCESS )
  148. {
  149. new szTmp[ 256 ],
  150. szTmp2[ 256 ];
  151.  
  152. get_msg_arg_string( 2, szTmp, charsmax( szTmp ) );
  153.  
  154. new szPrefix[ 64 ] = "^x01[ ^x04DM VIP ^x01]";
  155.  
  156. if( !equal( szTmp, "#Cstrike_Chat_All" ) )
  157. {
  158. add( szTmp2, charsmax( szTmp2 ), szPrefix );
  159. add( szTmp2, charsmax( szTmp2 ), " " );
  160. add( szTmp2, charsmax( szTmp2 ), szTmp );
  161. }
  162. else
  163. {
  164. add( szTmp2, charsmax( szTmp2 ), szPrefix );
  165. add( szTmp2, charsmax( szTmp2 ), "^x03 %s1^x01 : %s2" );
  166. }
  167. set_msg_arg_string( 2, szTmp2 );
  168. }
  169. return PLUGIN_CONTINUE;
  170. }
  171.  
  172. public eRoundStart( )
  173. {
  174. new players[ 32 ], iCount, iPlayer
  175. get_players( players, iCount, "ch" )
  176.  
  177. for( new i; i < iCount; i++ )
  178. {
  179. iPlayer = players[ i ]
  180. if( is_vip( iPlayer ) && is_user_alive( iPlayer ) )
  181. {
  182. new Weapons[ 32 ], iNum
  183. new iWepBitSum = /**/~/**/get_user_weapons( iPlayer, Weapons, iNum )
  184.  
  185. if( iWepBitSum & ( 1<<CSW_HEGRENADE ) )
  186. give_item( iPlayer, "weapon_hegrenade" )
  187.  
  188. if( iWepBitSum & ( 1<<CSW_FLASHBANG ) )
  189. give_item(iPlayer, "weapon_flashbang" )
  190.  
  191. if( iWepBitSum & ( 1<<CSW_SMOKEGRENADE ) )
  192. give_item( iPlayer, "weapon_smokegrenade" )
  193. }
  194. }
  195. }
  196.  
  197. public eDeathMsg( id )
  198. {
  199. new hp_added[ 64 ];
  200. static iHeadShot, iVictim, iKillerId
  201. iKillerId = read_data( 1 )
  202. iVictim = read_data( 2 )
  203. iHeadShot = read_data( 3 )
  204.  
  205. if ( !is_user_connected( iKillerId ) )
  206. return PLUGIN_CONTINUE;
  207.  
  208. if( iVictim == iKillerId )
  209. {
  210. return PLUGIN_HANDLED;
  211. }
  212. if( is_vip( iKillerId ) )
  213. {
  214. if( iHeadShot )
  215. {
  216. new nHpHs_add = get_pcvar_num( g_pCvarHpPerHeadShot )
  217. if( get_user_health( iKillerId ) > 0 )
  218. set_user_health( iKillerId, get_user_health( iKillerId ) + nHpHs_add )
  219. if( get_user_health( iKillerId ) )
  220. {
  221. format( hp_added, sizeof( hp_added ), "Szép fejlövés! Kaptál +%d HP-t!", nHpHs_add )
  222. set_hudmessage( 0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1 )
  223. show_hudmessage( iKillerId, hp_added, nHpHs_add )
  224. }
  225. if( !get_user_flashed( iKillerId ) )
  226. {
  227. message_begin( MSG_ONE, get_user_msgid( "ScreenFade" ), { 0,0,0 }, iKillerId )
  228. write_short( 1<<10 )
  229. write_short( 1<<10 )
  230. write_short( 0x0000 )
  231. write_byte( 0 )
  232. write_byte( 0 )
  233. write_byte( 200 )
  234. write_byte( 75 )
  235. message_end( )
  236. }
  237. }
  238. else
  239. {
  240. new nHp_add = get_pcvar_num( g_pCvarHpPerKill )
  241. if( get_user_health( iKillerId ) > 0 )
  242. set_user_health( iKillerId, get_user_health( iKillerId ) + nHp_add )
  243. if( get_user_health( iKillerId ) )
  244. {
  245. format( hp_added, sizeof( hp_added ), "Szép ölés! Kaptál +%d HP-t!", nHp_add )
  246. set_hudmessage( 0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1 )
  247. show_hudmessage( iKillerId, hp_added, nHp_add )
  248. }
  249. if( !get_user_flashed( iKillerId ) )
  250. {
  251. message_begin( MSG_ONE, get_user_msgid( "ScreenFade" ), { 0,0,0 }, iKillerId )
  252. write_short( 1<<10 )
  253. write_short( 1<<10 )
  254. write_short( 0x0000 )
  255. write_byte( 0 )
  256. write_byte( 0 )
  257. write_byte( 200 )
  258. write_byte( 75 )
  259. message_end( )
  260. }
  261. }
  262. }
  263. return PLUGIN_HANDLED;
  264. }
  265.  
  266. public Fwd_PlayerKilled_Post( id )
  267. {
  268. new Hitzone, Weapon, Attacker = get_user_attacker( id, Weapon, Hitzone )
  269. new Players[ 32 ], Aid;
  270. get_players( Players, Aid )
  271. if( 0 < Attacker <= Aid && is_user_alive( Attacker ) && Attacker != id && is_vip( Attacker ) )
  272. {
  273. cs_set_user_money( Attacker, cs_get_user_money( Attacker ) + get_pcvar_num( g_pCvarKillBonus ) )
  274. if( Hitzone == 1 )
  275. cs_set_user_money( Attacker, cs_get_user_money( Attacker ) + get_pcvar_num( g_pCvarHsBonus ) )
  276. }
  277. }
  278.  
  279. get_user_flashed( id, &iPercent=0 )
  280. {
  281. new Float:flFlashedAt = get_pdata_float( id, m_flFlashedAt, XO_PLAYER )
  282.  
  283. if( !flFlashedAt )
  284. {
  285. return 0
  286. }
  287.  
  288. new Float:flGameTime = get_gametime( )
  289. new Float:flTimeLeft = flGameTime - flFlashedAt
  290. new Float:flFlashDuration = get_pdata_float( id, m_flFlashDuration, XO_PLAYER )
  291. new Float:flFlashHoldTime = get_pdata_float( id, m_flFlashHoldTime, XO_PLAYER )
  292. new Float:flTotalTime = flFlashHoldTime + flFlashDuration
  293.  
  294. if( flTimeLeft > flTotalTime )
  295. {
  296. return 0
  297. }
  298.  
  299. new iFlashAlpha = get_pdata_int( id, m_iFlashAlpha, XO_PLAYER )
  300.  
  301. if( iFlashAlpha == ALPHA_FULLBLINDED )
  302. {
  303. if( get_pdata_float( id, m_flFlashedUntil, XO_PLAYER) - flGameTime > 0.0 )
  304. {
  305. iPercent = 100
  306. }
  307. else
  308. {
  309. iPercent = 100-floatround( ( ( flGameTime - ( flFlashedAt + flFlashHoldTime ) )*100.0 )/flFlashDuration )
  310. }
  311. }
  312. else
  313. {
  314. iPercent = 100-floatround( ( ( flGameTime - flFlashedAt )*100.0 )/flTotalTime )
  315. }
  316.  
  317. return iFlashAlpha
  318. }

_________________
viewtopic.php?f=101&t=25611#p184899
viewtopic.php?f=114&t=29544&p=209471#p209431


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Beleírás
HozzászólásElküldve: 2015.07.20. 17:10 
Offline
Beavatott

Csatlakozott: 2014.11.12. 18:02
Hozzászólások: 72
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 5 alkalommal
Tessék! Gabi vagyok amúgy (Hell tulaj). Gondoltam beállok a hlmodhoz a problémákat megoldani.
amxx.cfgbe: amx_maxjumps 1 Azért kell 1, mert alapból van egy ugrás a szerón és ez az egy hozzá megy, így lesz kettő. Itt van a plugin, amit kértél.SMA Forráskód: [ Mindet kijelol ]#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < fun >
#include < geoip >
#include < cstrike >
#include < colorchat >
#include < hamsandwich >
#include < engine >
 
#define PLUGIN "Simple Surf Vip"
#define VERSION "1.1"
 
#define CN_SOUND "buttons/bell1.wav" // Csatlakozó hang
#define DC_SOUND "fvox/blip.wav" // Lecsatlakozó hang
 
#define XO_PLAYER 5
#define m_flFlashedUntil 514
#define m_flFlashedAt 515
#define m_flFlashHoldTime 516
#define m_flFlashDuration 517
#define m_iFlashAlpha 518
 
#define ALPHA_FULLBLINDED 255
 
#define VIP_ACCESS ADMIN_LEVEL_E
 
#define is_vip(%1) ( get_user_flags(%1) & VIP_ACCESS )
 
/* Mennyi életet kapjon a VIP, alap beállítás 130 */
#define VIP_HEALTH ( 130 )
 
new g_pCvarHsBonus, g_pCvarKillBonus
new g_pCvarHpPerHeadShot, g_pCvarHpPerKill
new jumpnum[33] = 0
new bool:dojump[33] = false
 
public plugin_init( )
{
register_plugin( PLUGIN, VERSION, "Baws" )
 
register_cvar( "surfvip_version", VERSION, FCVAR_SERVER | FCVAR_SPONLY );
register_cvar("amx_maxjumps","1");
register_cvar("amx_mjadminonly","1");
set_cvar_string( "surfvip_version", VERSION );
 
register_message( get_user_msgid( "SayText" ), "VipTag" );
 
RegisterHam( Ham_Spawn, "player", "Fwd_VipSpawn", true );
RegisterHam( Ham_Killed, "player", "Fwd_PlayerKilled_Post", 1 );
 
register_event( "DeathMsg", "eDeathMsg", "a" );
register_logevent( "eRoundStart", 2, "1=Round_Start" )
 
g_pCvarHpPerHeadShot = register_cvar( "surfvip_hp_per_hs", "30" ) //Mennyi életet kapjon fejlövésért.
g_pCvarHpPerKill = register_cvar( "surfvip_hp_per_kill", "15" ) //Mennyi életet kapjon sima ölésért.
g_pCvarHsBonus = register_cvar( "surfvip_money_per_hs", "500" ) //Mennyi pénzt kapjon fejlövésért.
g_pCvarKillBonus = register_cvar( "surfvip_money_per_kill", "200" ) //Mennyi pénzt kapjon sima ölésért.
 
/* VIP ellenőrzés parancsok */
register_clcmd( "say /vip", "showvips_online" )
register_clcmd( "say_team /vip", "showvips_online" )
register_clcmd( "say /vips", "showvips_online" )
register_clcmd( "say_team /vips", "showvips_online" )
 
}
 
public client_PreThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(get_cvar_num("amx_mjadminonly") && (!access(id,VIP_ACCESS))) return PLUGIN_CONTINUE
new nbut = get_user_button(id)
new obut = get_user_oldbutton(id)
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(jumpnum[id] < get_cvar_num("amx_maxjumps"))
{
dojump[id] = true
jumpnum[id]++
return PLUGIN_CONTINUE
}
}
if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
jumpnum[id] = 0
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
 
public client_PostThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(get_cvar_num("amx_mjadminonly") && (!access(id,VIP_ACCESS))) return PLUGIN_CONTINUE
if(dojump[id] == true)
{
new Float:velocity[3]
entity_get_vector(id,EV_VEC_velocity,velocity)
velocity[2] = random_float(265.0,285.0)
entity_set_vector(id,EV_VEC_velocity,velocity)
dojump[id] = false
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
 
public showvips_online( id )
{
new iPlayers[ 32 ], iNum, iPlayerId, szName[ 32 ]
get_players( iPlayers, iNum, "ch" )
 
new iLen, szMessage[ ( sizeof iPlayers ) * charsmax( szName ) ]
 
iLen = formatex( szMessage, charsmax( szMessage ), "^x04VIPEK ONLINE: " )
for( new i; i < iNum; i++ )
{
iPlayerId = iPlayers[ i ]
if( is_vip( iPlayerId ) )
{
get_user_name( iPlayerId, szName, 31 )
iLen += formatex( szMessage[ iLen ], charsmax( szMessage ) - iLen, " %s%s", szName, iLen ? "," : "" )
}
}
ColorChat( id, GREEN, szMessage )
}
 
public client_putinserver( id )
{
if( !is_user_bot( id ) )
{
new szName[ 32 ], szCountry[ 46 ];
get_user_name( id, szName, 31 );
szCountry = get_user_country( id );
 
if( get_user_flags( id ) & VIP_ACCESS )
{
ColorChat( 0, GREEN, "^x04* ^x01DM VIP^x04 %s (%s)^x01 csatlakozott ^x04*", szName, szCountry );
client_cmd( 0, "spk %s", CN_SOUND )
jumpnum[id] = 0
dojump[id] = false
}
}
}
 
public client_disconnect( id )
{
if( !is_user_bot( id ) )
{
new szName[ 32 ], szCountry[ 46 ];
get_user_name( id, szName, 31 );
szCountry = get_user_country( id );
 
if( get_user_flags( id ) & VIP_ACCESS )
{
ColorChat( 0, GREEN, "^x04* ^x01DM VIP^x04 %s (%s)^x01 lecsatlakozott ^x04*", szName, szCountry );
client_cmd( 0, "spk %s", DC_SOUND )
jumpnum[id] = 0
dojump[id] = false
}
}
}
 
public Fwd_VipSpawn( id )
{
if( is_user_alive( id ) && get_user_flags( id ) & VIP_ACCESS )
{
set_user_health( id, VIP_HEALTH );
}
}
 
public get_user_country( index )
{
static szIP[ 32 ], szCountry[ 46 ];
get_user_ip( index, szIP, 31 );
geoip_country( szIP, szCountry );
 
if( equal( szCountry, "error" ) )
{
if( !contain( szIP, "192.168." ) || !contain( szIP, "10. " ) || !contain( szIP, "172." ) || equal( szIP, "127.0.0.1" ) )
szCountry = "LAN";
 
else if( equal( szIP, "loopback" ) )
szCountry = "ListenServer User";
 
else
szCountry = "Unknown Country";
}
return szCountry;
}
 
public VipTag( msgId, msgDest, msgEnt )
{
new id = get_msg_arg_int( 1 );
 
if( is_user_connected( id ) && get_user_flags( id ) & VIP_ACCESS )
{
new szTmp[ 256 ],
szTmp2[ 256 ];
 
get_msg_arg_string( 2, szTmp, charsmax( szTmp ) );
 
new szPrefix[ 64 ] = "^x01[ ^x04DM VIP ^x01]";
 
if( !equal( szTmp, "#Cstrike_Chat_All" ) )
{
add( szTmp2, charsmax( szTmp2 ), szPrefix );
add( szTmp2, charsmax( szTmp2 ), " " );
add( szTmp2, charsmax( szTmp2 ), szTmp );
}
else
{
add( szTmp2, charsmax( szTmp2 ), szPrefix );
add( szTmp2, charsmax( szTmp2 ), "^x03 %s1^x01 : %s2" );
}
set_msg_arg_string( 2, szTmp2 );
}
return PLUGIN_CONTINUE;
}
 
public eRoundStart( )
{
new players[ 32 ], iCount, iPlayer
get_players( players, iCount, "ch" )
 
for( new i; i < iCount; i++ )
{
iPlayer = players[ i ]
if( is_vip( iPlayer ) && is_user_alive( iPlayer ) )
{
new Weapons[ 32 ], iNum
new iWepBitSum = /**/~/**/get_user_weapons( iPlayer, Weapons, iNum )
 
if( iWepBitSum & ( 1<<CSW_HEGRENADE ) )
give_item( iPlayer, "weapon_hegrenade" )
 
if( iWepBitSum & ( 1<<CSW_FLASHBANG ) )
give_item(iPlayer, "weapon_flashbang" )
 
if( iWepBitSum & ( 1<<CSW_SMOKEGRENADE ) )
give_item( iPlayer, "weapon_smokegrenade" )
}
}
}
 
public eDeathMsg( id )
{
new hp_added[ 64 ];
static iHeadShot, iVictim, iKillerId
iKillerId = read_data( 1 )
iVictim = read_data( 2 )
iHeadShot = read_data( 3 )
 
if ( !is_user_connected( iKillerId ) )
return PLUGIN_CONTINUE;
 
if( iVictim == iKillerId )
{
return PLUGIN_HANDLED;
}
if( is_vip( iKillerId ) )
{
if( iHeadShot )
{
new nHpHs_add = get_pcvar_num( g_pCvarHpPerHeadShot )
if( get_user_health( iKillerId ) > 0 )
set_user_health( iKillerId, get_user_health( iKillerId ) + nHpHs_add )
if( get_user_health( iKillerId ) )
{
format( hp_added, sizeof( hp_added ), "Szép fejlövés! Kaptál +%d HP-t!", nHpHs_add )
set_hudmessage( 0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1 )
show_hudmessage( iKillerId, hp_added, nHpHs_add )
}
if( !get_user_flashed( iKillerId ) )
{
message_begin( MSG_ONE, get_user_msgid( "ScreenFade" ), { 0,0,0 }, iKillerId )
write_short( 1<<10 )
write_short( 1<<10 )
write_short( 0x0000 )
write_byte( 0 )
write_byte( 0 )
write_byte( 200 )
write_byte( 75 )
message_end( )
}
}
else
{
new nHp_add = get_pcvar_num( g_pCvarHpPerKill )
if( get_user_health( iKillerId ) > 0 )
set_user_health( iKillerId, get_user_health( iKillerId ) + nHp_add )
if( get_user_health( iKillerId ) )
{
format( hp_added, sizeof( hp_added ), "Szép ölés! Kaptál +%d HP-t!", nHp_add )
set_hudmessage( 0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1 )
show_hudmessage( iKillerId, hp_added, nHp_add )
}
if( !get_user_flashed( iKillerId ) )
{
message_begin( MSG_ONE, get_user_msgid( "ScreenFade" ), { 0,0,0 }, iKillerId )
write_short( 1<<10 )
write_short( 1<<10 )
write_short( 0x0000 )
write_byte( 0 )
write_byte( 0 )
write_byte( 200 )
write_byte( 75 )
message_end( )
}
}
}
return PLUGIN_HANDLED;
}
 
public Fwd_PlayerKilled_Post( id )
{
new Hitzone, Weapon, Attacker = get_user_attacker( id, Weapon, Hitzone )
new Players[ 32 ], Aid;
get_players( Players, Aid )
if( 0 < Attacker <= Aid && is_user_alive( Attacker ) && Attacker != id && is_vip( Attacker ) )
{
cs_set_user_money( Attacker, cs_get_user_money( Attacker ) + get_pcvar_num( g_pCvarKillBonus ) )
if( Hitzone == 1 )
cs_set_user_money( Attacker, cs_get_user_money( Attacker ) + get_pcvar_num( g_pCvarHsBonus ) )
}
}
 
get_user_flashed( id, &iPercent=0 )
{
new Float:flFlashedAt = get_pdata_float( id, m_flFlashedAt, XO_PLAYER )
 
if( !flFlashedAt )
{
return 0
}
 
new Float:flGameTime = get_gametime( )
new Float:flTimeLeft = flGameTime - flFlashedAt
new Float:flFlashDuration = get_pdata_float( id, m_flFlashDuration, XO_PLAYER )
new Float:flFlashHoldTime = get_pdata_float( id, m_flFlashHoldTime, XO_PLAYER )
new Float:flTotalTime = flFlashHoldTime + flFlashDuration
 
if( flTimeLeft > flTotalTime )
{
return 0
}
 
new iFlashAlpha = get_pdata_int( id, m_iFlashAlpha, XO_PLAYER )
 
if( iFlashAlpha == ALPHA_FULLBLINDED )
{
if( get_pdata_float( id, m_flFlashedUntil, XO_PLAYER) - flGameTime > 0.0 )
{
iPercent = 100
}
else
{
iPercent = 100-floatround( ( ( flGameTime - ( flFlashedAt + flFlashHoldTime ) )*100.0 )/flFlashDuration )
}
}
else
{
iPercent = 100-floatround( ( ( flGameTime - flFlashedAt )*100.0 )/flTotalTime )
}
 
return iFlashAlpha
}


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  [ 2 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 24 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