hlmod.hu

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



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: nincs regisztrált felhasználó 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  [ 3 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Furien
HozzászólásElküldve: 2013.04.15. 00:07 
Offline
Őskövület
Avatar

Csatlakozott: 2011.12.28. 00:35
Hozzászólások: 2736
Megköszönt másnak: 56 alkalommal
Megköszönték neki: 275 alkalommal
Hali.

Valaki ebből a pluginból ki tudná szedni, hogy amit meg kérdez csapat választás után azt ne kérdezze.

SMA Forráskód: [ Mindet kijelol ]
  1. [en]
  2. FURIEN_MENU_CVAR:
  3. \rFuriens Cvars\w :^n^n
  4. To take full advantage of Furien Mod,^n
  5. you must allow server to change your speed settings.^n
  6. Do you accept ?


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

_________________
****


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Furien
HozzászólásElküldve: 2013.04.15. 09:44 
Offline
Jómunkásember

Csatlakozott: 2012.01.29. 12:48
Hozzászólások: 408
Megköszönt másnak: 15 alkalommal
Megköszönték neki: 126 alkalommal
Csatolmány:
furiens.sma [17.55 KiB]
Letöltve 28 alkalommal.


A hozzászólást 2 alkalommal szerkesztették, utoljára HuBaBuBa 2013.04.15. 11:02-kor.

Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Furien
HozzászólásElküldve: 2013.04.15. 10:34 
Offline
Őskövület
Avatar

Csatlakozott: 2011.12.28. 00:35
Hozzászólások: 2736
Megköszönt másnak: 56 alkalommal
Megköszönték neki: 275 alkalommal
HuBaBuBa írta:
Csatolmány:
furiens.sma


És azt még át tudod írni, hogy NS is fel tudjon jönni mert van egy masik furiens plugin amivel már fel tudnak jönni az NS. De ugyan úgy rá kérdez amit elöbb írtam, de ha az igenre megyek kidob a szerverből.

_________________
****


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


Ki van itt

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