hlmod.hu

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



Jelenlévő felhasználók

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

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: Google [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: Furien Lathatatlanság
HozzászólásElküldve: 2012.12.03. 19:09 
Offline
Nagyúr
Avatar

Csatlakozott: 2010.11.21. 18:04
Hozzászólások: 557
Megköszönt másnak: 28 alkalommal
Megköszönték neki: 74 alkalommal
Hello..
Az a baj h nem láthatatlan a Furien.. :/
SMA Forráskód: [ Mindet kijelol ]
  1. /* Formatright © 2009, ConnorMcLeod
  2.  
  3. Furiens is free software;
  4. you can redistribute it and/or modify it under the terms of the
  5. GNU General Public License as published by the Free Software Foundation.
  6.  
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11.  
  12. You should have received a copy of the GNU General Public License
  13. along with Furiens; if not, write to the
  14. Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  15. Boston, MA 02111-1307, USA.
  16. */
  17.  
  18. #include <amxmodx>
  19. #include <cstrike>
  20. #include <engine>
  21. #include <fun>
  22. #include <fakemeta>
  23. #include <hamsandwich>
  24.  
  25. #include "furien.inc"
  26.  
  27. #define MAX_PLAYERS 32
  28.  
  29. #define Ham_Player_ResetMaxSpeed Ham_Item_PreFrame
  30.  
  31. new g_iMaxPlayers
  32. #define FIRST_PLAYER_ID 0
  33. #define IsPlayer(%1) ( FIRST_PLAYER_ID <= %1 <= g_iMaxPlayers )
  34.  
  35. new CsTeams:g_iFuriensTeam = CS_TEAM_T
  36.  
  37. // players offsets
  38. #define XTRA_OFS_PLAYER 5
  39. #define m_iAccount 115
  40. #define cs_set_money_value(%1,%2) set_pdata_int(%1, m_iAccount, %2, XTRA_OFS_PLAYER)
  41.  
  42. // "weaponbox" offsets
  43. #define XO_WEAPONBOX 4
  44. #define m_rgpPlayerItems_wpnbx_Slot5 39
  45. #define IsWeaponBoxC4(%1) ( get_pdata_cbase(%1, m_rgpPlayerItems_wpnbx_Slot5, XO_WEAPONBOX) > 0 )
  46.  
  47. new g_bShouldAnswerMenu, g_bCanModifyCvars
  48. #define MarkUserSeeMenu(%1) g_bShouldAnswerMenu |= 1<<(%1&31)
  49. #define ClearUserSeeMenu(%1) g_bShouldAnswerMenu &= ~(1<<(%1&31))
  50. #define ShouldUserSeeMenu(%1) g_bShouldAnswerMenu & 1<<(%1&31)
  51.  
  52. #define MarkUserCvars(%1) g_bCanModifyCvars |= 1<<(%1&31)
  53. #define ClearUserCvars(%1) g_bCanModifyCvars &= ~(1<<(%1&31))
  54. #define CanUserCvars(%1) g_bCanModifyCvars & 1<<(%1&31)
  55.  
  56. const CVARS_MENU_KEYS = (1<<0)|(1<<1)
  57.  
  58. new g_iFurienTeamChangeForward
  59.  
  60. new g_iFurienRoundRestartForward, bool:g_bRestarting
  61.  
  62. new Float:g_flFurienGravity = 0.375
  63. new g_iInvisFactor = 1
  64. new Float:g_flMaxSpeed = 500.0
  65. new g_iFurienReward = 1337
  66. new g_iAntiReward = 400
  67. new g_iAnnounce = 1
  68.  
  69. new bool:g_bSwitchTeam = true
  70. new bool:g_bSwitchInProgress
  71.  
  72. new Trie:g_tPreventEntityKeyvalue
  73. new g_iPickUp = 2
  74.  
  75. new g_szSpeedCommand[128]
  76.  
  77. new g_szFurienWinSound[64]
  78. new g_szAntiWinSound[64]
  79.  
  80. new g_szGameDescription[32]
  81.  
  82. new g_bitBombPlant
  83.  
  84. new g_iNewMoney
  85. new g_iMsgHookMoney
  86.  
  87. new g_iTextMsg, g_iMoney
  88.  
  89. new HamHook:g_iHhTakeDamage
  90.  
  91. public plugin_natives()
  92. {
  93. register_library("furien")
  94. register_native("furien_get_user_team", "fr_get_user_team")
  95. }
  96.  
  97. public plugin_precache()
  98. {
  99. if( !ReadCfgFile() )
  100. {
  101. log_amx("Configuration file doesn't exist !!")
  102. }
  103. }
  104.  
  105. public plugin_init()
  106. {
  107. register_plugin("Furiens", FURIEN_VERSION, "ConnorMcLeod")
  108.  
  109. register_dictionary("common.txt")
  110. register_dictionary("furiens.txt")
  111.  
  112. new pCvar = register_cvar("furien_version", FURIEN_VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
  113. set_pcvar_string(pCvar, FURIEN_VERSION)
  114.  
  115. register_clcmd("say ?", "A_Propos")
  116. register_clcmd("say_team ?", "A_Propos")
  117. register_clcmd("?", "A_Propos")
  118.  
  119. register_menucmd(register_menuid("Furiens Cvars"), CVARS_MENU_KEYS, "CvarsMenuCallBack")
  120.  
  121. RegisterHam(Ham_Spawn, "player", "Player_Spawn_Post", 1)
  122. RegisterHam(Ham_Player_ResetMaxSpeed, "player", "Player_ResetMaxSpeed", 1)
  123.  
  124. register_message(get_user_msgid("SendAudio"), "Message_SendAudio")
  125.  
  126. new iEnt
  127. iEnt = create_entity("info_target")
  128. set_pev(iEnt, pev_classname, "check_speed")
  129. set_pev(iEnt, pev_nextthink, get_gametime() + 0.1)
  130. register_think("check_speed", "Set_Furiens_Visibility")
  131.  
  132. iEnt = create_entity("info_target")
  133. set_pev(iEnt, pev_classname, "check_cvars")
  134. set_pev(iEnt, pev_nextthink, get_gametime() + 10.0)
  135. register_think("check_cvars", "Check_Players_Cvars")
  136.  
  137. g_iFurienTeamChangeForward = CreateMultiForward("furien_team_change", ET_IGNORE, FP_CELL)
  138.  
  139. register_event("TextMsg", "Event_TextMsg_Restart", "a", "2&#Game_C", "2&#Game_w")
  140. register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
  141. g_iFurienRoundRestartForward = CreateMultiForward("furien_round_restart", ET_IGNORE)
  142.  
  143. register_event("DeathMsg", "Event_DeathMsg", "a")
  144.  
  145. if( get_cvar_float("sv_maxspeed") < g_flMaxSpeed )
  146. {
  147. set_cvar_float("sv_maxspeed", g_flMaxSpeed)
  148. }
  149.  
  150. formatex(g_szSpeedCommand, charsmax(g_szSpeedCommand),
  151. ";cl_forwardspeed %.1f;cl_sidespeed %.1f;cl_backspeed %.1f",
  152. g_flMaxSpeed, g_flMaxSpeed, g_flMaxSpeed)
  153.  
  154. g_iMaxPlayers = get_maxplayers()
  155. g_iTextMsg = get_user_msgid("TextMsg")
  156. g_iMoney = get_user_msgid("Money")
  157. }
  158.  
  159. ReadCfgFile()
  160. {
  161. new szConfigFile[128]
  162. get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile))
  163. format(szConfigFile, charsmax(szConfigFile), "%s/furien/furien.ini", szConfigFile);
  164.  
  165. new fp = fopen(szConfigFile, "rt")
  166. if( !fp )
  167. {
  168. return 0
  169. }
  170.  
  171. new szDatas[96], szKey[16], szValue[64]
  172. while( !feof(fp) )
  173. {
  174. fgets(fp, szDatas, charsmax(szDatas))
  175. trim(szDatas)
  176. if(!szDatas[0] || szDatas[0] == ';' || szDatas[0] == '#' || (szDatas[0] == '/' && szDatas[1] == '/'))
  177. {
  178. continue
  179. }
  180.  
  181. parse(szDatas, szKey, charsmax(szKey), szValue, charsmax(szValue))
  182.  
  183. switch( szKey[0] )
  184. {
  185. case 'B':
  186. {
  187. switch( szKey[1] )
  188. {
  189. case 'U':
  190. {
  191. if( equal(szKey, "BUY") )
  192. {
  193. switch( clamp(str_to_num(szValue), 0, 1) )
  194. {
  195. case 0:
  196. {
  197. new iEnt
  198.  
  199. g_tPreventEntityKeyvalue = TrieCreate()
  200. TrieSetCell(g_tPreventEntityKeyvalue, "player_weaponstrip", 1)
  201. TrieSetCell(g_tPreventEntityKeyvalue, "game_player_equip", 1)
  202. TrieSetCell(g_tPreventEntityKeyvalue, "info_map_parameters", 1)
  203.  
  204. iEnt = create_entity("info_map_parameters")
  205. DispatchKeyValue(iEnt, "buying", "3")
  206. DispatchSpawn(iEnt)
  207.  
  208. register_buy_cmd()
  209. }
  210. }
  211. }
  212. }
  213. case 'O':
  214. {
  215. if( equal(szKey, "BOMB_PLANT") )
  216. {
  217. g_bitBombPlant = clamp(str_to_num(szValue), 0, 3)
  218. if( g_bitBombPlant != 3 )
  219. {
  220. RegisterHam(Ham_AddPlayerItem, "player", "Player_AddPlayerItem")
  221. }
  222. }
  223. }
  224. }
  225. }
  226. case 'F':
  227. {
  228. if( equal(szKey, "FURIEN_ANNOUNCE") )
  229. {
  230. g_iAnnounce = str_to_num(szValue)
  231. }
  232. }
  233. case 'G':
  234. {
  235. switch( szKey[1] )
  236. {
  237. case 'A':
  238. {
  239. if( equal(szKey, "GAMENAME") )
  240. {
  241. replace(szValue, charsmax(szValue), "%v", FURIEN_VERSION)
  242. copy(g_szGameDescription, charsmax(g_szGameDescription), szValue)
  243. register_forward(FM_GetGameDescription, "GetGameDescription")
  244. }
  245. }
  246. case 'R':
  247. {
  248. if( equal(szKey, "GRAVITY") )
  249. {
  250. g_flFurienGravity = floatclamp(str_to_float(szValue), 0.0125, 1.0)
  251. }
  252. }
  253. }
  254. }
  255. case 'I':
  256. {
  257. if( equal(szKey, "INVIS_FACTOR") )
  258. {
  259. g_iInvisFactor = clamp(str_to_num(szValue), 1, 4)
  260. }
  261. }
  262. case 'K':
  263. {
  264. switch( szKey[5] )
  265. {
  266. case 'A':
  267. {
  268. if( equal(szKey, "KILL_ANTI_REWARD") )
  269. {
  270. g_iAntiReward = str_to_num(szValue)
  271. }
  272. }
  273. case 'F':
  274. {
  275. if( equal(szKey, "KILL_FURIEN_REWARD") )
  276. {
  277. g_iFurienReward = str_to_num(szValue)
  278. }
  279. }
  280. }
  281. }
  282. case 'M':
  283. {
  284. if( equal(szKey, "MAXSPEED") )
  285. {
  286. g_flMaxSpeed = floatclamp(str_to_float(szValue), 100.0, 2000.0)
  287. }
  288. }
  289. case 'P':
  290. {
  291. if( equal(szKey, "PICK_UP") )
  292. {
  293. g_iPickUp = clamp(str_to_num(szValue), 0, 3)
  294. switch( g_iPickUp )
  295. {
  296. case 0,1,2:
  297. {
  298. RegisterHam(Ham_Touch, "weaponbox", "CWeaponBox_Touch")
  299. RegisterHam(Ham_Touch, "armoury_entity", "GroundWeapon_Touch")
  300. RegisterHam(Ham_Touch, "weapon_shield", "GroundWeapon_Touch")
  301. }
  302. }
  303. }
  304. }
  305. case 'S':
  306. {
  307. if( equal(szKey, "SWITCH_TEAMS") )
  308. {
  309. g_bSwitchTeam = !!clamp(str_to_num(szValue), 0, 1)
  310. if( g_bSwitchTeam )
  311. {
  312. g_iHhTakeDamage = RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage")
  313. DisableHamForward( g_iHhTakeDamage )
  314. }
  315. }
  316. }
  317. case 'W':
  318. {
  319. if( equal(szKey, "WIN_SOUND_", 10) )
  320. {
  321. new szFullPath[128]
  322. switch(szKey[10])
  323. {
  324. case 'F':
  325. {
  326. formatex(szFullPath, charsmax(szFullPath), "sound/%s", szValue)
  327. if( file_exists(szFullPath) )
  328. {
  329. copy(g_szFurienWinSound, charsmax(g_szFurienWinSound), szValue)
  330. precache_sound(szValue)
  331. }
  332. }
  333. case 'A':
  334. {
  335. formatex(szFullPath, charsmax(szFullPath), "sound/%s", szValue)
  336. if( file_exists(szFullPath) )
  337. {
  338. copy(g_szAntiWinSound, charsmax(g_szAntiWinSound), szValue)
  339. precache_sound(szValue)
  340. }
  341. }
  342. }
  343. }
  344. }
  345. }
  346. }
  347. fclose( fp )
  348.  
  349. return 1
  350. }
  351.  
  352. public GetGameDescription()
  353. {
  354. forward_return(FMV_STRING, g_szGameDescription)
  355. return FMRES_SUPERCEDE
  356. }
  357.  
  358. public Event_TextMsg_Restart()
  359. {
  360. g_bRestarting = true
  361. }
  362.  
  363. public Event_HLTV_New_Round()
  364. {
  365. if( g_bRestarting )
  366. {
  367. g_bRestarting = false
  368. new iRet
  369. ExecuteForward(g_iFurienRoundRestartForward, iRet)
  370. }
  371.  
  372. if( g_bSwitchInProgress )
  373. {
  374. g_bSwitchInProgress = false
  375. DisableHamForward( g_iHhTakeDamage )
  376. }
  377. }
  378.  
  379. public GroundWeapon_Touch(iWeapon, id)
  380. {
  381. if( IsPlayer(id) )
  382. {
  383. if( !g_iPickUp )
  384. {
  385. remove_entity(iWeapon)
  386. return HAM_SUPERCEDE
  387. }
  388.  
  389. if( !is_user_alive(id) )
  390. {
  391. return HAM_SUPERCEDE
  392. }
  393.  
  394. new iTeam = __get_user_team(id)
  395. if( ( iTeam == -1 )
  396. || (iTeam == Furien && g_iPickUp != 1)
  397. || (iTeam == AntiFurien && g_iPickUp != 2) )
  398. {
  399. return HAM_SUPERCEDE
  400. }
  401. }
  402. return HAM_IGNORED
  403. }
  404.  
  405. public CWeaponBox_Touch(iWeaponBox, id)
  406. {
  407. if( IsPlayer(id) )
  408. {
  409. if( !is_user_alive(id) )
  410. {
  411. return HAM_SUPERCEDE
  412. }
  413.  
  414. if( IsWeaponBoxC4(iWeaponBox) )
  415. {
  416. return HAM_IGNORED
  417. }
  418.  
  419. if( !g_iPickUp )
  420. {
  421. remove_entity(iWeaponBox)
  422. return HAM_SUPERCEDE
  423. }
  424.  
  425. new iTeam = __get_user_team(id)
  426. if( ( iTeam == -1 )
  427. || (iTeam == Furien && g_iPickUp != 1)
  428. || (iTeam == AntiFurien && g_iPickUp != 2) )
  429. {
  430. return HAM_SUPERCEDE
  431. }
  432. }
  433. return HAM_IGNORED
  434. }
  435.  
  436. register_buy_cmd()
  437. {
  438. register_clcmd("buy", "ClientCommand_Buy")
  439. register_clcmd("bUy", "ClientCommand_Buy")
  440. register_clcmd("buY", "ClientCommand_Buy")
  441. register_clcmd("bUY", "ClientCommand_Buy")
  442. register_clcmd("Buy", "ClientCommand_Buy")
  443. register_clcmd("BUy", "ClientCommand_Buy")
  444. register_clcmd("BuY", "ClientCommand_Buy")
  445. register_clcmd("BUY", "ClientCommand_Buy")
  446. }
  447.  
  448. public ClientCommand_Buy(id)
  449. {
  450. return PLUGIN_HANDLED_MAIN
  451. }
  452.  
  453. public pfn_keyvalue( iEnt )
  454. {
  455. if( g_tPreventEntityKeyvalue )
  456. {
  457. new szClassName[32], szCrap[2]
  458. copy_keyvalue(szClassName, charsmax(szClassName), szCrap, charsmax(szCrap), szCrap, charsmax(szCrap))
  459. if( TrieKeyExists(g_tPreventEntityKeyvalue, szClassName) )
  460. {
  461. remove_entity(iEnt)
  462. return PLUGIN_HANDLED
  463. }
  464. }
  465. return PLUGIN_CONTINUE
  466. }
  467.  
  468. public plugin_cfg()
  469. {
  470. if( g_tPreventEntityKeyvalue )
  471. {
  472. TrieDestroy(g_tPreventEntityKeyvalue)
  473. set_cvar_float("sv_restart", 1.0)
  474. }
  475. }
  476.  
  477. public fr_get_user_team(/*iPlugin, iParams*/)
  478. {
  479. return __get_user_team( get_param(1) )
  480. }
  481.  
  482. __get_user_team(id)
  483. {
  484. new CsTeams:iTeam = cs_get_user_team(id)
  485. if( CS_TEAM_T <= iTeam <= CS_TEAM_CT )
  486. {
  487. if( iTeam == g_iFuriensTeam )
  488. {
  489. return Furien
  490. }
  491. return AntiFurien
  492. }
  493. return -1
  494. }
  495.  
  496. public client_connect(id)
  497. {
  498. query_client_cvar(id, "gl_clear", "Client_Cvar_Result")
  499. }
  500.  
  501.  
  502.  
  503. public client_putinserver( id )
  504. {
  505. MarkUserSeeMenu( id )
  506. ClearUserCvars( id )
  507.  
  508. if( g_iAnnounce )
  509. {
  510. set_task(random_float(11.0, 19.0), "A_Propos", id)
  511. }
  512. }
  513.  
  514. public Player_Spawn_Post( id )
  515. {
  516. if( is_user_alive(id) )
  517. {
  518. if( ShouldUserSeeMenu(id) )
  519. {
  520. ShowSpeedCvarsMenu(id)
  521. }
  522.  
  523. strip_user_weapons(id)
  524.  
  525. if( __get_user_team(id) == Furien )
  526. {
  527. give_item(id, "weapon_knife")
  528. give_item(id, "weapon_hegrenade")
  529. give_item(id, "weapon_flashbang")
  530. give_item(id, "weapon_smokegrenade")
  531. set_user_gravity(id, g_flFurienGravity)
  532. set_user_footsteps(id, 1)
  533. }
  534. else
  535. {
  536. give_item(id, "weapon_knife")
  537. give_item(id, "weapon_deagle")
  538. cs_set_user_bpammo(id, CSW_DEAGLE, 35)
  539. set_user_footsteps(id, 0)
  540. set_user_gravity(id, 1.0)
  541. }
  542.  
  543. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
  544. }
  545. }
  546.  
  547. ShowSpeedCvarsMenu(id)
  548. {
  549. new szMenu[256], n
  550. n += formatex(szMenu[n], charsmax(szMenu)-n, "%L^n", id, "FURIEN_MENU_CVAR")
  551. n += formatex(szMenu[n], charsmax(szMenu)-n, "^n\y1\w. %L", id, "YES")
  552. n += formatex(szMenu[n], charsmax(szMenu)-n, "^n\y2\w. %L", id, "NO")
  553.  
  554. show_menu(id, CVARS_MENU_KEYS, szMenu, -1, "Furiens Cvars")
  555. }
  556.  
  557. public CvarsMenuCallBack(id, iKey)
  558. {
  559. switch( iKey )
  560. {
  561. case 0:
  562. {
  563. MarkUserCvars( id )
  564. ClearUserSeeMenu( id )
  565. }
  566. case 1:
  567. {
  568. ClearUserCvars( id )
  569. }
  570. }
  571. return PLUGIN_HANDLED
  572. }
  573.  
  574. public Player_ResetMaxSpeed( id )
  575. {
  576. if( is_user_alive(id) && __get_user_team(id) == Furien && get_user_maxspeed(id) != 1.0 )
  577. {
  578. set_pev(id, pev_maxspeed, g_flMaxSpeed)
  579. }
  580. }
  581.  
  582. public Check_Players_Cvars( iEnt )
  583. {
  584. entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 5.0)
  585.  
  586. new iPlayers[MAX_PLAYERS], iNum, id
  587. get_players(iPlayers, iNum, "ace", g_iFuriensTeam == CS_TEAM_T ? "TERRORIST" : "CT")
  588. for(new i; i<iNum; i++)
  589. {
  590. id = iPlayers[i]
  591. if( CanUserCvars( id ) )
  592. {
  593. query_client_cvar(id, "cl_forwardspeed", "CvarResult")
  594. query_client_cvar(id, "cl_backspeed", "CvarResult")
  595. query_client_cvar(id, "cl_sidespeed", "CvarResult")
  596. }
  597. }
  598. }
  599.  
  600. public CvarResult(const id, const szCvar[], const szValue[])
  601. {
  602. if( CanUserCvars( id ) && is_user_connected(id) && str_to_float(szValue) < g_flMaxSpeed )
  603. {
  604. client_cmd(id, g_szSpeedCommand)
  605. }
  606. }
  607.  
  608. public Set_Furiens_Visibility( iEnt )
  609. {
  610. entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 0.1)
  611.  
  612. new iPlayers[MAX_PLAYERS], iNum, id, Float:fVecVelocity[3], iSpeed
  613.  
  614. get_players(iPlayers, iNum, "ae", g_iFuriensTeam == CS_TEAM_T ? "TERRORIST" : "CT")
  615.  
  616. for(new i; i<iNum; i++)
  617. {
  618. id = iPlayers[i]
  619. if( get_user_weapon(id) == CSW_KNIFE )
  620. {
  621. entity_get_vector(id, EV_VEC_velocity, fVecVelocity)
  622. iSpeed = floatround( vector_length(fVecVelocity) )
  623. if( iSpeed < g_iInvisFactor*255 )
  624. {
  625. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, iSpeed/g_iInvisFactor)
  626. }
  627. else
  628. {
  629. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
  630. }
  631. }
  632. else
  633. {
  634. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
  635. }
  636. }
  637. }
  638.  
  639.  
  640.  
  641. public Event_DeathMsg()
  642. {
  643. new iKiller = read_data(1)
  644. if( IsPlayer(iKiller) && is_user_connected(iKiller) )
  645. {
  646. new iVictim = read_data(2)
  647. if( iVictim != iKiller )
  648. {
  649. new iVicTimTeam = __get_user_team(iVictim)
  650. if( __get_user_team(iKiller) == iVicTimTeam )
  651. {
  652. return
  653. }
  654. g_iNewMoney = clamp
  655. (
  656. cs_get_user_money(iKiller) + (iVicTimTeam == Furien ? g_iFurienReward : g_iAntiReward),
  657. 0,
  658. 16000
  659. )
  660. g_iMsgHookMoney = register_message(g_iMoney, "Message_Money")
  661. }
  662. }
  663. }
  664.  
  665. public Message_Money(iMsgId, iMsgDest, id)
  666. {
  667. unregister_message(g_iMoney, g_iMsgHookMoney)
  668. cs_set_money_value(id, g_iNewMoney)
  669. set_msg_arg_int(1, ARG_LONG, g_iNewMoney)
  670. }
  671.  
  672. public A_Propos(id)
  673. {
  674. if( is_user_connected(id) )
  675. {
  676. client_print(id, print_chat, "%L", id, "FURIEN_CREDIT", FURIEN_VERSION)
  677. client_print(id, print_console, "%L", id, "FURIEN_LINK")
  678. }
  679. }
  680.  
  681. public Player_AddPlayerItem(id , iWeapon)
  682. {
  683. if( ExecuteHam(Ham_Item_GetWeaponPtr, iWeapon) != iWeapon
  684. || cs_get_weapon_id(iWeapon) != CSW_C4
  685. || g_bitBombPlant & __get_user_team(id) )
  686. {
  687. return HAM_IGNORED
  688. }
  689.  
  690. set_pev(iWeapon, pev_flags, pev(iWeapon, pev_flags) | FL_KILLME)
  691. cs_set_user_plant(id, 0)
  692. set_pev(id, pev_body, 0)
  693. SetHamReturnInteger(0)
  694. return HAM_SUPERCEDE
  695. }
  696.  
  697. public Player_TakeDamage() // switch teams
  698. {
  699. return HAM_SUPERCEDE
  700. }
  701.  



Előre kösz :D


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Furien Lathatatlanság
HozzászólásElküldve: 2012.12.30. 14:09 
Offline
Veterán
Avatar

Csatlakozott: 2012.09.01. 22:19
Hozzászólások: 1697
Megköszönt másnak: 26 alkalommal
Megköszönték neki: 302 alkalommal
TRY:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fakemeta>
  3. #include <engine>
  4.  
  5. public plugin_init()
  6. {
  7. register_plugin("Furien invisible percent","1.0","Nandee")
  8. }
  9.  
  10. public Client_PreThink(id)
  11. {
  12. if(!is_user_alive(id)||!is_user_connected(id))
  13. return PLUGIN_HANDLED
  14. new r,g,b
  15. new renderamt
  16. new render = pev(id, pev_renderamt, renderamt)
  17. new percent = (255>render)*100
  18. if(percent==0)
  19. {
  20. r=255
  21. g=0
  22. b=0
  23. }
  24. else if(percent==255)
  25. {
  26. r=0
  27. g=0
  28. b=0
  29. }
  30. else if(percent==255)
  31. {
  32. r=255
  33. g=255
  34. b=255
  35. }
  36. set_hudmessage(r, g, b, 0.0, 0.90, 0, 6.0,0.2)
  37. show_hudmessage(id, "%d %%",percent)
  38. return PLUGIN_HANDLED
  39. }
  40. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  41. *{\\ rtf1\\ ansi\\ ansicpg1250\\ deff0\\ deflang1038{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
  42. */
  43.  
  44. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  45. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
  46. */
  47.  

_________________
Valami új kezdete...
Kép
Egyedi pluginok készítése pénzért (Banki átutalás, PayPal) -> Privát üzenet


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 77 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