Advertisement
fackfrost

FURIEN CLASSIC

Jan 3rd, 2016
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.37 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <cstrike>
  3. #include <engine>
  4. #include <fakemeta>
  5. #include <fakemeta_util>
  6. #include <hamsandwich>
  7. #include <fun>
  8.  
  9. #define PLUGIN "Furien Clasic"
  10. #define VERSION "2.0"
  11. #define AUTHOR "Aragon*/DaNNe."
  12.  
  13. #define DMG_HEGRENADE (1<<24)
  14.  
  15. #define FURIEN_GRAVITY 0.4
  16. #define FURIEN_SPEED 750.0
  17. #define TEAM_FURIEN 1
  18. #define TEAM_ANTIFURIEN 2
  19.  
  20. #define TASKID_CANPLANT 10001
  21. #define TASKID_C4COUNTDOWN 453
  22.  
  23. #define VIP_GOLD_LEVEL ADMIN_LEVEL_H
  24. #define VIP_SILVER_LEVEL ADMIN_LEVEL_G
  25. #define FOUNDER_LEVEL ADMIN_IMMUNITY
  26.  
  27. #if cellbits == 32
  28. #define OFFSET_BZ 235
  29. #else
  30. #define OFFSET_BZ 268
  31. #endif
  32.  
  33. //Shop
  34. new SuperKnifeModel_V[] = "models/v_superknife_new.mdl"
  35. new bool: HaveSuperKnife[33]
  36.  
  37. //Settings
  38. new bool:MakeVisible[33], Float:Wallorigin[33][3]
  39.  
  40. //Parachute
  41. #define PARACHUTE_CLASS "Parachute"
  42. new ParaENT[33];
  43.  
  44. new Menu;
  45. new cvar_gamedescription, furienspawnhp, antifurienspawnhp, removebuyzone, superknife_damage_multiplier, cvar_autojoin_class, cvar_autojoin_team, cvar_aim_info,
  46. MSGID_SayText, MSGID_StatusIcon, MSGID_TextMsg, MSGID_SendAudio, MSGID_ShowMenu, MSGID_VGUIMenu, MSGID_Health, MSGID_ScreenFade,
  47. bool:CanPlant, C4_CountDownDelay;
  48.  
  49. public plugin_cfg() {
  50. server_cmd("amx_cvar mp_playerid 2")
  51. server_cmd("amx_cvar sv_maxspeed 900")
  52. server_cmd("amx_cvar sv_restart 5")
  53. }
  54.  
  55.  
  56. //===========================================================================================//
  57. //===============================[Weapons Settings]=========================================//
  58. //=========================================================================================//
  59. new bool:HavePrimaryWeapon[33], bool:HaveSecondaryWeapon[33], PrimaryWeapon[33], SecondaryWeapon[33];
  60.  
  61. //---|| Primary
  62. #define M4A1_KEY 100
  63. #define AK47_KEY 101
  64. #define M3_KEY 102
  65. #define AUG_KEY 103
  66. #define FAMAS_KEY 104
  67. #define MP5_KEY 105
  68. #define XM1014_KEY 106
  69.  
  70. //---|| Secondary
  71. #define USP_KEY 107
  72. #define DEAGLE_KEY 108
  73. #define ELITE_KEY 109
  74. #define FIVESEVEN_KEY 110
  75.  
  76. public plugin_init() {
  77. register_plugin(PLUGIN, VERSION, AUTHOR)
  78.  
  79. cvar_gamedescription = register_cvar("furien_gamename", "Furien CS1")
  80. antifurienspawnhp = register_cvar("antifurien_spawnhp", "100")
  81. furienspawnhp = register_cvar("furien_spawnhp", "100")
  82. superknife_damage_multiplier = register_cvar("superknife_damage_multiplier", "2.0")
  83. cvar_autojoin_team = register_cvar("furien_team", "5")
  84. cvar_autojoin_class = register_cvar("furien_class", "5")
  85. cvar_aim_info = register_cvar("furien_enable_aiminfo", "1")
  86.  
  87. MSGID_SayText = get_user_msgid("SayText")
  88. MSGID_StatusIcon = get_user_msgid("StatusIcon")
  89. MSGID_TextMsg = get_user_msgid("TextMsg")
  90. MSGID_SendAudio = get_user_msgid("SendAudio")
  91. MSGID_ShowMenu = get_user_msgid("ShowMenu")
  92. MSGID_VGUIMenu = get_user_msgid("VGUIMenu")
  93. MSGID_ScreenFade = get_user_msgid("ScreenFade")
  94.  
  95. register_clcmd("say shop", "CmdShopMenu")
  96. register_clcmd("say /shop", "CmdShopMenu")
  97. register_clcmd("say_team shop", "CmdShopMenu")
  98. register_clcmd("say_team /shop", "CmdShopMenu")
  99. //register_clcmd("say weapons", "CmdWeaponsMenu")
  100. //register_clcmd("say /weapons", "CmdWeaponsMenu")
  101. register_clcmd("jointeam", "CMD_BlockJoinTeam")
  102. register_clcmd("jointeam 1", "CMD_BlockJoinTeam")
  103. register_clcmd("jointeam 2", "CMD_BlockJoinTeam")
  104. register_clcmd("jointeam 3", "CMD_BlockJoinTeam")
  105. register_clcmd("chooseteam", "CMD_BlockChooseTeam")
  106. register_clcmd("say /beneficii", "CmdShowMotd")
  107. register_clcmd("say /rs", "CmdResetScore")
  108. register_clcmd("say_team /rs", "CmdResetScore")
  109. register_clcmd("say /resetscore", "CmdResetScore")
  110. register_clcmd("say_team /resetscore", "CmdResetScore")
  111.  
  112. RegisterHam(Ham_Spawn, "player", "Ham_Spawn_Post", 1)
  113. RegisterHam(Ham_Touch, "weaponbox", "HAM_Touch_Weapon")
  114. RegisterHam(Ham_Touch, "armoury_entity", "HAM_Touch_Weapon")
  115. RegisterHam(Ham_Touch, "weapon_shield", "HAM_Touch_Weapon")
  116. RegisterHam(Ham_TakeDamage, "player", "SuperKnife_TakeDamage")
  117. RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_c4", "C4_PrimaryAttack");
  118.  
  119. register_forward(FM_PlayerPreThink, "Player_PreThink");
  120. register_forward(FM_AddToFullPack, "FWD_AddToFullPack", 1);
  121. register_forward(FM_PlayerPreThink, "FWD_ParachutePreThink");
  122. register_forward(FM_GetGameDescription, "FWD_GameDescription")
  123.  
  124. register_event("CurWeapon", "EVENT_CurWeapon", "be", "1=1")
  125. register_event("DeathMsg", "EVENT_Death", "a");
  126. register_event("SendAudio", "EVENT_SwitchTeam", "a", "1=0", "2=%!MRAD_ctwin");
  127. register_event("HLTV", "EVENT_NewRound", "a", "1=0", "2=0");
  128. register_event("TextMsg", "EVENT_FireINTheHole", "b", "2&#Game_radio", "4&#Fire_in_the_hole")
  129. register_event("TextMsg", "EVENT_FireINTheHole", "b", "3&#Game_radio", "5&#Fire_in_the_hole")
  130.  
  131.  
  132. register_message(MSGID_StatusIcon, "MSG_StatusIcon");
  133. register_message(MSGID_TextMsg, "MSG_TextMessage");
  134. register_message(MSGID_ShowMenu, "MSG_ShowMenu");
  135. register_message(MSGID_VGUIMenu, "MSG_VGUIMenu");
  136. register_message(MSGID_SendAudio, "MSG_SendAudio");
  137. register_message(MSGID_Health, "MSG_Health")
  138. register_message(MSGID_ScreenFade, "MSG_ScreenFade")
  139. }
  140.  
  141.  
  142. public plugin_precache() {
  143. removebuyzone = register_cvar("furien_removebuyzone", "1")
  144.  
  145. if(get_pcvar_num(removebuyzone)) {
  146.  
  147. remove_entity_name("info_map_parameters");
  148. remove_entity_name("func_buyzone");
  149.  
  150. new Entity = create_entity("info_map_parameters");
  151.  
  152. DispatchKeyValue(Entity, "buying", "3");
  153. DispatchSpawn(Entity);
  154. }
  155. precache_model(SuperKnifeModel_V)
  156. }
  157.  
  158. public client_connect(id) {
  159. client_cmd(id, "cl_forwardspeed 999.0")
  160. client_cmd(id, "cl_sidespeed 999.0")
  161. client_cmd(id, "cl_backspeed 999.0")
  162. }
  163.  
  164. public client_putinserver(id) {
  165. client_cmd(id, "cl_forwardspeed 999.0")
  166. client_cmd(id, "cl_sidespeed 999.0")
  167. client_cmd(id, "cl_backspeed 999.0")
  168. PrimaryWeapon[id] = 0
  169. SecondaryWeapon[id] = 0
  170. }
  171.  
  172.  
  173. public Ham_Spawn_Post(id) {
  174. if(is_user_connected(id) && is_user_alive(id)) {
  175. strip_user_weapons(id)
  176. HavePrimaryWeapon[id] = false
  177. HaveSecondaryWeapon[id] = false
  178. switch(get_user_team(id)) {
  179. case TEAM_FURIEN: {
  180. fm_give_item(id, "weapon_hegrenade")
  181. fm_give_item(id, "weapon_knife")
  182. fm_give_item(id, "weapon_flashbang")
  183. set_user_footsteps(id, 1)
  184. fm_set_user_health(id, get_pcvar_num(furienspawnhp))
  185. }
  186. case TEAM_ANTIFURIEN: {
  187. fm_give_item(id, "weapon_flashbang")
  188. fm_give_item(id, "weapon_hegrenade")
  189. fm_give_item(id, "weapon_knife")
  190. set_user_footsteps(id, 0)
  191. fm_set_user_health(id, get_pcvar_num(antifurienspawnhp))
  192. HaveSuperKnife[id] = false;
  193. Equipment(id)
  194. }
  195. }
  196. }
  197. }
  198.  
  199. public EVENT_NewRound() {
  200. CanPlant = false;
  201. new Float:FloatTime = get_cvar_num("mp_freezetime") + (get_cvar_num("mp_roundtime") * 60) - 60.0
  202. set_task(FloatTime, "TASK_CanPlant", TASKID_CANPLANT)
  203. remove_task(TASKID_C4COUNTDOWN)
  204. }
  205.  
  206. public EVENT_FireINTheHole()
  207. return PLUGIN_HANDLED
  208.  
  209. public HAM_Touch_Weapon(ent, id) {
  210. if(is_user_alive(id) && get_user_team(id) == TEAM_FURIEN && !(get_pdata_cbase(ent, 39, 4) > 0))
  211. return HAM_SUPERCEDE
  212.  
  213. return HAM_IGNORED
  214. }
  215.  
  216. public SuperKnife_TakeDamage(Victim, Inflictor, Attacker, Float:Damage, DamageType) {
  217. if(is_user_connected(Attacker) && is_user_alive(Attacker) && is_user_connected(Victim)) {
  218. if(get_user_weapon(Attacker) == CSW_KNIFE) {
  219. if(HaveSuperKnife[Attacker])
  220. SetHamParamFloat(4, Damage * get_pcvar_float(superknife_damage_multiplier))
  221. }
  222. if(get_user_flags(Victim) & VIP_GOLD_LEVEL) {
  223. if(DamageType & DMG_HEGRENADE)
  224. return HAM_SUPERCEDE
  225. }
  226. }
  227. return HAM_IGNORED
  228. }
  229.  
  230. ///////////////////////////////////////////////////////////////////////////////////////////////
  231.  
  232. public C4_PrimaryAttack(Ent) {
  233. if(!CanPlant)
  234. return HAM_SUPERCEDE
  235.  
  236. return HAM_IGNORED
  237. }
  238.  
  239. public CmdResetScore(id) {
  240. if(get_user_frags(id) == 0 && get_user_deaths(id) == 0)
  241. ColorChat(id, "!gScorul tau este deja!t 0-0!g !")
  242. else {
  243. for(new i = 0; i < 2; i++) {
  244. cs_set_user_deaths(id, 0);
  245. set_user_frags(id, 0);
  246. }
  247. ColorChat(id, "!gTi-ai resetat scorul cu succes !")
  248. }
  249. }
  250.  
  251. public CmdShopMenu(id) {
  252. if(!is_user_alive(id))
  253. return PLUGIN_HANDLED
  254. switch(get_user_team(id)) {
  255. case TEAM_FURIEN: CmdFurienShop(id)
  256. case TEAM_ANTIFURIEN: CmdAntiFurienShop(id)
  257. }
  258. return PLUGIN_HANDLED
  259. }
  260.  
  261. public CmdFurienShop(id) {
  262. if(is_user_alive(id) && get_user_team(id) == TEAM_FURIEN) {
  263. Menu = menu_create("\yFurien Shop", "CmdFurienHandler")
  264.  
  265. new SuperKnife[256];
  266. formatex(SuperKnife, sizeof(SuperKnife)-1, "Super knife - \y10000$")
  267. menu_additem(Menu, SuperKnife, "1", 0)
  268.  
  269. new Health[256];
  270. formatex(Health, sizeof(Health)-1, "50 HP - \y3000$")
  271. menu_additem(Menu, Health, "2", 0)
  272.  
  273. new Armor[256];
  274. formatex(Armor, sizeof(Armor)-1, "50 AP + Helmet - \y500$")
  275. menu_additem(Menu, Armor, "3", 0)
  276.  
  277. new Grenade[256];
  278. formatex(Grenade, sizeof(Grenade)-1, "He grenade - \y4000$")
  279. menu_additem(Menu, Grenade, "4", 0)
  280.  
  281. menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL);
  282. menu_display(id, Menu, 0);
  283. }
  284. }
  285.  
  286. public CmdAntiFurienShop(id) {
  287. if(is_user_alive(id) && get_user_team(id) == TEAM_ANTIFURIEN) {
  288. Menu = menu_create("\yAnti-Furien Shop", "CmdAntiFurienHandler")
  289.  
  290. new Defuse[256];
  291. formatex(Defuse, sizeof(Defuse)-1, "Defuse kit - \y500$")
  292. menu_additem(Menu, Defuse, "1", 0)
  293.  
  294. new Health[256];
  295. formatex(Health, sizeof(Health)-1, "50 HP - \y3000$")
  296. menu_additem(Menu, Health, "2", 0)
  297.  
  298. new Armor[256];
  299. formatex(Armor, sizeof(Armor)-1, "50 AP + Helmet - \y500$")
  300. menu_additem(Menu, Armor, "3", 0)
  301.  
  302. new Grenade[256];
  303. formatex(Grenade, sizeof(Grenade)-1, "He grenade - \y4000$")
  304. menu_additem(Menu, Grenade, "4", 0)
  305.  
  306. menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL);
  307. menu_display(id, Menu, 0);
  308. }
  309. }
  310.  
  311. public CmdFurienHandler(id, menu, item) {
  312. if(item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 1) {
  313. menu_destroy(menu);
  314. return PLUGIN_HANDLED;
  315. }
  316. new Data[6], Name[64];
  317. new Access, CallBack;
  318. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, CallBack);
  319. new Key = str_to_num(Data);
  320. switch(Key) {
  321. case 1: {
  322. if(HaveSuperKnife[id])
  323. client_print(id, print_center, "You already have SuperKnife!")
  324. else {
  325. new Money = cs_get_user_money(id) - 10000
  326. if(Money < 0)
  327. client_print(id, print_center, "You have insufficient founds!")
  328. else {
  329. HaveSuperKnife[id] = true;
  330. EVENT_CurWeapon(id)
  331. cs_set_user_money(id, Money)
  332. }
  333. }
  334. }
  335. case 2: {
  336. if(get_user_health(id) >= 250)
  337. client_print(id, print_center, "You already have 250 HP!")
  338. else {
  339. new Money = cs_get_user_money(id) - 3000
  340. if(Money < 0)
  341. client_print(id, print_center, "You have insufficient founds!")
  342. else {
  343. if(get_user_health(id) + 50 > 250)
  344. fm_set_user_health(id, 250)
  345. else
  346. fm_set_user_health(id, get_user_health(id) + 50)
  347. cs_set_user_money(id, Money)
  348. }
  349. }
  350. }
  351. case 3: {
  352. if(get_user_armor(id) >= 250)
  353. client_print(id, print_center, "You already have 250 AP!")
  354. else {
  355. new Money = cs_get_user_money(id) - 500
  356. if(Money < 0)
  357. client_print(id, print_center, "You have insufficient founds!")
  358. else {
  359. if(get_user_armor(id) + 50 > 250)
  360. fm_set_user_armor(id, 250)
  361. else
  362. fm_set_user_armor(id, get_user_armor(id) + 50)
  363. cs_set_user_money(id, Money)
  364. }
  365. }
  366. }
  367. case 4: {
  368. if(user_has_weapon(id, CSW_HEGRENADE))
  369. client_print(id, print_center, "You already have HE GRENADE!")
  370. else {
  371. new Money = cs_get_user_money(id) - 4000
  372. if(Money < 0)
  373. client_print(id, print_center, "You have insufficient founds!")
  374. else {
  375. fm_give_item(id, "weapon_hegrenade")
  376. cs_set_user_money(id, Money)
  377. }
  378. }
  379. }
  380. }
  381. menu_destroy(menu)
  382. return PLUGIN_HANDLED
  383. }
  384.  
  385. public CmdAntiFurienHandler(id, menu, item) {
  386. if(item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 2) {
  387. menu_destroy(menu);
  388. return PLUGIN_HANDLED;
  389. }
  390. new Data[6], Name[64];
  391. new Access, CallBack;
  392. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, CallBack);
  393. new Key = str_to_num(Data);
  394. switch(Key) {
  395. case 1: {
  396. if(cs_get_user_defuse(id))
  397. client_print(id, print_center, "You already have Defuse KIT!")
  398. else {
  399. new Money = cs_get_user_money(id) - 500
  400. if(Money < 0)
  401. client_print(id, print_center, "You have insufficient founds!")
  402. else {
  403. cs_set_user_defuse(id, 1)
  404. cs_set_user_money(id, Money)
  405. }
  406. }
  407. }
  408. case 2: {
  409. if(get_user_health(id) >= 250)
  410. client_print(id, print_center, "You already have 250 HP!")
  411. else {
  412. new Money = cs_get_user_money(id) - 3000
  413. if(Money < 0)
  414. client_print(id, print_center, "You have insufficient founds!")
  415. else {
  416. if(get_user_health(id) + 50 > 250)
  417. fm_set_user_health(id, 250)
  418. else
  419. fm_set_user_health(id, get_user_health(id) + 50)
  420. cs_set_user_money(id, Money)
  421. }
  422. }
  423. }
  424. case 3: {
  425. if(get_user_armor(id) >= 250)
  426. client_print(id, print_center, "You already have 250 AP!")
  427. else {
  428. new Money = cs_get_user_money(id) - 500
  429. if(Money < 0)
  430. client_print(id, print_center, "You have insufficient founds!")
  431. else {
  432. if(get_user_armor(id) + 50 > 250)
  433. fm_set_user_armor(id, 250)
  434. else
  435. fm_set_user_armor(id, get_user_armor(id) + 50)
  436. cs_set_user_money(id, Money)
  437. }
  438. }
  439. }
  440. case 4: {
  441. if(user_has_weapon(id, CSW_HEGRENADE))
  442. client_print(id, print_center, "You already have HE GRENADE!")
  443. else {
  444. new Money = cs_get_user_money(id) - 4000
  445. if(Money < 0)
  446. client_print(id, print_center, "You have insufficient founds!")
  447. else {
  448. fm_give_item(id, "weapon_hegrenade")
  449. cs_set_user_money(id, Money)
  450. }
  451. }
  452. }
  453. }
  454. menu_destroy(menu)
  455. return PLUGIN_HANDLED
  456. }
  457.  
  458. //=========================================================================//
  459. //=======================[Weapons Settings]===============================//
  460. //=======================================================================//
  461.  
  462. public Equipment(id) {
  463. if(is_user_alive(id) && get_user_team(id) == 2) {
  464. Menu = menu_create("\rWeapons Menu", "EquipmentCmd");
  465. menu_additem(Menu, "\wNew Weapons", "1", 0);
  466. if(PrimaryWeapon[id] && SecondaryWeapon[id])
  467. menu_additem(Menu, "\wPrevious Setup", "2", 0);
  468. else
  469. menu_additem(Menu, "\dPrevious Setup", "2", 0);
  470. menu_setprop(Menu, MPROP_EXIT, MEXIT_NEVER)
  471. menu_display(id, Menu, 0);
  472. }
  473. }
  474.  
  475. public EquipmentCmd(id, menu, item) {
  476. if(item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 2) {
  477. menu_destroy(menu);
  478. return PLUGIN_HANDLED;
  479. }
  480. new Data[6], Name[64];
  481. new Access, CallBack;
  482. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, CallBack);
  483. new Key = str_to_num(Data);
  484. switch(Key) {
  485. case 1: {
  486. if(!HavePrimaryWeapon[id])
  487. Primary(id)
  488. else if(!HaveSecondaryWeapon[id])
  489. Secondary(id)
  490. }
  491. case 2: {
  492. if(PrimaryWeapon[id] && SecondaryWeapon[id])
  493. GiveLastWeapons(id)
  494. else Equipment(id)
  495. }
  496. default: return PLUGIN_HANDLED;
  497. }
  498. menu_destroy(menu);
  499. return PLUGIN_HANDLED;
  500. }
  501.  
  502. public Primary(id) {
  503. if(is_user_alive(id) && get_user_team(id) == TEAM_ANTIFURIEN) {
  504. Menu = menu_create("\yAnti-Furien Weapons^n\rPrimary:", "CmdWeaponsHandler")
  505.  
  506. menu_additem(Menu, "M4A1", "1", 0)
  507. menu_additem(Menu, "AK47", "2", 0)
  508. menu_additem(Menu, "M3", "3", 0)
  509. menu_additem(Menu, "Aug", "4", 0)
  510. menu_additem(Menu, "Famas", "5", 0)
  511. menu_additem(Menu, "MP5 Navy", "6", 0)
  512. menu_additem(Menu, "XM1014", "7", 0)
  513.  
  514. menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL);
  515. menu_display(id, Menu, 0);
  516. }
  517. }
  518.  
  519. public CmdWeaponsHandler(id, menu, item) {
  520. if(item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 2) {
  521. menu_destroy(menu);
  522. return PLUGIN_HANDLED;
  523. }
  524. new Data[6], Name[64];
  525. new Access, CallBack;
  526. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, CallBack);
  527. new Key = str_to_num(Data);
  528. switch(Key) {
  529. case 1: {
  530. fm_give_item(id, "weapon_m4a1")
  531. cs_set_user_bpammo(id, CSW_M4A1, 254)
  532. PrimaryWeapon[id] = M4A1_KEY
  533. HavePrimaryWeapon[id] = true;
  534. Secondary(id)
  535. }
  536. case 2: {
  537. fm_give_item(id, "weapon_ak47")
  538. cs_set_user_bpammo(id, CSW_AK47, 254)
  539. PrimaryWeapon[id] = AK47_KEY
  540. HavePrimaryWeapon[id] = true;
  541. Secondary(id)
  542. }
  543. case 3: {
  544. fm_give_item(id, "weapon_m3")
  545. cs_set_user_bpammo(id, CSW_M3, 254)
  546. PrimaryWeapon[id] = M3_KEY
  547. HavePrimaryWeapon[id] = true;
  548. Secondary(id)
  549. }
  550. case 4: {
  551. fm_give_item(id, "weapon_aug")
  552. cs_set_user_bpammo(id, CSW_AUG, 254)
  553. PrimaryWeapon[id] = AUG_KEY
  554. HavePrimaryWeapon[id] = true;
  555. Secondary(id)
  556. }
  557. case 5: {
  558. fm_give_item(id, "weapon_famas")
  559. cs_set_user_bpammo(id, CSW_FAMAS, 254)
  560. PrimaryWeapon[id] = FAMAS_KEY
  561. HavePrimaryWeapon[id] = true;
  562. Secondary(id)
  563. }
  564. case 6: {
  565. fm_give_item(id, "weapon_mp5navy")
  566. cs_set_user_bpammo(id, CSW_MP5NAVY, 254)
  567. PrimaryWeapon[id] = MP5_KEY
  568. HavePrimaryWeapon[id] = true;
  569. Secondary(id)
  570. }
  571. case 7: {
  572. fm_give_item(id, "weapon_xm1014")
  573. cs_set_user_bpammo(id, CSW_XM1014, 254)
  574. PrimaryWeapon[id] = XM1014_KEY
  575. HavePrimaryWeapon[id] = true;
  576. Secondary(id)
  577. }
  578. }
  579. menu_destroy(menu)
  580. return PLUGIN_HANDLED
  581. }
  582.  
  583. public Secondary(id) {
  584. if(is_user_alive(id) && get_user_team(id) == TEAM_ANTIFURIEN) {
  585. Menu = menu_create("\yAnti-Furien Weapons^n\rSecondary:", "CmdSecondaryHandler")
  586.  
  587. menu_additem(Menu, "USP", "1", 0)
  588. menu_additem(Menu, "Deagle", "2", 0)
  589. menu_additem(Menu, "Elite", "3", 0)
  590. menu_additem(Menu, "Five Seven", "4", 0)
  591.  
  592. menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL);
  593. menu_display(id, Menu, 0);
  594. }
  595. }
  596.  
  597. public CmdSecondaryHandler(id, menu, item) {
  598. if(item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 2) {
  599. menu_destroy(menu);
  600. return PLUGIN_HANDLED;
  601. }
  602. new Data[6], Name[64];
  603. new Access, CallBack;
  604. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, CallBack);
  605. new Key = str_to_num(Data);
  606. switch(Key) {
  607. case 1: {
  608. fm_give_item(id, "weapon_usp")
  609. cs_set_user_bpammo(id, CSW_USP, 256)
  610. SecondaryWeapon[id] = USP_KEY
  611. HaveSecondaryWeapon[id] = true;
  612. }
  613. case 2: {
  614. fm_give_item(id, "weapon_deagle")
  615. cs_set_user_bpammo(id, CSW_DEAGLE, 256)
  616. SecondaryWeapon[id] = DEAGLE_KEY
  617. HaveSecondaryWeapon[id] = true;
  618. }
  619. case 3: {
  620. fm_give_item(id, "weapon_elite")
  621. cs_set_user_bpammo(id, CSW_ELITE, 256)
  622. SecondaryWeapon[id] = ELITE_KEY
  623. HaveSecondaryWeapon[id] = true;
  624. }
  625. case 4: {
  626. fm_give_item(id, "weapon_fiveseven")
  627. cs_set_user_bpammo(id, CSW_FIVESEVEN, 256)
  628. SecondaryWeapon[id] = FIVESEVEN_KEY
  629. HaveSecondaryWeapon[id] = true;
  630. }
  631. }
  632. menu_destroy(menu)
  633. return PLUGIN_HANDLED
  634. }
  635.  
  636. public GiveLastWeapons(id) {
  637. if(!HavePrimaryWeapon[id]) {
  638. switch(PrimaryWeapon[id]) {
  639. case M4A1_KEY: {
  640. fm_give_item(id, "weapon_m4a1")
  641. cs_set_user_bpammo(id, CSW_M4A1, 256)
  642. HavePrimaryWeapon[id] = true;
  643. }
  644. case AK47_KEY: {
  645. fm_give_item(id, "weapon_ak47")
  646. cs_set_user_bpammo(id, CSW_AK47, 256)
  647. HavePrimaryWeapon[id] = true;
  648. }
  649. case M3_KEY: {
  650. fm_give_item(id, "weapon_m3")
  651. cs_set_user_bpammo(id, CSW_M3, 256)
  652. HavePrimaryWeapon[id] = true;
  653. }
  654. case AUG_KEY: {
  655. fm_give_item(id, "weapon_aug")
  656. cs_set_user_bpammo(id, CSW_AUG, 256)
  657. HavePrimaryWeapon[id] = true;
  658. }
  659. case FAMAS_KEY: {
  660. fm_give_item(id, "weapon_famas")
  661. cs_set_user_bpammo(id, CSW_FAMAS, 256)
  662. HavePrimaryWeapon[id] = true;
  663. }
  664. case MP5_KEY: {
  665. fm_give_item(id, "weapon_mp5navy")
  666. cs_set_user_bpammo(id, CSW_MP5NAVY, 256)
  667. HavePrimaryWeapon[id] = true;
  668. }
  669. case XM1014_KEY: {
  670. fm_give_item(id, "weapon_xm1014")
  671. cs_set_user_bpammo(id, CSW_XM1014, 256)
  672. HavePrimaryWeapon[id] = true;
  673. }
  674. }
  675. }
  676. if(!HaveSecondaryWeapon[id]) {
  677. switch(SecondaryWeapon[id]) {
  678. case USP_KEY: {
  679. fm_give_item(id, "weapon_usp")
  680. cs_set_user_bpammo(id, CSW_USP, 256)
  681. HaveSecondaryWeapon[id] = true;
  682. }
  683. case DEAGLE_KEY: {
  684. fm_give_item(id, "weapon_deagle")
  685. cs_set_user_bpammo(id, CSW_DEAGLE, 256)
  686. HaveSecondaryWeapon[id] = true;
  687. }
  688. case ELITE_KEY: {
  689. fm_give_item(id, "weapon_elite")
  690. cs_set_user_bpammo(id, CSW_ELITE, 256)
  691. HaveSecondaryWeapon[id] = true;
  692. }
  693. case FIVESEVEN_KEY: {
  694. fm_give_item(id, "weapon_fiveseven")
  695. cs_set_user_bpammo(id, CSW_FIVESEVEN, 256)
  696. HaveSecondaryWeapon[id] = true;
  697. }
  698. }
  699. }
  700. }
  701. public CMD_BlockJoinTeam(id) {
  702. console_print(id, "*** Nu ai voie sa foloseti JoinTeam ! ***")
  703. return 1;
  704. }
  705.  
  706. public CMD_BlockChooseTeam(id) {
  707. console_print(id, "*** Nu ai voie sa foloseti ChooseTeam ! ***")
  708. return 1;
  709. }
  710.  
  711. public CmdShowMotd(id)
  712. show_motd(id, "addons/amxmodx/configs/beneficii.html")
  713.  
  714. /////////////////////////////////////////////////////////////////////////
  715.  
  716. public EVENT_CurWeapon(id) {
  717. if(is_user_connected(id)) {
  718. if(get_user_weapon(id) == CSW_KNIFE) {
  719. if(HaveSuperKnife[id])
  720. set_pev(id, pev_viewmodel2, SuperKnifeModel_V)
  721. }
  722. new PlayerHealth;
  723. PlayerHealth = get_user_health(id)
  724. if(PlayerHealth == 256)
  725. fm_set_user_health(id, 255)
  726. }
  727.  
  728. }
  729.  
  730. public EVENT_Death() {
  731. static Attacker, Victim;
  732. Attacker = read_data(1)
  733. Victim = read_data(2)
  734. HaveSuperKnife[Victim] = false;
  735. if(Victim == Attacker)
  736. return 1;
  737.  
  738. if(is_user_connected(Attacker)) {
  739. if(get_user_flags(Attacker) & VIP_GOLD_LEVEL) {
  740. cs_set_user_money(Attacker, cs_get_user_money(Attacker) + 6000)
  741. fm_set_user_health(Attacker, get_user_health(Attacker) + 60)
  742. fm_set_user_armor(Attacker, get_user_armor(Attacker) + 60)
  743. }
  744. else if(get_user_flags(Attacker) & VIP_SILVER_LEVEL) {
  745. cs_set_user_money(Attacker, cs_get_user_money(Attacker) + 3000)
  746. fm_set_user_health(Attacker, get_user_health(Attacker) + 30)
  747. fm_set_user_armor(Attacker, get_user_armor(Attacker) + 30)
  748. }
  749. else if(get_user_flags(Attacker) & FOUNDER_LEVEL) {
  750. cs_set_user_money(Attacker, cs_get_user_money(Attacker) + 7000)
  751. fm_set_user_health(Attacker, get_user_health(Attacker) + 70)
  752. fm_set_user_armor(Attacker, get_user_armor(Attacker) + 70)
  753. }
  754. else {
  755. if(get_user_team(Victim) == 2)
  756. cs_set_user_money(Attacker, cs_get_user_money(Attacker) + 1200)
  757. else if(get_user_team(Victim) == 1)
  758. cs_set_user_money(Attacker, cs_get_user_money(Attacker) + 3000)
  759. }
  760. }
  761.  
  762. return 1;
  763. }
  764.  
  765. public MSG_StatusIcon(msg_id, msg_dest, id) {
  766. static Attrib
  767. Attrib = get_msg_arg_int(2)
  768.  
  769. if(Attrib == (1<<1))
  770. set_msg_arg_int(2, ARG_BYTE, 0)
  771.  
  772. new Icon[8];
  773. get_msg_arg_string(2, Icon, 7);
  774. if(get_pcvar_num(removebuyzone)) {
  775. static const BuyZone[] = "buyzone";
  776.  
  777. if(equal(Icon, BuyZone)) {
  778. set_pdata_int(id, OFFSET_BZ, get_pdata_int(id, OFFSET_BZ, 5) & ~(1 << 0), 5);
  779.  
  780. return PLUGIN_HANDLED;
  781. }
  782. }
  783. return PLUGIN_CONTINUE;
  784. }
  785.  
  786. public MSG_TextMessage() {
  787. static TextMsg[22];
  788. get_msg_arg_string(2, TextMsg, charsmax(TextMsg))
  789. if(equal(TextMsg, "#Terrorists_Win")) {
  790. client_print(0, print_center, "The Furiens have won this round!")
  791. return PLUGIN_HANDLED;
  792. }
  793. else if(equal(TextMsg, "#CTs_Win")) {
  794. client_print(0, print_center, "The Anti-Furiens have won this round!")
  795. return PLUGIN_HANDLED;
  796. }
  797. else if(equal(TextMsg, "#Bomb_Defused")) {
  798. client_print(0, print_center, "The Anti-Furiens have won this round!")
  799. return PLUGIN_HANDLED;
  800. }
  801. else if(equal(TextMsg, "#Target_Bombed")) {
  802. client_print(0, print_center, "The Furiens have won this round!")
  803. return PLUGIN_HANDLED;
  804. }
  805. else if(equal(TextMsg, "#Target_Saved")) {
  806. client_print(0, print_center, "The Anti-Furiens have won this round!")
  807. return PLUGIN_HANDLED;
  808. }
  809. else if(equal(TextMsg, "#Fire_in_the_hole"))
  810. return PLUGIN_HANDLED
  811. else if(equal(TextMsg, "#C4_Plant_At_Bomb_Spot")) {
  812. if(!CanPlant)
  813. return PLUGIN_HANDLED
  814. }
  815. return PLUGIN_CONTINUE;
  816. }
  817.  
  818. public MSG_ShowMenu(msgid, dest, id) {
  819. if(!Should_AutoJoin(id))
  820. return PLUGIN_CONTINUE
  821.  
  822. static team_select[] = "#Team_Select"
  823. static menu_text_code[sizeof team_select]
  824. get_msg_arg_string(4, menu_text_code, sizeof menu_text_code - 1)
  825. if(!equal(menu_text_code, team_select))
  826. return PLUGIN_CONTINUE
  827.  
  828. JoinTeam_Task(id, msgid)
  829.  
  830. return PLUGIN_HANDLED
  831. }
  832.  
  833. public MSG_VGUIMenu(msgid, dest, id) {
  834. if(get_msg_arg_int(1) != 2 || !Should_AutoJoin(id))
  835. return PLUGIN_CONTINUE
  836.  
  837. JoinTeam_Task(id, msgid)
  838.  
  839. return PLUGIN_HANDLED
  840. }
  841.  
  842. public MSG_SendAudio() {
  843. static Sound[17]
  844. get_msg_arg_string(2, Sound, sizeof Sound - 1)
  845.  
  846. if(equal(Sound, "terwin") || equal(Sound, "ctwin") || equal(Sound, "rounddraw") || equal(Sound, "bombpl") || equal(Sound, "bombdef"))
  847. return PLUGIN_HANDLED;
  848.  
  849. return PLUGIN_CONTINUE;
  850. }
  851.  
  852. public MSG_Health(msgid, dest, id) {
  853. static Health;
  854. Health = get_msg_arg_int(1)
  855. if(Health > 255)
  856. set_msg_arg_int(1, ARG_BYTE, 255);
  857. else if(Health == 256)
  858. set_msg_arg_int(1, ARG_BYTE, get_user_health(id) + 10)
  859. }
  860.  
  861. public MSG_ScreenFade(msgid, dest, id) {
  862. if(is_user_connected(id)) {
  863. if(get_user_flags(id) & VIP_GOLD_LEVEL) {
  864. static data[4]
  865. data[0] = get_msg_arg_int(4)
  866. data[1] = get_msg_arg_int(5)
  867. data[2] = get_msg_arg_int(6)
  868. data[3] = get_msg_arg_int(7)
  869.  
  870. if(data[0] == 255 && data[1] == 255 && data[2] == 255 && data[3] > 199)
  871. return PLUGIN_HANDLED
  872. }
  873. }
  874. return PLUGIN_CONTINUE
  875. }
  876.  
  877. bool:Should_AutoJoin(id) {
  878. return(get_pcvar_num(cvar_autojoin_team) && !get_user_team(id) && !task_exists(id))
  879. }
  880.  
  881. JoinTeam_Task(id, menu_msgid) {
  882. static param_menu_msgid[2]
  883. param_menu_msgid[0] = menu_msgid
  884.  
  885. set_task(0.1, "Force_JoinTeam", id, param_menu_msgid, sizeof param_menu_msgid)
  886. }
  887.  
  888. public Force_JoinTeam(menu_msgid[], id) {
  889. if(get_user_team(id))
  890. return
  891.  
  892. static team[2], class[2]
  893. get_pcvar_string(cvar_autojoin_team, team, sizeof team - 1)
  894. get_pcvar_string(cvar_autojoin_class, class, sizeof class - 1)
  895. Force_Team_Join(id, menu_msgid[0], team, class)
  896. }
  897.  
  898. stock Force_Team_Join(id, menu_msgid, team[] = "5", class[] = "0") {
  899. static jointeam[] = "jointeam"
  900. if(class[0] == '0') {
  901. engclient_cmd(id, jointeam, team)
  902. return
  903. }
  904.  
  905. static msg_block, joinclass[] = "joinclass"
  906. msg_block = get_msg_block(menu_msgid)
  907. set_msg_block(menu_msgid, BLOCK_SET)
  908. engclient_cmd(id, jointeam, team)
  909. engclient_cmd(id, joinclass, class)
  910. set_msg_block(menu_msgid, msg_block)
  911. }
  912.  
  913. public bomb_planted(planter) {
  914. C4_CountDownDelay = get_cvar_num("mp_c4timer") - 1
  915. TASK_C4_CountDown();
  916. set_hudmessage(random(255), random(255), random(255), -1.0, -1.0, 1, 3.1, 3.0)
  917. show_hudmessage(0, "Furienii au plantat bomba!")
  918. }
  919.  
  920. public EVENT_SwitchTeam() {
  921. new Players[32], PlayersNum, id;
  922. get_players(Players, PlayersNum)
  923. if(PlayersNum) {
  924. for(new i; i < PlayersNum; i++) {
  925. id = Players[i]
  926. BeginDelay(id)
  927. }
  928. }
  929. }
  930.  
  931. public BeginDelay(id) {
  932. if(is_user_connected(id)) {
  933. switch(id) {
  934. case 1..7: set_task(0.1, "BeginTeamSwap", id)
  935. case 8..15: set_task(0.2, "BeginTeamSwap", id)
  936. case 16..23: set_task(0.3, "BeginTeamSwap", id)
  937. case 24..32: set_task(0.4, "BeginTeamSwap", id)
  938. }
  939. }
  940. }
  941.  
  942. public BeginTeamSwap(id) {
  943. if(is_user_connected(id)) {
  944. switch(get_user_team(id)) {
  945. case TEAM_FURIEN: cs_set_user_team(id, CS_TEAM_CT)
  946. case TEAM_ANTIFURIEN: cs_set_user_team(id, CS_TEAM_T)
  947. }
  948. }
  949. }
  950.  
  951. ///////////////////////////////////////////////////////////////////////////////////////////////
  952.  
  953. public Player_PreThink(id) {
  954. if(is_user_connected(id)) {
  955. if(get_user_team(id) == TEAM_FURIEN) {
  956. if(pev(id, pev_gravity) > FURIEN_GRAVITY && pev(id, pev_gravity) > 0.1)
  957. set_pev(id, pev_gravity, FURIEN_GRAVITY)
  958.  
  959. if(pev(id, pev_maxspeed) < FURIEN_SPEED && pev(id, pev_maxspeed) > 1.0) {
  960. set_pev(id, pev_maxspeed, FURIEN_SPEED)
  961. set_user_footsteps(id, 1)
  962. }
  963. }
  964. if(get_pcvar_num(cvar_aim_info)) {
  965. new Target, Body;
  966. get_user_aiming(id, Target, Body);
  967. if(is_user_alive(id) && is_user_connected(Target) && is_user_alive(Target)) {
  968. new TargetTeam, PlayerTeam, TargetName[32], Message[128], TargetHealth, TargetArmor, RED, GREEN, BLUE;
  969. TargetTeam = get_user_team(Target)
  970. PlayerTeam = get_user_team(id)
  971. get_user_name(Target, TargetName, 31)
  972. TargetHealth = get_user_health(Target)
  973. TargetArmor = get_user_armor(Target)
  974. if(PlayerTeam == TEAM_FURIEN && TargetTeam == TEAM_ANTIFURIEN) {
  975. formatex(Message, sizeof(Message)-1, "%s^nHP: %i | AP: %i", TargetName, TargetHealth, TargetArmor)
  976. RED = 20
  977. GREEN = 200
  978. BLUE = 50
  979. }
  980. else if(PlayerTeam == TEAM_FURIEN && TargetTeam == TEAM_FURIEN) {
  981. formatex(Message, sizeof(Message)-1, "%s^nHP: %i | AP: %i", TargetName, TargetHealth, TargetArmor)
  982. RED = 200
  983. GREEN = 20
  984. BLUE = 20
  985. }
  986. else if(PlayerTeam == TEAM_ANTIFURIEN && TargetTeam == TEAM_ANTIFURIEN) {
  987. formatex(Message, sizeof(Message)-1, "%s^nHP: %i | AP: %i", TargetName, TargetHealth, TargetArmor)
  988. RED = 200
  989. GREEN = 20
  990. BLUE = 20
  991. }
  992. else if(PlayerTeam == TEAM_ANTIFURIEN && TargetTeam == TEAM_FURIEN)
  993. return
  994. set_hudmessage(RED, GREEN, BLUE, -1.0, -1.0, 0, 0.0, 0.1, 0.0, 0.0, -1);
  995. show_hudmessage(id, "%s", Message)
  996. }
  997. }
  998. }
  999. }
  1000.  
  1001. public FWD_AddToFullPack(es, e, ent, host, host_flags, player, p_set) {
  1002. if(is_user_connected(ent) && is_user_connected(host) && is_user_alive(ent)) {
  1003. if(is_user_alive(host) && get_user_team(ent) == 1 && get_user_team(host) == 1
  1004. || !is_user_alive(host) && get_user_team(ent) == 1 && pev(host, pev_iuser2) == ent
  1005. || get_user_team(ent) == 1 && pev(ent, pev_maxspeed) <= 1.0) {
  1006. set_es(es, ES_RenderFx, kRenderFxNone);
  1007. set_es(es, ES_RenderMode, kRenderTransTexture);
  1008. set_es(es, ES_RenderAmt, 255);
  1009. }
  1010. else if(get_user_team(ent) == 1) {
  1011. set_es(es, ES_RenderFx, kRenderFxNone);
  1012. set_es(es, ES_RenderMode, kRenderTransTexture);
  1013. static Float:Origin[3]
  1014. pev(ent, pev_origin, Origin)
  1015.  
  1016. if(get_user_weapon(ent) == CSW_KNIFE && !MakeVisible[ent] && fm_get_speed(ent) <= 5 || get_user_weapon(ent) == CSW_KNIFE && !MakeVisible[ent] && Origin[0] == Wallorigin[ent][0] && Origin[1] == Wallorigin[ent][1] && Origin[2] == Wallorigin[ent][2])
  1017. set_es(es, ES_RenderAmt, 0);
  1018. else
  1019. set_es(es, ES_RenderAmt, 255);
  1020. }
  1021. }
  1022. }
  1023.  
  1024. public FWD_ParachutePreThink(id) {
  1025. if(is_user_alive(id) && get_user_team(id) == TEAM_ANTIFURIEN) {
  1026. new Float:FallSpeed = -50.0;
  1027. new Float:Frame;
  1028.  
  1029. new Button = pev(id, pev_button);
  1030. new OldButton = pev(id, pev_oldbuttons);
  1031. new Flags = pev(id, pev_flags);
  1032.  
  1033. if(ParaENT[id] > 0 &&(Flags & FL_ONGROUND)) {
  1034.  
  1035. if(pev(ParaENT[id],pev_sequence) != 2) {
  1036. set_pev(ParaENT[id], pev_sequence, 2);
  1037. set_pev(ParaENT[id], pev_gaitsequence, 1);
  1038. set_pev(ParaENT[id], pev_frame, 0.0);
  1039. set_pev(ParaENT[id], pev_fuser1, 0.0);
  1040. set_pev(ParaENT[id], pev_animtime, 0.0);
  1041. return;
  1042. }
  1043.  
  1044. pev(ParaENT[id],pev_fuser1, Frame);
  1045. Frame += 2.0;
  1046. set_pev(ParaENT[id],pev_fuser1,Frame);
  1047. set_pev(ParaENT[id],pev_frame,Frame);
  1048.  
  1049. if(Frame > 254.0) {
  1050. engfunc(EngFunc_RemoveEntity, ParaENT[id]);
  1051. ParaENT[id] = 0;
  1052. }
  1053. else {
  1054. engfunc(EngFunc_RemoveEntity, ParaENT[id]);
  1055. ParaENT[id] = 0;
  1056. }
  1057. return;
  1058. }
  1059.  
  1060. if(Button & IN_USE) {
  1061. new Float:Velocity[3];
  1062. pev(id, pev_velocity, Velocity);
  1063.  
  1064. if(Velocity[2] < 0.0) {
  1065. if(ParaENT[id] <= 0) {
  1066. ParaENT[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
  1067.  
  1068. if(ParaENT[id] > 0) {
  1069. set_pev(ParaENT[id],pev_classname, PARACHUTE_CLASS);
  1070. set_pev(ParaENT[id], pev_aiment, id);
  1071. set_pev(ParaENT[id], pev_owner, id);
  1072. set_pev(ParaENT[id], pev_movetype, MOVETYPE_FLY);
  1073. set_pev(ParaENT[id], pev_sequence, 0);
  1074. set_pev(ParaENT[id], pev_gaitsequence, 1);
  1075. set_pev(ParaENT[id], pev_frame, 0.0);
  1076. set_pev(ParaENT[id], pev_fuser1, 0.0);
  1077. }
  1078. }
  1079. if(ParaENT[id] > 0) {
  1080. set_pev(id, pev_sequence, 3);
  1081. set_pev(id, pev_gaitsequence, 1);
  1082. set_pev(id, pev_frame, 1.0);
  1083. set_pev(id, pev_framerate, 1.0);
  1084.  
  1085. Velocity[2] = (Velocity[2] + 40.0 < FallSpeed) ? Velocity[2] + 40.0 : FallSpeed;
  1086. set_pev(id, pev_velocity, Velocity);
  1087.  
  1088. if(pev(ParaENT[id],pev_sequence) == 0) {
  1089. pev(ParaENT[id],pev_fuser1, Frame);
  1090. Frame += 1.0;
  1091. set_pev(ParaENT[id],pev_fuser1,Frame);
  1092. set_pev(ParaENT[id],pev_frame,Frame);
  1093.  
  1094. if(Frame > 100.0) {
  1095. set_pev(ParaENT[id], pev_animtime, 0.0);
  1096. set_pev(ParaENT[id], pev_framerate, 0.4);
  1097. set_pev(ParaENT[id], pev_sequence, 1);
  1098. set_pev(ParaENT[id], pev_gaitsequence, 1);
  1099. set_pev(ParaENT[id], pev_frame, 0.0);
  1100. set_pev(ParaENT[id], pev_fuser1, 0.0);
  1101. }
  1102. }
  1103. }
  1104. }
  1105.  
  1106. else if(ParaENT[id] > 0) {
  1107. engfunc(EngFunc_RemoveEntity, ParaENT[id]);
  1108. ParaENT[id] = 0;
  1109. }
  1110. }
  1111.  
  1112. else if((OldButton & IN_USE) && ParaENT[id] > 0) {
  1113. engfunc(EngFunc_RemoveEntity, ParaENT[id]);
  1114. ParaENT[id] = 0;
  1115. }
  1116. }
  1117. }
  1118.  
  1119. public FWD_GameDescription() {
  1120. static GameName[32]
  1121. get_pcvar_string(cvar_gamedescription, GameName, 31)
  1122.  
  1123. forward_return(FMV_STRING, GameName)
  1124.  
  1125. return FMRES_SUPERCEDE
  1126. }
  1127.  
  1128. public TASK_CanPlant() {
  1129. CanPlant = true;
  1130. set_hudmessage(random(255), random(255), random(255), -1.0, -1.0, 1, 3.1, 3.0)
  1131. show_hudmessage(0, "Furienii pot planta bomba!")
  1132. }
  1133.  
  1134. public TASK_C4_CountDown() {
  1135. new Red, Green, Blue
  1136. if(C4_CountDownDelay > 10)
  1137. Red = 0, Green = 255, Blue = 0;
  1138. else if(C4_CountDownDelay > 5)
  1139. Red = 255, Green = 200, Blue = 0;
  1140. else if(C4_CountDownDelay <= 5)
  1141. Red = 255, Green = 0, Blue = 0;
  1142.  
  1143. if(C4_CountDownDelay) {
  1144. new Message[256];
  1145. formatex(Message,sizeof(Message)-1,"----------^n| C4: %d |^n----------", C4_CountDownDelay);
  1146.  
  1147. set_hudmessage(Red, Green, Blue, -1.0, 0.78, 0, 6.0, 1.0)
  1148. show_hudmessage(0, "%s", Message)
  1149. set_task(1.0, "TASK_C4_CountDown", TASKID_C4COUNTDOWN);
  1150. C4_CountDownDelay--;
  1151. }
  1152. else if(!C4_CountDownDelay)
  1153. C4_CountDownDelay = 0;
  1154. }
  1155.  
  1156. stock ColorChat(const id, const input[], any:...) {
  1157. new count = 1, players[32];
  1158. static msg[191];
  1159. vformat(msg, 190, input, 3);
  1160.  
  1161. replace_all(msg, 190, "!g", "^4");
  1162. replace_all(msg, 190, "!y", "^1");
  1163. replace_all(msg, 190, "!t", "^3");
  1164.  
  1165. if(id) players[0] = id;
  1166. else get_players(players, count, "ch"); {
  1167. for(new i = 0; i < count; i++) {
  1168. if(is_user_connected(players[i])) {
  1169. message_begin(MSG_ONE_UNRELIABLE, MSGID_SayText, _, players[i]);
  1170. write_byte(players[i]);
  1171. write_string(msg);
  1172. message_end();
  1173. }
  1174. }
  1175. }
  1176. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement