hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2025.06.16. 19:42



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: Bing [Bot], 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: Kempert utes
HozzászólásElküldve:2012.11.24. 12:43 
Offline
Beavatott

Csatlakozott:2012.08.19. 11:45
Hozzászólások:73
Megköszönt másnak: 19 alkalommal
Megköszönték neki: 1 alkalommal
Hello :D

Kellene nekem egy olyan plugin ami, ha egy játékos 10 mp nél tovább egy helyben áll, akkor megüsse 0 sebzéssel ameddig tovább nem áll..


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Kempert utes
HozzászólásElküldve:2012.11.24. 13:51 
Offline
Veterán

Csatlakozott:2012.11.01. 20:49
Hozzászólások:1837
Megköszönt másnak: 25 alkalommal
Megköszönték neki: 78 alkalommal
paintballer írta:
Hello :D

Kellene nekem egy olyan plugin ami, ha egy játékos 10 mp nél tovább egy helyben áll, akkor megüsse 0 sebzéssel ameddig tovább nem áll..


Köszönd is meg :D
Müködik :D
***EDIT***
SMA Forráskód: [ Mindet kijelol ]
  1. /*
  2. Title: Bad Camper
  3. Author: Brad Jones
  4.  
  5. Current Version: 1.4.239
  6. Release Date: 2008-JUL-21
  7.  
  8. This plugin will automatically punish players who camp for too long.
  9.  
  10. There can be a combination of punishments that get applied to the player. Punishments
  11. start when the player's camping meter reaches 80%. They get worse at 90%. They finally
  12. come to a crescendo at 100%.
  13.  
  14. This plugin to be the successor to the great AntiCamping Advanced plugin.
  15.  
  16. Original design inspiration, many concepts, and code came from "AntiCamping Advanced".
  17.  
  18.  
  19. INSTALLATION
  20.  
  21. File Locations:
  22.  
  23. .\gamemod\addons\amxmodx\plugins\bad_camper.amxx
  24.  
  25. Modules:
  26.  
  27. fun (required)
  28. cstrike (required only if utilizing money reduction punishment)
  29. csx (required if running Counter-Strike or Counter-Strike: Condition Zero)
  30. dodx (required if running DoD)
  31. tfcx (required if running TFC)
  32.  
  33.  
  34. OPTIONS (CVARs)
  35.  
  36. badcamper_punish <iFlags>
  37.  
  38. Specifies how a player is to be punished when they camp too long.
  39. A value of 0 will disable this plugin.
  40.  
  41. The flags are additive.
  42. 1: Slap
  43. 2: Health Reduction
  44. 4: Sound (set sound via "badcamper_sound" CVAR)
  45. 8: Blind
  46. 16: Money Reduction (requires CSTRIKE module)
  47. 32: Snark Attack (requires Monster Mod)
  48.  
  49. The default is 12 (snore and blind).
  50.  
  51. badcamper_sound <iFlag>
  52.  
  53. Specifies the sound to use as a punishment when the "badcamper_punish" flag includes
  54. the sound punishment.
  55.  
  56. 1: Snore
  57. 2: Heartbeat
  58.  
  59. The default is 1.
  60.  
  61. badcamper_money <iPercentage>
  62.  
  63. Specifies the percentage of money taken away when a player's meter reaches 100% when
  64. using the "money reduction" punishment.
  65.  
  66. The default is 10 percent.
  67.  
  68. badcamper_limit <iSeconds>
  69.  
  70. Specifies the number of seconds a player can camp in one spot before their
  71. camping meter will reach 100%.
  72.  
  73. The default is 35 seconds.
  74.  
  75. badcamper_display <iPercentage>
  76.  
  77. Specifies the percentage at which the meter is displayed to the player.
  78. Valid values range from 0 (never show) to 100.
  79.  
  80. The default is 1 percent.
  81.  
  82. badcamper_show_spec <0|1>
  83.  
  84. Specifies whether to allow spectators to see other player's meters.
  85.  
  86. The default is 1, to allow it.
  87.  
  88. badcamper_check_all <0|1>
  89.  
  90. Specifies whether only the team with the current primary objective should be
  91. checked for camping or if both teams should.
  92.  
  93. 0: only check the team with the current primary objective
  94. 1: always check both teams
  95.  
  96. The default is 1.
  97.  
  98. The current primary objective is defined as follows:
  99.  
  100. - if the map is not a "de" map, the CTs have the primary objective
  101. - if the map is a "de" map and the bomb hasn't been planted, the Ts have the primary objective
  102. - if the map is a "de" map and the bomb has been planted, the CTs have the primary objective
  103.  
  104. badcamper_immunity_flags <cAccessLevels>
  105.  
  106. Specifies the access level flags needed for a player to have immunity. Immunity is achieved by
  107. standing completely still and not looking around for approximately 6 seconds. The camp meter
  108. will still increase until it reaches 65% or more at which time it'll stop until they move or
  109. look around again. If the meter is already at 80% or higher, the meter won't stop.
  110.  
  111. Set this CVAR to blank to disallow immunity.
  112.  
  113.  
  114. The default is blank (no immunity).
  115.  
  116. A common value, when admin immunity is desired, is to use the "a" flag (ADMIN_IMMUNITY).
  117.  
  118. badcamper_start <iSeconds>
  119.  
  120. Specifies how many seconds after the freeze time ends each round that the
  121. meter will start.
  122.  
  123. The default is 4 seconds.
  124.  
  125. Note that camping is checked every 2 seconds so any value you put in here will
  126. effectively be rounded as such.
  127.  
  128. badcamper_damage_reset <iResetType>
  129.  
  130. Specifies if the attacker's or defender's meter gets reset when the player is
  131. injured by another.
  132.  
  133. 0: No meters are reset.
  134. 1: The attacker's meter is reset.
  135. 2: The defender's meter is reset.
  136. 3: Both meters are reset.
  137.  
  138. The default is 3.
  139.  
  140. badcamper_damage_restart <iSeconds>
  141.  
  142. Specifies how many seconds after a player either gives or receives damage that the
  143. meter will restart.
  144.  
  145. The default is 4 seconds.
  146.  
  147. Note that camping is checked every 2 seconds so any value you put in here will
  148. effectively be rounded up as such.
  149.  
  150. badcamper_health <iHealthPoints>
  151.  
  152. Specifies how many points of health to remove from the player every 2 seconds
  153. once their meter reaches 100%.
  154.  
  155. The default is 10 health points.
  156.  
  157. badcamper_allow <iPlayerCount|iPlayerPercent%>
  158.  
  159. Specifies when a team that is being checked for camping is allowed to camp.
  160. A value of 0 doesn't allow a team to camp.
  161.  
  162. The default is 0.
  163.  
  164. The value can either be expressed as a straight count or as a percentage.
  165. If the value is being expressed as a percentage, "%" has to follow the value.
  166. Examples below. If the value is a count, players can camp when the number of
  167. living players on their team falls to this value or lower. If the value is a
  168. percentage, players can camp when the percentage of living players on their team
  169. is at this value or lower when compared to the living players on the other team.
  170.  
  171. Examples:
  172.  
  173. badcamper_allow 2
  174.  
  175. Pretty straight-forward. Once there are 2 or fewer players left alive on
  176. your team, you can camp.
  177.  
  178. badcamper_allow 40%
  179.  
  180. More powerful and complex. Once your team comprises of living players that
  181. is 40% or less than the number of living players on the other team, you can
  182. camp. For instance (assume your team is listed first) the following match-ups
  183. would allow your team to camp: 1v4, 2v5, 3v8, 4v12, 5v13, 6v15.
  184.  
  185. badcamper_min_players <players>
  186.  
  187. Specifies the minimum number of players that have to be connected to the server
  188. before players are allowed to camp.
  189.  
  190. The default is 0 players.
  191.  
  192. This CVAR affects both "badcamper_check_all" and "badcamper_allow" functionality.
  193.  
  194. badcamper_announce <announcementType>
  195.  
  196. Specifies how to announce to the opposite team that a player is camping.
  197.  
  198. 0: Make no announcement.
  199. 1: Announce via chat.
  200. 2: Announce via HUD.
  201. 3: Announce via chat and HUD.
  202.  
  203. The default is 3.
  204.  
  205.  
  206. COMMANDS
  207.  
  208. badcamper list
  209.  
  210. Lists the punishments in the console and indicates which of them are active.
  211.  
  212.  
  213. CHANGE LOG
  214.  
  215. 2008-JUL-21 1.4.239
  216.  
  217. ! Compatible with AMXX 1.80 or higher only.
  218. - Fixed issue where the spectator meter would display in the spectated player's language
  219. rather than the spectator's language.
  220.  
  221. 2007-AUG-04 1.4
  222.  
  223. - Added CVAR to aid in debugging; allows meter to run when only one person is on server.
  224. - Removed BugBlatter's "Monster Mod" support. Rationale being that players could crash
  225. your server by typing "meta list" in their console when using it.
  226. - All snarks are now killed at the end of each round, if using Snark punishment.
  227. - Fixed discrepancy between documentation and code. Changed "badcamper_announce" CVAR to
  228. default to 3, as per the documenation.
  229. - Fixed issue where HLTV was counting as a player, thus affecting when camping is checked.
  230. - The camp meter will now affect bots that camp.
  231. Oh, and if your bot camps, you need a new bot or better waypoint files.
  232. - Fixed discrepancy between documenation and code. Changed who can camp (based on
  233. objectives) when not on a map with a bomb site. Changed from everyone can to only Ts can.
  234.  
  235. 2007-APR-03 1.3b
  236.  
  237. - Fixed issue where screen would go sideways if health reduction punishment was used.
  238.  
  239. 2007-APR-02 1.3a
  240.  
  241. - Fixed dumb bug that kinda broke everything else.
  242. Note to self: Don't make changes right before releasing.
  243.  
  244. 2007-APR-02 1.3
  245.  
  246. ! Compatible with AMXX 1.71 or higher only.
  247. ! The 'csx', 'dodx', or 'tfcx' module has to be enabled, depending on what
  248. game mod you are running.
  249. - Added DoD (tested) and TFC (untested) mod support.
  250. - Made more code optimizations.
  251. - Defuser's meter will now be paused when bomb is being defused.
  252. - Planter's meter will be more accurately paused than in previous versions.
  253. Previous versions would pause the player's meter for the full time it would
  254. take to plant the bomb, even if they stopped planting in the meantime.
  255. - Altered method of specifying admin immunity from define to CVAR.
  256. - Replaced badcamper_immunity CVAR with badcamper_immunity_flags.
  257. - Fixed overlapping "so and so is now camping" messages.
  258. - Added option to allow spectators to see players' meters. Default is to show the meter.
  259. - Fixed meter not always obeying "based on objectives" team. (thanks sasdad and arkshine!)
  260. - Fixed issue with ATAC 3.x whereas the health reduction could cause a player to get TAs.
  261.  
  262. 2006-MAR-12 1.2
  263.  
  264. ! Compatible with AMXX 1.70 or higher only.
  265. ! The 'fakemeta' module needs to be enabled.
  266. - Fixed issue where round end cleanup would not be performed if the round
  267. was restarted as opposed to ending normally.
  268. - Fixed "index out of bounds" error.
  269. - Auto-detects if you're using the supplied "Monster" metamod. If you are using
  270. a different version of "Monster", reverts to less fine control over snarks.
  271. - Removed need to recompile if using this plugin in a game mod other than
  272. Counter-Strike.
  273. - Removed need to recompile if using the "Snark Attack" punishment. Now, if you
  274. indicate to use "snark attack" as a punishment, but you don't have "Monster"
  275. installed, you'll get errors in your log files.
  276. - Disabled meter when there is only one person on the server. This is useful
  277. for when you want to sit on your server while waiting for others to join.
  278. - Implemented more accurate way of detecting if the map was a bomb map.
  279. - Optimized the code to use less CPU usage.
  280.  
  281. 2005-DEC-10 1.1
  282.  
  283. - Added "Snark attack" punishment. Requires "Monster Mod" to be installed.
  284. - Changed "Slap" punishment to increase in power as the meter gets higher.
  285. Note that when slapped, the player may actually get slapped far enough
  286. that it would lower the player's meter.
  287. - Added "badcamper_money" CVAR to specify what percentage of money to take
  288. away at 100% when using the "money reduction" punishment. Defaults to
  289. 10% as was the case before the option was introduced.
  290. - Added "badcamper_damage_reset" CVAR flag that specifies the meter(s) to
  291. reset when a player is attacked. Defaults to both attacker and defender
  292. having their meter reset as was the case before the option was introduced.
  293. - Replaced "snore" punishment with "sound" punishment. The type of sound can
  294. be defined by a new CVAR, "badcamper_sound". There are two types of
  295. sounds, "snore" (default value) and "heartbeat".
  296. - Fixed bug where if a player's meter was 100% and the blind punishment was
  297. being used, when the player attacked or was attacked by another, the blind
  298. player would stay blind instead of regaining vision immediately.
  299. - Added "badcamper list" command that lists available punishments and
  300. indicates which are currently active (active as per the badcamper_punish CVAR).
  301. - Added "badcamper_announce" CVAR flag to indicate how to announce that a player
  302. is camping and then when the player stops camping. Will announce the
  303. name of the camper at 90% and then again when the meter gets below 80%.
  304. Options are to print as chat, as a HUD message, both, or neither.
  305. - Fixed bug where the CVAR 'badcamper_allow' had no effect, thus if set to a
  306. value higher than 0 a team would still never be allowed to camp.
  307.  
  308. 2005-SEP-24 1.0
  309.  
  310. - Initial release.
  311.  
  312. */
  313.  
  314.  
  315. #include <amxmodx>
  316. #include <amxmisc>
  317. #include <fakemeta>
  318. #include <fun>
  319. #include <cstrike> // don't worry if you're not running cstrike, it's all good
  320. #include <csx> // don't worry if you're not running cstrike, it's all good
  321.  
  322. #pragma semicolon 1
  323.  
  324. #define TASKID_CHECK_CAMPING 85809473
  325.  
  326. #define DBG_METER_ON_1 1
  327.  
  328. #define SND_STOP (1<<5)
  329.  
  330. #define TEAM1 1
  331. #define TEAM2 2
  332.  
  333. // Player Flags
  334. #define METER_PAUSE 1
  335. #define METER_IGNORE 2
  336. #define PLAYER_BLIND 4
  337. #define PLAYER_SOUND 8
  338. #define CAMPER_ANNOUNCED 16
  339.  
  340. #define FADE_IN (1<<0)
  341. #define FADE_OUT (1<<1)
  342. #define FADE_HOLD (1<<2)
  343.  
  344. #define FADE_LENGTH_PERM (1<<0)
  345.  
  346. #define PUNISH_SLAP 1
  347. #define PUNISH_HEALTH 2
  348. #define PUNISH_SOUND 4
  349. #define PUNISH_BLIND 8
  350. #define PUNISH_MONEY 16
  351. #define PUNISH_SNARKS 32
  352.  
  353. #define ANNOUNCE_CHAT 1
  354. #define ANNOUNCE_HUD 2
  355.  
  356. #define SOUNDTYPE_SNORE 1
  357. #define SOUNDTYPE_HEARTBEAT 2
  358.  
  359. #define DMG_RESET_DEFENDER 1
  360. #define DMG_RESET_ATTACKER 2
  361.  
  362. #define TOLERANCE_DEFENDING 180
  363. #define TOLERANCE_ATTACKING 220
  364.  
  365. #define MAX_PLAYER_CNT 32
  366. #define MAX_COORDTYPE_CNT 2
  367. #define MAX_VECTOR_CNT 4
  368. #define MAX_COORD_CNT 3
  369.  
  370. #define COORDTYPE_BODY 0
  371. #define COORDTYPE_EYES 1
  372.  
  373. new g_coordsBody[MAX_PLAYER_CNT + 1][MAX_VECTOR_CNT][MAX_COORD_CNT];
  374. new g_coordsEyes[MAX_PLAYER_CNT + 1][MAX_VECTOR_CNT][MAX_COORD_CNT];
  375. new g_meter[MAX_PLAYER_CNT + 1], g_playerFlags[MAX_PLAYER_CNT + 1], g_snarkCnt[MAX_PLAYER_CNT + 1];
  376. new g_bombPlanter, bool:g_bombPlanted;
  377. new g_bombDefuser;
  378. new g_msgFade, g_mapHasBomb;
  379. new g_cstrike;
  380. new g_immunityFlags[32];
  381. new g_maxPlayers;
  382. new g_campMeterMsgSync, g_isCampingMsgSync;
  383.  
  384. // declare CVAR pointers
  385. new g_cvarDebug, g_cvarPunish, g_cvarLimit, g_cvarDisplay, g_cvarCheckAll, g_cvarShowSpec;
  386. new g_cvarStart, g_cvarDamageReset, g_cvarDamageRestart, g_cvarHealth, g_cvarMoney;
  387. new g_cvarMinPlayers, g_cvarAllow, g_cvarAnnounce, g_cvarSound, g_cvarImmunityFlags;
  388.  
  389. public plugin_natives()
  390. {
  391. set_module_filter("filter_module");
  392. set_native_filter("filter_native");
  393. }
  394.  
  395. public filter_module(const module[])
  396. {
  397. return (equal(module, "cstrike") || equal(module, "csx")) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
  398. }
  399.  
  400. public filter_native(const name[], index, trap)
  401. {
  402. return (!trap) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
  403. }
  404.  
  405. public plugin_precache()
  406. {
  407. if (get_cvar_num("badcamper_sound") & SOUNDTYPE_SNORE) precache_sound("misc/snore.wav");
  408. precache_sound("player/heartbeat1.wav");
  409.  
  410. return PLUGIN_CONTINUE;
  411. }
  412.  
  413. public plugin_init()
  414. {
  415. new pluginVersion[] = "1.4 beta";
  416.  
  417. register_plugin("Bad Camper", pluginVersion, "Brad Jones");
  418.  
  419. register_cvar("badcamper_version", pluginVersion, FCVAR_SERVER|FCVAR_SPONLY);
  420. g_cvarDebug = register_cvar("badcamper_debug", "0");
  421.  
  422. register_dictionary("bad_camper.txt");
  423.  
  424. register_concmd("badcamper", "cmd_list", ADMIN_CVAR, "- lists available punishments and indicates which are active");
  425.  
  426. g_cvarPunish = register_cvar("badcamper_punish", "12"); // is camping to be punished and if so, how
  427. g_cvarLimit = register_cvar("badcamper_limit", "35"); // seconds allowed to camp
  428. g_cvarDisplay = register_cvar("badcamper_display", "1"); // at what percentage to display meter
  429. g_cvarCheckAll = register_cvar("badcamper_check_all", "1"); // check both teams or just team with primary objective
  430. g_cvarStart = register_cvar("badcamper_start", "4.0"); // number of seconds after the start of a round that the meter starts
  431. g_cvarDamageReset = register_cvar("badcamper_damage_reset", "3"); // flag that indicates which meter(s) get reset upon a player attack
  432. g_cvarDamageRestart = register_cvar("badcamper_damage_restart", "4.0"); // number of seconds after giving or taking damage that the meter restarts
  433. g_cvarHealth = register_cvar("badcamper_health", "10"); // health taken if 'health reduction' punishment flag set (at 100% camp meter)
  434. g_cvarMoney = register_cvar("badcamper_money", "10"); // percentage of player's money taken if 'money reduction' punishment flag set (at 100% camp meter)
  435. g_cvarMinPlayers = register_cvar("badcamper_min_players", "0"); // minimum players before camping is allowed
  436. g_cvarAllow = register_cvar("badcamper_allow", "0"); // when is camping allowed
  437. g_cvarAnnounce = register_cvar("badcamper_announce", "3"); // announce a player's camping status
  438. g_cvarSound = register_cvar("badcamper_sound", "1"); // type of sound to play when "badcamper_punish" includes the sound punishment
  439. g_cvarImmunityFlags = register_cvar("badcamper_immunity_flags", ""); // which access levels have immunity
  440. g_cvarShowSpec = register_cvar("badcamper_show_spec", "1"); // let spectators see a player's meter?
  441. }
  442.  
  443. public plugin_cfg()
  444. {
  445. g_msgFade = get_user_msgid("ScreenFade");
  446. g_maxPlayers = get_maxplayers();
  447. g_isCampingMsgSync = CreateHudSyncObj();
  448. g_campMeterMsgSync = CreateHudSyncObj();
  449.  
  450. get_pcvar_string(g_cvarImmunityFlags, g_immunityFlags, 31);
  451.  
  452. if (module_exists("cstrike"))
  453. {
  454. g_cstrike = true;
  455.  
  456. // register_event("StatusValue","set_spec_target","bd","1=2"); // from Kost
  457. register_event("SpecHealth2", "meter_display_spec_clear", "bd");
  458. register_event("BarTime", "event_bartime", "b");
  459. register_event("HLTV", "event_new_round", "a", "1=0", "2=0");
  460. register_logevent("event_round_start", 2, "1=Round_Start");
  461. register_logevent("event_round_end", 2, "1=Round_End");
  462. register_logevent("event_round_end", 2, "1&Restart_Round_");
  463.  
  464. g_mapHasBomb = engfunc(EngFunc_FindEntityByString,-1, "classname", "func_bomb_target");
  465. }
  466. else if (module_exists("dodx"))
  467. {
  468. register_event("RoundState", "event_round_start", "a", "1=1");
  469. register_event("RoundState", "event_round_end", "a", "1>2");
  470. register_event("ResetSens", "flags_reset", "b");
  471. }
  472. }
  473.  
  474. public cmd_list(id, level, cid)
  475. {
  476. if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED;
  477.  
  478. new punishmentFlags = get_pcvar_num(g_cvarPunish);
  479. new punishSlap[32], punishHealth[32], punishSound[32], punishBlind[32], punishMoney[32], punishSnarks[32];
  480.  
  481. // List each of the punishments available and indicate which of them are currently active.
  482. formatex(punishSlap, 31, "%5i %-1.1s%L", 1, (punishmentFlags & PUNISH_SLAP) ? "*" : "", LANG_SERVER, "PUNISH_SLAP") ;
  483. formatex(punishHealth, 31, "%5i %-1.1s%L", 2, (punishmentFlags & PUNISH_HEALTH) ? "*" : "", LANG_SERVER, "PUNISH_HEALTH");
  484. formatex(punishSound, 31, "%5i %-1.1s%L (%L)", 4, (punishmentFlags & PUNISH_SOUND) ? "*" : "", LANG_SERVER, "PUNISH_SOUND", LANG_SERVER, (get_pcvar_num(g_cvarSound) & SOUNDTYPE_SNORE) ? "SOUND_SNORE" : "SOUND_HEART");
  485. formatex(punishBlind, 31, "%5i %-1.1s%L", 8, (punishmentFlags & PUNISH_BLIND) ? "*" : "", LANG_SERVER, "PUNISH_BLIND");
  486. formatex(punishMoney, 31, "%5i %-1.1s%L", 16, (punishmentFlags & PUNISH_MONEY) ? "*" : "", LANG_SERVER, "PUNISH_MONEY");
  487. formatex(punishSnarks, 31, "%5i %-1.1s%L", 32, (punishmentFlags & PUNISH_SNARKS) ? "*" : "", LANG_SERVER, "PUNISH_SNARKS");
  488.  
  489. if (id)
  490. {
  491. client_print(id, print_console, "%s", punishSlap);
  492. client_print(id, print_console, "%s", punishHealth);
  493. client_print(id, print_console, "%s", punishSound);
  494. client_print(id, print_console, "%s", punishBlind);
  495. client_print(id, print_console, "%s", punishMoney);
  496. client_print(id, print_console, "%s", punishSnarks);
  497. }
  498. else
  499. {
  500. server_print("%s", punishSlap);
  501. server_print("%s", punishHealth);
  502. server_print("%s", punishSound);
  503. server_print("%s", punishBlind);
  504. server_print("%s", punishMoney);
  505. server_print("%s", punishSnarks);
  506. }
  507. return PLUGIN_HANDLED;
  508. }
  509.  
  510. public check_camping()
  511. {
  512. /* don't check, if the plugin is disabled */
  513. new punishmentFlags = get_pcvar_num(g_cvarPunish);
  514. if (punishmentFlags == 0) return;
  515.  
  516. /* don't check, if there is only one player on server */
  517. new players[32], playerCnt;
  518. get_players(players, playerCnt, "ch"); // don't include bots or hltv
  519. if (playerCnt == 1 && !(get_pcvar_num(g_cvarDebug) && DBG_METER_ON_1)) return;
  520.  
  521. /* determine acceptable camping values */
  522. new allowCampValue = get_pcvar_num(g_cvarAllow);
  523. new s_allowCampValue[8];
  524. new bool:allowCampByRatio;
  525.  
  526. if (allowCampValue > 0)
  527. {
  528. get_pcvar_string(g_cvarAllow, s_allowCampValue, 7);
  529. allowCampByRatio = (contain(s_allowCampValue, "%") ==-1) ? false : true;
  530. allowCampValue = (allowCampByRatio) ? clamp(allowCampValue, 1, 100) : clamp(allowCampValue, 1, 32);
  531. }
  532.  
  533. /* determine if either team is allowed to camp */
  534. new bool:allowTeamCamp[3] = {false, ...}; // using elements 1 and 2 to correspond to the values for TEAM1 and TEAM2
  535. new playerCnt_team1, playerCnt_team2, teamID, id;
  536.  
  537. get_players(players, playerCnt, "h"); // don't include hltv
  538. if (playerCnt >= get_pcvar_num(g_cvarMinPlayers))
  539. {
  540. // based on their objective ...
  541. if (!get_pcvar_num(g_cvarCheckAll) && g_cstrike)
  542. {
  543. if (!g_mapHasBomb)
  544. allowTeamCamp[TEAM1] = true;
  545. else if (g_bombPlanted)
  546. allowTeamCamp[TEAM1] = true;
  547. else
  548. allowTeamCamp[TEAM2] = true;
  549. }
  550.  
  551. // ... and based on calculated camp allowance
  552. if (allowCampValue > 0)
  553. {
  554. // get living player counts for each team
  555. get_players(players, playerCnt, "ah"); // skip dead players and hltv
  556. for (new playerIdx = 0; playerIdx < playerCnt; ++playerIdx)
  557. {
  558. id = players[playerIdx];
  559. teamID = get_user_team(id);
  560. if (teamID == TEAM1)
  561. playerCnt_team1++;
  562. else if (teamID == TEAM2)
  563. playerCnt_team2++;
  564. }
  565.  
  566. if (allowCampByRatio)
  567. {
  568. // allow camp per ratio of players on player's team to players on other team
  569. if (!allowTeamCamp[TEAM1]) allowTeamCamp[TEAM1] = allowCampValue >= percent(playerCnt_team1, playerCnt_team2);
  570. if (!allowTeamCamp[TEAM2]) allowTeamCamp[TEAM2] = allowCampValue >= percent(playerCnt_team2, playerCnt_team1);
  571. }
  572. else
  573. {
  574. // allow camp per straight player count
  575. if (!allowTeamCamp[TEAM1]) allowTeamCamp[TEAM1] = (allowCampValue >= playerCnt_team1);
  576. if (!allowTeamCamp[TEAM2]) allowTeamCamp[TEAM2] = (allowCampValue >= playerCnt_team2);
  577. }
  578. }
  579. }
  580.  
  581. /* handle each player's camping needs */
  582. new stdDev, campTolerance;
  583. new prevMeter, bool:punishCamper, Float:punishPercentage;
  584. new announceCampStatus = get_pcvar_num(g_cvarAnnounce);
  585.  
  586. get_players(players, playerCnt, "ah"); // skip dead players and hltv
  587. for (new playerIdx = 0; playerIdx < playerCnt; ++playerIdx)
  588. {
  589. id = players[playerIdx];
  590.  
  591. // pause the meter (don't cycle coords) if needed
  592. if (g_playerFlags[id] & METER_PAUSE) continue;
  593.  
  594. // insert the current location of the player
  595. coords_insert(id, COORDTYPE_BODY);
  596.  
  597. // ignore the meter if the player can legally camp or the player's meter is being ignored
  598. teamID = get_user_team(id);
  599. if (allowTeamCamp[teamID] || g_playerFlags[id] & METER_IGNORE) continue;
  600.  
  601. // ignore if this player meets the immunity requirements
  602. if (has_flag(id, g_immunityFlags))
  603. {
  604. // insert the current coords of where the player's shot would hit, i.e. where the player is looking
  605. coords_insert(id, COORDTYPE_EYES);
  606.  
  607. if (standing_still(id) && !looking_around(id) && g_meter[id] >= 65 && g_meter[id] < 80) continue;
  608. }
  609.  
  610. // grab the standard deviation from the player coords
  611. stdDev = coords_stdv(id);
  612.  
  613. // grab the camping tolerance based on current objective
  614. campTolerance = (!g_mapHasBomb || g_bombPlanted) ? TOLERANCE_ATTACKING : TOLERANCE_DEFENDING;
  615.  
  616. // grab the current meter percentage
  617. prevMeter = g_meter[id];
  618.  
  619. // add new percentage points to the meter
  620. g_meter[id] += (campTolerance- stdDev) / get_pcvar_num(g_cvarLimit);
  621.  
  622. // ensure the meter falls within bounds
  623. g_meter[id] = clamp(g_meter[id], 0, 100);
  624.  
  625. // if the meter is trending down, give the player some love
  626. if (g_meter[id] < prevMeter)
  627. {
  628. if (g_meter[id] < 80)
  629. {
  630. // help the meter find it's way down
  631. g_meter[id]-= (prevMeter- g_meter[id]) / 3;
  632.  
  633. if (prevMeter >= 80)
  634. {
  635. // ensure player isn't still being punished
  636. punish_stop_all(id);
  637.  
  638. // announce that the player is no longer camping
  639. if (announceCampStatus && g_playerFlags[id] & CAMPER_ANNOUNCED) camper_announcement(id, false);
  640. }
  641. }
  642. }
  643.  
  644. // determine how severe the punishment should be, if at all
  645. punishCamper = true; // now prove me wrong
  646. if (g_meter[id] == 100) punishPercentage = 1.00;
  647. else if (g_meter[id] >= 90) punishPercentage = 0.50;
  648. else if (g_meter[id] >= 80) punishPercentage = 0.10;
  649. else punishCamper = false;
  650.  
  651. // punish the vile camper
  652. if (punishCamper)
  653. {
  654. if (punishmentFlags & PUNISH_SLAP) punish_slap(id, punishPercentage);
  655. if (punishmentFlags & PUNISH_HEALTH) punish_health_reduction(id, punishPercentage);
  656. if (punishmentFlags & PUNISH_BLIND) punish_blind(id, punishPercentage);
  657. if (punishmentFlags & PUNISH_SOUND) punish_sound(id, punishPercentage);
  658. if (punishmentFlags & PUNISH_MONEY) punish_money_reduction(id, punishPercentage);
  659. if (punishmentFlags & PUNISH_SNARKS) punish_snark_attack(id, punishPercentage);
  660.  
  661. // announce that the player is camping
  662. if (g_meter[id] >= 90 && !(g_playerFlags[id] & CAMPER_ANNOUNCED)) camper_announcement(id, true);
  663. }
  664.  
  665. // let them know how long they've camped
  666. meter_display(id);
  667. }
  668. }
  669.  
  670. camper_announcement(id, bool:isCamping)
  671. {
  672. // announce to the opposite team this player's camping status
  673. new camperName[32];
  674. get_user_name(id, camperName, 31);
  675.  
  676. new camperTeam = get_user_team(id);
  677.  
  678. new announcementType = get_pcvar_num(g_cvarAnnounce);
  679. if (announcementType)
  680. {
  681. new msgAnnouncement[16];
  682. copy(msgAnnouncement, 15, (isCamping) ? "CAMPING_STARTED" : "CAMPING_STOPPED");
  683.  
  684. new playerId, announcement[64];
  685.  
  686. for (playerId = 1; playerId <= g_maxPlayers; playerId++)
  687. {
  688. if (is_user_connected(playerId) && get_user_team(playerId) != camperTeam)
  689. {
  690. formatex(announcement, 63, "%L", playerId, msgAnnouncement, camperName);
  691.  
  692. if (announcementType & ANNOUNCE_CHAT)
  693. client_print(playerId, print_chat, "[BADCAMPER] %s", announcement);
  694.  
  695. if (announcementType & ANNOUNCE_HUD)
  696. {
  697. set_hudmessage(100, 100, 255,-1.0, 0.88, 0, 1.0, 6.0, 0.1, 0.1,-1);
  698. ShowSyncHudMsg(playerId, g_isCampingMsgSync, "%s", announcement);
  699. }
  700. }
  701. }
  702. g_playerFlags[id] += (isCamping) ? CAMPER_ANNOUNCED :-CAMPER_ANNOUNCED;
  703. }
  704. }
  705.  
  706. punish_health_reduction(id, Float:punishPercentage)
  707. {
  708. set_pev(id, pev_dmg_inflictor, id);
  709. // set_pev(id, pev_health, get_user_health(id)- floatround(get_pcvar_float(g_cvarHealth) * punishPercentage)); <-- apparently this does bad things
  710. set_user_health(id, get_user_health(id)- floatround(get_pcvar_float(g_cvarHealth) * punishPercentage));
  711. }
  712.  
  713. punish_sound(id, Float:punishPercentage)
  714. {
  715. new soundFile[32];
  716. formatex(soundFile, 31, (get_pcvar_num(g_cvarSound) & SOUNDTYPE_SNORE) ? "misc/snore.wav" : "player/heartbeat1.wav");
  717.  
  718. emit_sound(id, CHAN_VOICE, soundFile, punishPercentage, ATTN_NORM, 0, PITCH_NORM);
  719. if (!(g_playerFlags[id] & PLAYER_SOUND)) g_playerFlags[id] += PLAYER_SOUND;
  720. }
  721.  
  722. punish_sound_stop(id)
  723. {
  724. new soundFile[32];
  725. formatex(soundFile, 31, (get_pcvar_num(g_cvarSound) & SOUNDTYPE_SNORE) ? "misc/snore.wav" : "player/heartbeat1.wav");
  726.  
  727. emit_sound(id, CHAN_VOICE, soundFile, 0.0, ATTN_NORM, 0, PITCH_NORM);
  728. if (g_playerFlags[id] & PLAYER_SOUND) g_playerFlags[id]-= PLAYER_SOUND;
  729. }
  730.  
  731. punish_slap(id, Float:punishPercentage)
  732. {
  733. for (new slapCnt = 1; slapCnt <= floatround(3.0 * punishPercentage, floatround_ceil); slapCnt++)
  734. user_slap(id, 0);
  735. }
  736.  
  737. punish_money_reduction(id, Float:punishPercentage)
  738. {
  739. if (g_cstrike)
  740. {
  741. new Float:lossPercentage = (get_pcvar_float(g_cvarMoney) / 100.0) * punishPercentage;
  742. new Float:currentMoney = float(cs_get_user_money(id));
  743. new reducedMoney = floatround(currentMoney- (currentMoney * lossPercentage));
  744. cs_set_user_money(id, reducedMoney);
  745. }
  746. }
  747.  
  748. public meter_display(id)
  749. {
  750. new displayMeter = get_pcvar_num(g_cvarDisplay);
  751.  
  752. if (displayMeter > 0 && g_meter[id] >= displayMeter)
  753. {
  754. new r, g, b;
  755.  
  756. if (g_meter[id] > 90)
  757. r = 255;
  758. else if (g_meter[id] > 80)
  759. {
  760. r = 255;
  761. g = 100;
  762. }
  763. else if (g_meter[id] > 50)
  764. {
  765. r = 255;
  766. g = 255;
  767. }
  768. else if (g_meter[id] > 20)
  769. g = 255;
  770. else
  771. b = 255;
  772.  
  773. set_hudmessage(r, g, b,-1.0, 0.85, 0, 1.0, 2.0, 0.1, 0.1,-1);
  774. ShowSyncHudMsg(id, g_campMeterMsgSync, "%L", id, "CAMP_METER", g_meter[id]);
  775.  
  776. // if allowed and there's anyone specing this player, go ahead and show them the meter too
  777. if (g_cvarShowSpec)
  778. {
  779. new playerCnt, players[MAX_PLAYER_CNT], id_spectator;
  780. get_players(players, playerCnt, "bch"); // skip alive players, bots, and hltv
  781. for (new playerIdx = 0; playerIdx < playerCnt; ++playerIdx)
  782. {
  783. id_spectator = players[playerIdx];
  784.  
  785. if (pev(id_spectator, pev_iuser2) == id)
  786. {
  787. ShowSyncHudMsg(id_spectator, g_campMeterMsgSync, "%L", id_spectator, "CAMP_METER", g_meter[id]);
  788. }
  789. }
  790. }
  791. }
  792. }
  793.  
  794. public standing_still(id)
  795. {
  796. return vectors_same(id, COORDTYPE_BODY);
  797. }
  798.  
  799. public looking_around(id)
  800. {
  801. return !vectors_same(id, COORDTYPE_EYES);
  802. }
  803.  
  804. public vectors_same(id, coordType)
  805. {
  806. new curCoords[MAX_COORD_CNT], coordIdx;
  807.  
  808. // grab the current coordinates
  809. for (coordIdx = 0; coordIdx < MAX_COORD_CNT; ++coordIdx)
  810. curCoords[coordIdx] = (coordType == COORDTYPE_BODY) ? g_coordsBody[id][0][coordIdx] : g_coordsEyes[id][0][coordIdx];
  811.  
  812. for (new vectorIdx = 1; vectorIdx < MAX_VECTOR_CNT; ++vectorIdx)
  813. for (coordIdx = 0; coordIdx < MAX_COORD_CNT; ++coordIdx)
  814. if (curCoords[coordIdx] != ((coordType == COORDTYPE_BODY) ? g_coordsBody[id][vectorIdx][coordIdx] : g_coordsEyes[id][vectorIdx][coordIdx]))
  815. return false;
  816.  
  817. return true;
  818. }
  819.  
  820. public coords_stdv(id)
  821. {
  822. // get the total variance of all the coords
  823. new sum, avg, variance, varianceTot;
  824. new coordIdx, vectorIdx;
  825.  
  826. for (coordIdx = 0; coordIdx < MAX_COORD_CNT; ++coordIdx)
  827. {
  828. // initialize our working variables
  829. sum = 0;
  830. variance = 0;
  831.  
  832. // get the average of the coordinate
  833. for (vectorIdx = 0; vectorIdx < MAX_VECTOR_CNT; ++vectorIdx)
  834. sum += g_coordsBody[id][vectorIdx][coordIdx];
  835.  
  836. avg = sum / MAX_VECTOR_CNT;
  837.  
  838. // get the variance of the coordinate
  839. for (vectorIdx = 0; vectorIdx < MAX_VECTOR_CNT; ++vectorIdx)
  840. variance += power(g_coordsBody[id][vectorIdx][coordIdx]- avg, 2);
  841.  
  842. variance = variance / (MAX_VECTOR_CNT- 1);
  843.  
  844. // increment the total variance of all coordinates
  845. varianceTot += variance;
  846. }
  847.  
  848. // return the standard deviation (std dev = the square root of the variance)
  849. return sqroot(varianceTot);
  850. }
  851.  
  852. public coords_insert(id, coordType)
  853. {
  854. // move each vector up one level, making room at the bottom for the new coords
  855. for (new vectorIdx = MAX_VECTOR_CNT- 1; vectorIdx > 0;--vectorIdx)
  856. {
  857. for (new coordIdx = 0; coordIdx < MAX_COORD_CNT; ++coordIdx)
  858. {
  859. if (coordType == COORDTYPE_BODY)
  860. g_coordsBody[id][vectorIdx][coordIdx] = g_coordsBody[id][vectorIdx- 1][coordIdx];
  861. else
  862. g_coordsEyes[id][vectorIdx][coordIdx] = g_coordsEyes[id][vectorIdx- 1][coordIdx];
  863. }
  864. }
  865.  
  866. // now that space is cleared for them, insert the current coords into the lowest vector
  867. if (is_user_connected(id))
  868. {
  869. if (coordType == COORDTYPE_BODY)
  870. get_user_origin(id, g_coordsBody[id][0], 0);
  871. else
  872. get_user_origin(id, g_coordsEyes[id][0], 3);
  873. }
  874. }
  875.  
  876. public punish_snark_attack(id, Float:punishPercentage)
  877. {
  878. new maxSnarkCnt = floatround(punishPercentage * 16.0);
  879.  
  880. if (g_snarkCnt[id] < maxSnarkCnt)
  881. {
  882. // send the snarks out, two at a time
  883. server_cmd("monster snark #%i", id);
  884. server_cmd("monster snark #%i", id);
  885.  
  886. g_snarkCnt[id] += 2;
  887. }
  888. }
  889.  
  890. public punish_blind(id, Float:punishPercentage)
  891. {
  892. new duration = (punishPercentage == 1.0) ? FADE_LENGTH_PERM : 1<<12;
  893. new holdTime = (punishPercentage == 1.0) ? FADE_LENGTH_PERM : 1<<8;
  894. new fadeType = (punishPercentage == 1.0) ? FADE_HOLD : FADE_IN;
  895. new blindness = 127 + floatround(128.0 * punishPercentage);
  896.  
  897. if (is_user_alive(id))
  898. {
  899. if (!(g_playerFlags[id] & PLAYER_BLIND)) g_playerFlags[id] += PLAYER_BLIND;
  900.  
  901. message_begin(MSG_ONE, g_msgFade, {0,0,0}, id); // use the magic #1 for "one client"
  902. write_short(duration); // fade lasts this long duration
  903. write_short(holdTime); // fade lasts this long hold time
  904. write_short(fadeType); // fade type
  905. write_byte(0); // fade red
  906. write_byte(0); // fade green
  907. write_byte(0); // fade blue
  908. write_byte(blindness); // fade alpha
  909. message_end();
  910. }
  911. }
  912.  
  913. public punish_blind_stop(id)
  914. {
  915. if (g_playerFlags[id] & PLAYER_BLIND) g_playerFlags[id]-= PLAYER_BLIND;
  916.  
  917. message_begin(MSG_ONE, g_msgFade, {0,0,0}, id); // use the magic #1 for "one client"
  918. write_short(1<<12); // fade lasts this long duration
  919. write_short(1<<8); // fade lasts this long hold time
  920. write_short(FADE_OUT); // fade type
  921. write_byte(0); // fade red
  922. write_byte(0); // fade green
  923. write_byte(0); // fade blue
  924. write_byte(255); // fade alpha
  925. message_end();
  926. }
  927.  
  928. public meter_dmg_reset(id)
  929. {
  930. // forgive previous camping transgressions
  931. punish_stop_all(id);
  932. g_meter[id] = 0;
  933. g_playerFlags[id] = 0;
  934.  
  935. // the player has been through enough trauma (getting or giving damage)
  936. // so let's just ignore the camp meter for awhile
  937. meter_ignore(id);
  938.  
  939. remove_task(id);
  940. set_task(get_pcvar_float(g_cvarDamageRestart), "meter_unignore", id);
  941. }
  942.  
  943. public meter_pause(id)
  944. {
  945. if (!(g_playerFlags[id] & METER_PAUSE)) g_playerFlags[id] += METER_PAUSE;
  946. }
  947.  
  948. public meter_ignore(id)
  949. {
  950. if (!(g_playerFlags[id] & METER_IGNORE)) g_playerFlags[id] += METER_IGNORE;
  951. }
  952.  
  953. public meter_unpause(id)
  954. {
  955. if (g_playerFlags[id] & METER_PAUSE) g_playerFlags[id]-= METER_PAUSE;
  956. }
  957.  
  958. public meter_unignore(id)
  959. {
  960. if (g_playerFlags[id] & METER_IGNORE) g_playerFlags[id]-= METER_IGNORE;
  961. }
  962.  
  963. public start_checking()
  964. {
  965. for (new id = 1; id <= 32; id++)
  966. meter_unignore(id);
  967. }
  968.  
  969. public bomb_planting(planter)
  970. {
  971. g_bombPlanter = planter;
  972. meter_pause(planter);
  973. }
  974.  
  975. public event_bartime(id)
  976. {
  977. if (read_data(1) == 0)
  978. {
  979. if (id == g_bombPlanter)
  980. g_bombPlanter = 0;
  981. else if (id == g_bombDefuser)
  982. g_bombDefuser = 0;
  983. else
  984. return;
  985.  
  986. meter_unpause(id);
  987. }
  988. }
  989.  
  990. public bomb_planted(planter)
  991. {
  992. g_bombPlanter = 0;
  993. g_bombPlanted = true;
  994. meter_unpause(planter);
  995. }
  996.  
  997. public bomb_defusing(defuser)
  998. {
  999. g_bombDefuser = defuser;
  1000. meter_pause(defuser);
  1001. }
  1002.  
  1003. public bomb_defused(defuser)
  1004. {
  1005. g_bombDefuser = 0;
  1006. meter_unpause(defuser);
  1007. }
  1008.  
  1009. public client_damage(attacker, victim, damage, wpnindex, hitplace, TA)
  1010. {
  1011. if (attacker && victim && attacker != victim && !TA)
  1012. {
  1013. new damageResetFlag = get_pcvar_num(g_cvarDamageReset);
  1014. if (damageResetFlag & DMG_RESET_DEFENDER)
  1015. meter_dmg_reset(victim);
  1016. if (damageResetFlag & DMG_RESET_ATTACKER)
  1017. meter_dmg_reset(attacker);
  1018. }
  1019. }
  1020.  
  1021. public event_round_end()
  1022. {
  1023. // stop checking for camping
  1024. remove_task(TASKID_CHECK_CAMPING);
  1025. }
  1026.  
  1027. public event_new_round()
  1028. {
  1029. // make sure any straggling monsters are sent away to a better place
  1030. if (get_pcvar_num(g_cvarPunish) & PUNISH_SNARKS)
  1031. {
  1032. monsters_kill();
  1033. }
  1034. }
  1035.  
  1036. public event_round_start()
  1037. {
  1038. g_bombPlanted = false;
  1039.  
  1040. if (get_pcvar_num(g_cvarPunish))
  1041. {
  1042. // reset all the flags
  1043. for (new id = 1; id <= 32; id++)
  1044. {
  1045. flags_reset(id);
  1046. meter_ignore(id);
  1047. }
  1048. set_task(get_pcvar_float(g_cvarStart), "start_checking");
  1049. set_task(2.0, "check_camping", TASKID_CHECK_CAMPING, _, _, "b");
  1050. }
  1051. }
  1052.  
  1053. monsters_kill()
  1054. {
  1055. // this function will kill ALL monsters on the map, it doesn't make a distinction
  1056. // between monsters spawned by THIS plugin and monsters spawned some other way.
  1057. // if it's a monster, it'll be killed.
  1058. new Float:health;
  1059. new maxEntities = global_get(glb_maxEntities);
  1060. for (new entity = 1; entity < maxEntities; ++entity)
  1061. {
  1062. if (pev_valid(entity) && pev(entity, pev_flags) & FL_MONSTER)
  1063. {
  1064. set_pev(entity, pev_dmg_inflictor, 0); // set the damage inflictor to "world"
  1065. pev(entity, pev_health, health); // grab the monster's current health
  1066. set_pev(entity, pev_health, 0.0); // kill the monster by taking away all it's health //pev_fuser4
  1067. }
  1068. }
  1069. }
  1070.  
  1071. public flags_reset(id)
  1072. {
  1073. g_meter[id] = 0;
  1074. g_playerFlags[id] = 0;
  1075. g_snarkCnt[id] = 0;
  1076. coords_reset(id);
  1077. }
  1078.  
  1079. public coords_reset(id)
  1080. {
  1081. for (new vectorIdx = 0; vectorIdx < MAX_VECTOR_CNT; vectorIdx++)
  1082. coords_insert(id, COORDTYPE_BODY);
  1083. }
  1084.  
  1085. public punish_stop_all(id)
  1086. {
  1087. if (g_playerFlags[id] & PLAYER_BLIND) punish_blind_stop(id);
  1088. if (g_playerFlags[id] & PLAYER_SOUND) punish_sound_stop(id);
  1089. g_snarkCnt[id] = 0;
  1090. }
  1091.  
  1092. percent(is, of)
  1093. {
  1094. return (of != 0) ? floatround(floatmul(float(is)/float(of), 100.0)) : 0;
  1095. }
  1096.  
  1097. /*
  1098. stock debug_log(const textID[] = "", const text[] = "", {Float,Sql,Result,_}:...)
  1099. {
  1100. new debugger = get_cvar_num("badcamper_debug");
  1101. if (debugger || debugger ==-1)
  1102. {
  1103. // format the text as needed
  1104. new formattedText[1024];
  1105. format_args(formattedText, 1023, 1);
  1106. // if there's a text identifier, add it
  1107. if (textID[0])
  1108. format(formattedText, 1023, "[%s] %s", textID, formattedText);
  1109. // log text to file
  1110. log_to_file("_badcamper.log", formattedText);
  1111. // if there's someone to show text to, do so
  1112. if (debugger && is_user_connected(debugger))
  1113. client_print(debugger, print_chat, formattedText);
  1114. }
  1115. // not needed but gets rid of stupid compiler error
  1116. if (text[0] == 0) return;
  1117. }
  1118. */
  1119.  
  1120. /*
  1121. stock has_flag(id, flags[])
  1122. {
  1123. return (get_user_flags(id) & read_flags(flags));
  1124. }
  1125. */
  1126.  
  1127. public meter_display_spec_clear(id)
  1128. {
  1129. ClearSyncHud(id, g_campMeterMsgSync);
  1130. }


A hozzászólást 1 alkalommal szerkesztették, utoljára HunGamer 2012.11.24. 14:35-kor.
tilos amxx-et csatolni sma nélkü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  [2 hozzászólás ] 


Ki van itt

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