hlmod.hu

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



Jelenlévő felhasználók

Jelenleg 217 felhasználó van jelen :: 0 regisztrált, 0 rejtett és 217 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  [ 6 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Ultimate Sounds hiba
HozzászólásElküldve: 2015.01.18. 17:06 
Offline
Senior Tag
Avatar

Csatlakozott: 2013.11.12. 16:39
Hozzászólások: 258
Megköszönt másnak: 87 alkalommal
Megköszönték neki: 2 alkalommal
Sziasztok ebben a pluginba 11 hiba van....Valaki javítaná pls

SMA Forráskód: [ Mindet kijelol ]
  1. /* AMX Mod X
  2. * Misc. Stats Plugin
  3. *
  4. * by the AMX Mod X Development Team
  5. * originally developed by OLO
  6. *
  7. * This file is part of AMX Mod X.
  8. *
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License as published by the
  12. * Free Software Foundation; either version 2 of the License, or (at
  13. * your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful, but
  16. * WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software Foundation,
  22. * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. *
  24. * In addition, as a special exception, the author gives permission to
  25. * link the code of this program with the Half-Life Game Engine ("HL
  26. * Engine") and Modified Game Libraries ("MODs") developed by Valve,
  27. * L.L.C ("Valve"). You must obey the GNU General Public License in all
  28. * respects for all of the code used other than the HL Engine and MODs
  29. * from Valve. If you modify this file, you may extend this exception
  30. * to your version of the file, but you are not obligated to do so. If
  31. * you do not wish to do so, delete this exception statement from your
  32. * version.
  33. */
  34.  
  35. #include <amxmodx>
  36. #include <csx>
  37. #include <cstrike>
  38.  
  39. public MultiKill
  40. public MultiKillSound
  41. public BombPlanting
  42. public BombDefusing
  43. public BombPlanted
  44. public BombDefused
  45. public BombFailed
  46. public BombPickUp
  47. public BombDrop
  48. public BombCountVoice
  49. public BombCountDef
  50. public BombReached
  51. public ItalyBonusKill
  52. public EnemyRemaining
  53. public LastMan
  54. public KnifeKill
  55. public KnifeKillSound
  56. public GrenadeKill
  57. public GrenadeSuicide
  58. public HeadShotKill
  59. public HeadShotKillSound
  60. public RoundCounterSound
  61. public RoundCounter
  62. public KillingStreak
  63. public KillingStreakSound
  64. public DoubleKill
  65. public DoubleKillSound
  66. public PlayerName
  67. public FirstBloodSound
  68.  
  69. new g_streakKills[33][2]
  70. new g_multiKills[33][2]
  71. new g_C4Timer
  72. new g_Defusing
  73. new g_Planter
  74. new Float:g_LastOmg
  75. new g_LastAnnounce
  76. new g_roundCount
  77. new Float:g_doubleKill
  78. new g_doubleKillId
  79. new g_friend[33]
  80. new g_firstBlood
  81. new g_center1_sync
  82. new g_announce_sync
  83. new g_status_sync
  84. new g_left_sync
  85. new g_bottom_sync
  86. new g_he_sync
  87.  
  88. new g_MultiKillMsg[7][] =
  89. {
  90. "Multi-Kill! %s^n%L %d %L (%d %L)",
  91. "Ultra-Kill!!! %s^n%L %d %L (%d %L)",
  92. "%s IS ON A COMBOWHORE!!!^n%L %d %L (%d %L)",
  93. "KillingSpree!!! %s^n%L %d %L (%d hs)",
  94. "%s IS UNSTOPPABLE!!!^n%L %d %L (%d %L)",
  95. "%s IS A MONSTER!^n%L %d %L (%d %L)",
  96. "%s IS GODLIKE!!!!^n%L %d %L (%d %L)"
  97. }
  98.  
  99. new g_Sounds[7][] =
  100. {
  101. "multikill",
  102. "ultrakill",
  103. "Combowhore !",
  104. "killingspree",
  105. "unstoppable",
  106. "monsterkill",
  107. "godlike"
  108. }
  109. new g_KillingMsg[7][] =
  110. {
  111. "%s: Multi-Kill!",
  112. "%s: Ultra-Kill!!!",
  113. "%s IS ON A COMBOWHORE !!!!",
  114. "%s: KillingSpree!!!",
  115. "%s IS UNSTOPPABLE!!!",
  116. "%s IS A MONSTER!",
  117. "%s IS GODLIKE!!!"
  118. }
  119.  
  120. new g_KinfeMsg[4][] =
  121. {
  122. "KNIFE_MSG_1",
  123. "KNIFE_MSG_2",
  124. "KNIFE_MSG_3",
  125. "KNIFE_MSG_4"
  126. }
  127.  
  128. new g_LastMessages[4][] =
  129. {
  130. "LAST_MSG_1",
  131. "LAST_MSG_2",
  132. "LAST_MSG_3",
  133. "LAST_MSG_4"
  134. }
  135.  
  136. new g_HeMessages[4][] =
  137. {
  138. "HE_MSG_1",
  139. "HE_MSG_2",
  140. "HE_MSG_3",
  141. "HE_MSG_4"
  142. }
  143.  
  144. new g_SHeMessages[4][] =
  145. {
  146. "SHE_MSG_1",
  147. "SHE_MSG_2",
  148. "SHE_MSG_3",
  149. "SHE_MSG_4"
  150. }
  151.  
  152. new g_HeadShots[7][] =
  153. {
  154. "HS_MSG_1",
  155. "HS_MSG_2",
  156. "HS_MSG_3",
  157. "HS_MSG_4",
  158. "HS_MSG_5",
  159. "HS_MSG_6",
  160. "HS_MSG_7"
  161. }
  162.  
  163. new g_teamsNames[4][] =
  164. {
  165. "TERRORIST",
  166. "CT",
  167. "TERRORISTS",
  168. "CTS"
  169. }
  170.  
  171. public plugin_init()
  172. {
  173. register_plugin("CS Misc. Stats", AMXX_VERSION_STR, "AMXX Dev Team")
  174. register_dictionary("miscstats.txt")
  175. register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w")
  176. register_event("SendAudio", "eEndRound", "a", "2&%!MRAD_terwin", "2&%!MRAD_ctwin", "2&%!MRAD_rounddraw")
  177. register_event("RoundTime", "eNewRound", "bc")
  178. register_event("StatusValue", "setTeam", "be", "1=1")
  179. register_event("StatusValue", "showStatus", "be", "1=2", "2!0")
  180. register_event("StatusValue", "hideStatus", "be", "1=1", "2=0")
  181.  
  182. new mapname[32]
  183. get_mapname(mapname, 31)
  184.  
  185. if (equali(mapname, "de_", 3) || equali(mapname, "csde_", 5))
  186. {
  187. register_event("StatusIcon", "eGotBomb", "be", "1=1", "1=2", "2=c4")
  188. register_event("TextMsg", "eBombPickUp", "bc", "2&#Got_bomb")
  189. register_event("TextMsg", "eBombDrop", "bc", "2&#Game_bomb_d")
  190. }
  191. else if (equali(mapname, "cs_italy"))
  192. {
  193. register_event("23", "chickenKill", "a", "1=108", /*"12=106", */ "15=4")
  194. register_event("23", "radioKill", "a", "1=108", /*"12=294", */ "15=2")
  195. }
  196.  
  197. g_center1_sync = CreateHudSyncObj()
  198. g_announce_sync = CreateHudSyncObj()
  199. g_status_sync = CreateHudSyncObj()
  200. g_left_sync = CreateHudSyncObj()
  201. g_bottom_sync = CreateHudSyncObj()
  202. g_he_sync = CreateHudSyncObj()
  203. }
  204.  
  205. public plugin_cfg()
  206. {
  207. new g_addStast[] = "amx_statscfg add ^"%s^" %s"
  208.  
  209. server_cmd(g_addStast, "ST_MULTI_KILL", "MultiKill")
  210. server_cmd(g_addStast, "ST_MULTI_KILL_SOUND", "MultiKillSound")
  211. server_cmd(g_addStast, "ST_BOMB_PLANTING", "BombPlanting")
  212. server_cmd(g_addStast, "ST_BOMB_DEFUSING", "BombDefusing")
  213. server_cmd(g_addStast, "ST_BOMB_PLANTED", "BombPlanted")
  214. server_cmd(g_addStast, "ST_BOMB_DEF_SUCC", "BombDefused")
  215. server_cmd(g_addStast, "ST_BOMB_DEF_FAIL", "BombFailed")
  216. server_cmd(g_addStast, "ST_BOMB_PICKUP", "BombPickUp")
  217. server_cmd(g_addStast, "ST_BOMB_DROP", "BombDrop")
  218. server_cmd(g_addStast, "ST_BOMB_CD_VOICE", "BombCountVoice")
  219. server_cmd(g_addStast, "ST_BOMB_CD_DEF", "BombCountDef")
  220. server_cmd(g_addStast, "ST_BOMB_SITE", "BombReached")
  221. server_cmd(g_addStast, "ST_ITALY_BONUS", "ItalyBonusKill")
  222. server_cmd(g_addStast, "ST_LAST_MAN", "LastMan")
  223. server_cmd(g_addStast, "ST_KNIFE_KILL", "KnifeKill")
  224. server_cmd(g_addStast, "ST_KNIFE_KILL_SOUND", "KnifeKillSound")
  225. server_cmd(g_addStast, "ST_HE_KILL", "GrenadeKill")
  226. server_cmd(g_addStast, "ST_HE_SUICIDE", "GrenadeSuicide")
  227. server_cmd(g_addStast, "ST_HS_KILL", "HeadShotKill")
  228. server_cmd(g_addStast, "ST_HS_KILL_SOUND", "HeadShotKillSound")
  229. server_cmd(g_addStast, "ST_ROUND_CNT", "RoundCounter")
  230. server_cmd(g_addStast, "ST_ROUND_CNT_SOUND", "RoundCounterSound")
  231. server_cmd(g_addStast, "ST_KILL_STR", "KillingStreak")
  232. server_cmd(g_addStast, "ST_KILL_STR_SOUND", "KillingStreakSound")
  233. server_cmd(g_addStast, "ST_ENEMY_REM", "EnemyRemaining")
  234. server_cmd(g_addStast, "ST_DOUBLE_KILL", "DoubleKill")
  235. server_cmd(g_addStast, "ST_DOUBLE_KILL_SOUND", "DoubleKillSound")
  236. server_cmd(g_addStast, "ST_PLAYER_NAME", "PlayerName")
  237. server_cmd(g_addStast, "ST_FIRST_BLOOD_SOUND", "FirstBloodSound")
  238. }
  239.  
  240. public client_putinserver(id)
  241. {
  242. g_multiKills[id] = {0, 0}
  243. g_streakKills[id] = {0, 0}
  244. }
  245.  
  246. public client_death(killer, victim, wpnindex, hitplace, TK)
  247. {
  248. if (wpnindex == CSW_C4)
  249. return
  250.  
  251. new headshot = (hitplace == HIT_HEAD) ? 1 : 0
  252. new selfkill = (killer == victim) ? 1 : 0
  253.  
  254. if (g_firstBlood)
  255. {
  256. g_firstBlood = 0
  257. if (FirstBloodSound)
  258. play_sound("misc/firstblood")
  259. }
  260.  
  261. if ((KillingStreak || KillingStreakSound) && !TK)
  262. {
  263. g_streakKills[victim][1]++
  264. g_streakKills[victim][0] = 0
  265.  
  266. if (!selfkill)
  267. {
  268. g_streakKills[killer][0]++
  269. g_streakKills[killer][1] = 0
  270.  
  271. new a = g_streakKills[killer][0] - 3
  272.  
  273. if ((a > -1) && !(a % 2))
  274. {
  275. new name[32]
  276. get_user_name(killer, name, 31)
  277.  
  278. if ((a >>= 1) > 6)
  279. a = 6
  280.  
  281. if (KillingStreak)
  282. {
  283. set_hudmessage(random(255), random(255), random(255) , 0.05, 0.50, 2, 0.02, 6.0, 0.01, 0.1, -1)
  284. ShowSyncHudMsg(0, g_left_sync, g_KillingMsg[a], name)
  285. }
  286.  
  287. if (KillingStreakSound)
  288. {
  289. new file[32]
  290.  
  291. format(file, 31, "misc/%s", g_Sounds[a])
  292. play_sound(file)
  293. }
  294. }
  295. }
  296. }
  297.  
  298. if (MultiKill || MultiKillSound)
  299. {
  300. if (!selfkill && !TK && killer)
  301. {
  302. g_multiKills[killer][0]++
  303. g_multiKills[killer][1] += headshot
  304.  
  305. new param[2]
  306.  
  307. param[0] = killer
  308. param[1] = g_multiKills[killer][0]
  309. set_task(4.0 + float(param[1]), "checkKills", 0, param, 2)
  310. }
  311. }
  312.  
  313. if (EnemyRemaining && is_user_connected(victim))
  314. {
  315. new ppl[32], pplnum = 0, maxplayers = get_maxplayers()
  316. new epplnum = 0
  317. new CsTeams:team = cs_get_user_team(victim)
  318. new CsTeams:other_team
  319. new CsTeams:enemy_team = (team == CS_TEAM_T) ? CS_TEAM_CT : CS_TEAM_T
  320.  
  321. if (team == CS_TEAM_T || team == CS_TEAM_CT)
  322. {
  323. for (new i=1; i<=maxplayers; i++)
  324. {
  325. if (!is_user_connected(i))
  326. {
  327. continue
  328. }
  329. if (i == victim)
  330. {
  331. continue
  332. }
  333. other_team = cs_get_user_team(i)
  334. if (other_team == team && is_user_alive(i))
  335. {
  336. epplnum++
  337. } else if (other_team == enemy_team) {
  338. ppl[pplnum++] = i
  339. }
  340. }
  341.  
  342. if (pplnum && epplnum)
  343. {
  344. new message[128], team_name[32]
  345.  
  346. set_hudmessage(255, 255, 255, 0.02, 0.85, 2, 0.05, 0.1, 0.02, 3.0, -1)
  347.  
  348. /* This is a pretty stupid thing to translate, but whatever */
  349. new _teamname[32]
  350. if (team == CS_TEAM_T)
  351. {
  352. format(_teamname, 31, "TERRORIST%s", (epplnum == 1) ? "" : "S")
  353. } else if (team == CS_TEAM_CT) {
  354. format(_teamname, 31, "CT%s", (epplnum == 1) ? "" : "S")
  355. }
  356.  
  357. for (new a = 0; a < pplnum; ++a)
  358. {
  359. format(team_name, 31, "%L", ppl[a], _teamname)
  360. format(message, 127, "%L", ppl[a], "REMAINING", epplnum, team_name)
  361. ShowSyncHudMsg(ppl[a], g_bottom_sync, "%s", message)
  362. }
  363. }
  364. }
  365. }
  366.  
  367. if (LastMan)
  368. {
  369. new cts[32], ts[32], ctsnum, tsnum
  370. new maxplayers = get_maxplayers()
  371. new CsTeams:team
  372.  
  373. for (new i=1; i<=maxplayers; i++)
  374. {
  375. if (!is_user_connected(i) || !is_user_alive(i))
  376. {
  377. continue
  378. }
  379. team = cs_get_user_team(i)
  380. if (team == CS_TEAM_T)
  381. {
  382. ts[tsnum++] = i
  383. } else if (team == CS_TEAM_CT) {
  384. cts[ctsnum++] = i
  385. }
  386. }
  387.  
  388. if (ctsnum == 1 && tsnum == 1)
  389. {
  390. new ctname[32], tname[32]
  391.  
  392. get_user_name(cts[0], ctname, 31)
  393. get_user_name(ts[0], tname, 31)
  394.  
  395. set_hudmessage(0, 255, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, -1)
  396. ShowSyncHudMsg(0, g_center1_sync, "%s vs. %s", ctname, tname)
  397.  
  398. play_sound("misc/maytheforce")
  399. }
  400. else if (!g_LastAnnounce)
  401. {
  402. new oposite = 0, _team = 0
  403.  
  404. if (ctsnum == 1 && tsnum > 1)
  405. {
  406. g_LastAnnounce = cts[0]
  407. oposite = tsnum
  408. _team = 0
  409. }
  410. else if (tsnum == 1 && ctsnum > 1)
  411. {
  412. g_LastAnnounce = ts[0]
  413. oposite = ctsnum
  414. _team = 1
  415. }
  416.  
  417. if (g_LastAnnounce)
  418. {
  419. new name[32]
  420.  
  421. get_user_name(g_LastAnnounce, name, 31)
  422.  
  423. set_hudmessage(0, 255, 255, -1.0, 0.38, 0, 6.0, 6.0, 0.5, 0.15, -1)
  424. ShowSyncHudMsg(0, g_center1_sync, "%s (%d HP) vs. %d %s%s: %L", name, get_user_health(g_LastAnnounce), oposite, g_teamsNames[_team], (oposite == 1) ? "" : "S", LANG_PLAYER, g_LastMessages[random_num(0, 3)])
  425.  
  426. if (!is_user_connecting(g_LastAnnounce))
  427. {
  428. client_cmd(g_LastAnnounce, "spk misc/oneandonly")
  429. }
  430. }
  431. }
  432. }
  433.  
  434. if (wpnindex == CSW_KNIFE && (KnifeKill || KnifeKillSound))
  435. {
  436. if (KnifeKill)
  437. {
  438. new killer_name[32], victim_name[32]
  439.  
  440. get_user_name(killer, killer_name, 31)
  441. get_user_name(victim, victim_name, 31)
  442.  
  443. set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, -1)
  444. ShowSyncHudMsg(0, g_he_sync, "%L", LANG_PLAYER, g_KinfeMsg[random_num(0, 3)], killer_name, victim_name)
  445. }
  446.  
  447. if (KnifeKillSound)
  448. play_sound("misc/humiliation1")
  449. play_sound("misc/humiliation2")
  450. play_sound("misc/humiliation3")
  451. }
  452.  
  453. if (wpnindex == CSW_HEGRENADE && (GrenadeKill || GrenadeSuicide))
  454. {
  455. new killer_name[32], victim_name[32]
  456.  
  457. get_user_name(killer, killer_name, 31)
  458. get_user_name(victim, victim_name, 31)
  459.  
  460. set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, -1)
  461.  
  462. if (!selfkill)
  463. {
  464. if (GrenadeKill)
  465. ShowSyncHudMsg(0, g_he_sync, "%L", LANG_PLAYER, g_HeMessages[random_num(0, 3)], killer_name, victim_name)
  466. }
  467. else if (GrenadeSuicide)
  468. ShowSyncHudMsg(0, g_he_sync, "%L", LANG_PLAYER, g_SHeMessages[random_num(0, 3)], victim_name)
  469. }
  470.  
  471. if (headshot && (HeadShotKill || HeadShotKillSound))
  472. {
  473. if (HeadShotKill && wpnindex)
  474. {
  475. new killer_name[32], victim_name[32], weapon_name[32], message[256], players[32], pnum
  476.  
  477. xmod_get_wpnname(wpnindex, weapon_name, 31)
  478. get_user_name(killer, killer_name, 31)
  479. get_user_name(victim, victim_name, 31)
  480. get_players(players, pnum, "c")
  481.  
  482. for (new i = 0; i < pnum; i++)
  483. {
  484. format(message, sizeof(message)-1, "%L", players[i], g_HeadShots[random_num(0, 6)])
  485.  
  486. replace(message, sizeof(message)-1, "$vn", victim_name)
  487. replace(message, sizeof(message)-1, "$wn", weapon_name)
  488. replace(message, sizeof(message)-1, "$kn", killer_name)
  489.  
  490. set_hudmessage(100, 100, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, -1)
  491. ShowSyncHudMsg(players[i], g_announce_sync, "%s", message)
  492. }
  493. }
  494.  
  495. if (HeadShotKillSound)
  496. {
  497. client_cmd(killer, "spk misc/headshot1")
  498. client_cmd(victim, "spk misc/headshot2")
  499. client_cmd(victim, "spk misc/headshot3")
  500. client_cmd(victim, "spk misc/headshot4")
  501. client_cmd(victim, "spk misc/headshot5")
  502. }
  503. }
  504.  
  505. if ((DoubleKill || DoubleKillSound) && !selfkill)
  506. {
  507. new Float:nowtime = get_gametime()
  508.  
  509. if (g_doubleKill == nowtime && g_doubleKillId == killer)
  510. {
  511. if (DoubleKill)
  512. {
  513. new name[32]
  514.  
  515. get_user_name(killer, name, 31)
  516.  
  517. set_hudmessage(random(255), random(255), random(255) , 0.35, 0, 6.0, 6.0, 0.5, 0.15, -1)
  518. ShowSyncHudMsg(0, g_center1_sync, "%L", LANG_PLAYER, "DOUBLE_KILL", name)
  519. }
  520.  
  521. if (DoubleKillSound)
  522. play_sound("misc/doublekill")
  523. }
  524.  
  525. g_doubleKill = nowtime
  526. g_doubleKillId = killer
  527. }
  528. }
  529.  
  530. public hideStatus(id)
  531. {
  532. if (PlayerName)
  533. {
  534. ClearSyncHud(id, g_status_sync)
  535. }
  536. }
  537.  
  538. public setTeam(id)
  539. g_friend[id] = read_data(2)
  540.  
  541. public showStatus(id)
  542. {
  543. if(!is_user_bot(id) && is_user_connected(id) && PlayerName)
  544. {
  545. new name[32], pid = read_data(2)
  546.  
  547. get_user_name(pid, name, 31)
  548. new color1 = 0, color2 = 0
  549.  
  550. if (get_user_team(pid) == 1)
  551. color1 = 255
  552. else
  553. color2 = 255
  554.  
  555. if (g_friend[id] == 1) // friend
  556. {
  557. new clip, ammo, wpnid = get_user_weapon(pid, clip, ammo)
  558. new wpnname[32]
  559.  
  560. if (wpnid)
  561. xmod_get_wpnname(wpnid, wpnname, 31)
  562.  
  563. set_hudmessage(color1, 50, color2, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01, -1)
  564. ShowSyncHudMsg(id, g_status_sync, "%s -- %d HP / %d AP / %s", name, get_user_health(pid), get_user_armor(pid), wpnname)
  565. } else {
  566. set_hudmessage(color1, 50, color2, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01, -1)
  567. ShowSyncHudMsg(id, g_status_sync, "%s", name)
  568. }
  569. }
  570. }
  571.  
  572. public eNewRound()
  573. {
  574. if (read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0,floatround_floor))
  575. {
  576. g_firstBlood = 1
  577. g_C4Timer = 0
  578. ++g_roundCount
  579.  
  580. if (RoundCounter)
  581. {
  582. set_hudmessage(random(255), random(255), random(255) , 0.30, 0, 6.0, 6.0, 0.5, 0.15, -1)
  583. ShowSyncHudMsg(0, g_announce_sync, "%L", LANG_PLAYER, "Play! Play! Play! Play!", g_roundCount)
  584. ShowSyncHudMsg(0, g_announce_sync, "%L", LANG_PLAYER, "Vasarold meg Fegyvereidet", g_roundCount)
  585. ShowSyncHudMsg(0, g_announce_sync, "%L", LANG_PLAYER, "Keszitsd elo Fegyvereidet ", g_roundCount)
  586. ShowSyncHudMsg(0, g_announce_sync, "%L", LANG_PLAYER, "Keszulj Fel a Harcra", g_roundCount)
  587. }
  588.  
  589. if (RoundCounterSound)
  590. play_sound("misc/prepare")
  591.  
  592. if (KillingStreak)
  593. {
  594. new appl[32], ppl, i
  595. get_players(appl, ppl, "ac")
  596.  
  597. for (new a = 0; a < ppl; ++a)
  598. {
  599. i = appl[a]
  600.  
  601. if (g_streakKills[i][0] >= 2)
  602. client_print(i, print_chat, "* %L", i, "KILLED_ROW", g_streakKills[i][0])
  603. else if (g_streakKills[i][1] >= 2)
  604. client_print(i, print_chat, "* %L", i, "DIED_ROUNDS", g_streakKills[i][1])
  605. }
  606. }
  607. }
  608. }
  609.  
  610. public eRestart()
  611. {
  612. eEndRound()
  613. g_roundCount = 0
  614. g_firstBlood = 1
  615. }
  616.  
  617. public eEndRound()
  618. {
  619. g_C4Timer = -2
  620. g_LastOmg = 0.0
  621. remove_task(8038)
  622. g_LastAnnounce = 0
  623. }
  624.  
  625. public checkKills(param[])
  626. {
  627. new id = param[0]
  628. new a = param[1]
  629.  
  630. if (a == g_multiKills[id][0])
  631. {
  632. a -= 3
  633.  
  634. if (a > -1)
  635. {
  636. if (a > 6)
  637. {
  638. a = 6
  639. }
  640.  
  641. if (MultiKill)
  642. {
  643. new name[32]
  644.  
  645. get_user_name(id, name, 31)
  646. set_hudmessage(random(255), random(255), random(255), 0.50, 2, 0.02, 6.0, 0.01, 0.1, -1)
  647.  
  648. ShowSyncHudMsg(0, g_left_sync, g_MultiKillMsg[a], name, LANG_PLAYER, "WITH", g_multiKills[id][0], LANG_PLAYER, "KILLS", g_multiKills[id][1], LANG_PLAYER, "HS")
  649. }
  650.  
  651. if (MultiKillSound)
  652. {
  653. new sound[24]
  654. format(sound, 23, "misc/%s", g_Sounds[a])
  655. play_sound(sound)
  656. }
  657. }
  658. g_multiKills[id] = {0, 0}
  659. }
  660. }
  661.  
  662. public chickenKill()
  663. {
  664. if (ItalyBonusKill)
  665. announceEvent(0, "KILLED_CHICKEN")
  666. }
  667.  
  668. public radioKill()
  669. {
  670. if (ItalyBonusKill)
  671. announceEvent(0, "BLEW_RADIO")
  672. }
  673.  
  674. announceEvent(id, message[])
  675. {
  676. new name[32]
  677.  
  678. get_user_name(id, name, 31)
  679. set_hudmessage(255, 100, 50, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, -1)
  680. ShowSyncHudMsg(0, g_announce_sync, "%L", LANG_PLAYER, message, name)
  681. }
  682.  
  683. public eBombPickUp(id)
  684. {
  685. if (BombPickUp)
  686. announceEvent(id, "PICKED_BOMB")
  687. }
  688.  
  689. public eBombDrop()
  690. {
  691. if (BombDrop)
  692. announceEvent(g_Planter, "DROPPED_BOMB")
  693. }
  694.  
  695. public eGotBomb(id)
  696. {
  697. g_Planter = id
  698.  
  699. if (BombReached && read_data(1) == 2 && g_LastOmg < get_gametime())
  700. {
  701. g_LastOmg = get_gametime() + 15.0
  702. announceEvent(g_Planter, "REACHED_TARGET")
  703. }
  704. }
  705.  
  706. public bombTimer()
  707. {
  708. if (--g_C4Timer > 0)
  709. {
  710. if (BombCountVoice)
  711. {
  712. if (g_C4Timer == 30 || g_C4Timer == 20)
  713. {
  714. new temp[64]
  715.  
  716. num_to_word(g_C4Timer, temp, 63)
  717. format(temp, 63, "^"vox/%s seconds until explosion^"", temp)
  718. play_sound(temp)
  719. }
  720. else if (g_C4Timer < 11)
  721. {
  722. new temp[64]
  723.  
  724. num_to_word(g_C4Timer, temp, 63)
  725. format(temp, 63, "^"vox/%s^"", temp)
  726. play_sound(temp)
  727. }
  728. }
  729. if (BombCountDef && g_Defusing)
  730. client_print(g_Defusing, print_center, "%d", g_C4Timer)
  731. }
  732. else
  733. remove_task(8038)
  734. }
  735.  
  736. public bomb_planted(planter)
  737. {
  738. g_Defusing = 0
  739.  
  740. if (BombPlanted)
  741. announceEvent(planter, "SET_UP_BOMB")
  742.  
  743. g_C4Timer = get_cvar_num("mp_c4timer")
  744. set_task(1.0, "bombTimer", 8038, "", 0, "b")
  745. }
  746.  
  747. public bomb_planting(planter)
  748. {
  749. if (BombPlanting)
  750. announceEvent(planter, "PLANT_BOMB")
  751. }
  752.  
  753. public bomb_defusing(defuser)
  754. {
  755. if (BombDefusing)
  756. announceEvent(defuser, "DEFUSING_BOMB")
  757.  
  758. g_Defusing = defuser
  759. }
  760.  
  761. public bomb_defused(defuser)
  762. {
  763. if (BombDefused)
  764. announceEvent(defuser, "DEFUSED_BOMB")
  765. }
  766.  
  767. public bomb_explode(planter, defuser)
  768. {
  769. if (BombFailed && defuser)
  770. announceEvent(defuser, "FAILED_DEFU")
  771. }
  772.  
  773. public play_sound(sound[])
  774. {
  775. new players[32], pnum
  776. get_players(players, pnum, "c")
  777. new i
  778.  
  779. for (i = 0; i < pnum; i++)
  780. {
  781. if (is_user_connecting(players[i]))
  782. continue
  783.  
  784. client_cmd(players[i], "spk %s", sound)
  785. }
  786. }
  787.  

_________________
Nem szégyen megköszönni :)

'The dictator is coming' :D


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Ultimate Sounds hiba
HozzászólásElküldve: 2015.01.18. 17:54 
Offline
Beavatott
Avatar

Csatlakozott: 2015.01.15. 22:08
Hozzászólások: 99
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 15 alkalommal
http://aghl.ru/webcompiler/webcompiler.php

Kód:
3d2088bbcd98194e45027d7d2739fa1d.sma(449) : warning 217: loose indentation
3d2088bbcd98194e45027d7d2739fa1d.sma(517) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(517) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(517) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(582) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(582) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(582) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(583) : warning 217: loose indentation
3d2088bbcd98194e45027d7d2739fa1d.sma(646) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(646) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(646) : warning 213: tag mismatch
Header size:           2072 bytes
Code size:            19720 bytes
Data size:            12684 bytes
Stack/heap size:      16384 bytes; estimated max. usage=447 cells (1788 bytes)
Total requirements:   50860 bytes

11 Warnings.
Done.


Ezek csak tagolási hibák nem nagy gond! lefordítsa :)

_________________
Kép
http://www.klanhaboru.hu/ Gyere játssz!!! világ 28-ban vagyok.

Ők köszönték meg Atom nek ezt a hozzászólást: Charlie224 (2015.01.18. 18:12)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Ultimate Sounds hiba
HozzászólásElküldve: 2015.01.18. 18:25 
Offline
Senior Tag
Avatar

Csatlakozott: 2013.11.12. 16:39
Hozzászólások: 258
Megköszönt másnak: 87 alkalommal
Megköszönték neki: 2 alkalommal
Atom írta:
http://aghl.ru/webcompiler/webcompiler.php

Kód:
3d2088bbcd98194e45027d7d2739fa1d.sma(449) : warning 217: loose indentation
3d2088bbcd98194e45027d7d2739fa1d.sma(517) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(517) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(517) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(582) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(582) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(582) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(583) : warning 217: loose indentation
3d2088bbcd98194e45027d7d2739fa1d.sma(646) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(646) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(646) : warning 213: tag mismatch
Header size:           2072 bytes
Code size:            19720 bytes
Data size:            12684 bytes
Stack/heap size:      16384 bytes; estimated max. usage=447 cells (1788 bytes)
Total requirements:   50860 bytes

11 Warnings.
Done.


Ezek csak tagolási hibák nem nagy gond! lefordítsa :)


Mit jelent a tagolási hiba ? :)

_________________
Nem szégyen megköszönni :)

'The dictator is coming' :D


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Ultimate Sounds hiba
HozzászólásElküldve: 2015.01.18. 18:28 
Offline
Beavatott
Avatar

Csatlakozott: 2015.01.15. 22:08
Hozzászólások: 99
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 15 alkalommal
Charlie224 írta:
Atom írta:
http://aghl.ru/webcompiler/webcompiler.php

Kód:
3d2088bbcd98194e45027d7d2739fa1d.sma(449) : warning 217: loose indentation
3d2088bbcd98194e45027d7d2739fa1d.sma(517) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(517) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(517) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(582) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(582) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(582) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(583) : warning 217: loose indentation
3d2088bbcd98194e45027d7d2739fa1d.sma(646) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(646) : warning 213: tag mismatch
3d2088bbcd98194e45027d7d2739fa1d.sma(646) : warning 213: tag mismatch
Header size:           2072 bytes
Code size:            19720 bytes
Data size:            12684 bytes
Stack/heap size:      16384 bytes; estimated max. usage=447 cells (1788 bytes)
Total requirements:   50860 bytes

11 Warnings.
Done.


Ezek csak tagolási hibák nem nagy gond! lefordítsa :)


Mit jelent a tagolási hiba ? :)


Pl:
Helyes:
SMA Forráskód: [ Mindet kijelol ]
  1. public plugin_init() {
  2. register_plugin(PLUGIN, VERSION, AUTHOR)
  3. client_cmd("say /asd, "asd")

}
Helytelen:
SMA Forráskód: [ Mindet kijelol ]
  1. public plugin_init() {
  2. register_plugin(PLUGIN, VERSION, AUTHOR)
  3. client_cmd("say /asd, "asd")
  4. }

_________________
Kép
http://www.klanhaboru.hu/ Gyere játssz!!! világ 28-ban vagyok.


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Ultimate Sounds hiba
HozzászólásElküldve: 2015.01.18. 18:38 
Offline
Félisten
Avatar

Csatlakozott: 2013.12.30. 12:26
Hozzászólások: 987
Megköszönt másnak: 34 alkalommal
Megköszönték neki: 133 alkalommal
ez több okból is helytelen
+ 1 dolog

rossz:
SMA Forráskód: [ Mindet kijelol ]
  1. public asd(id) {
  2. if(cuccize[id] >= 1)
  3. lol(id)
  4. loool(0)
  5. }


helyes:
SMA Forráskód: [ Mindet kijelol ]
  1. public asd(id) {
  2. if(cuccize[id] >= 1) {
  3. lol(id)
  4. loool(0)
  5. }
  6. }

_________________
Kép
Pár pluginom:
LCAW Frag Bolt
S E C R E T (78%...)
KépKép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Ultimate Sounds hiba
HozzászólásElküldve: 2015.01.20. 11:45 
Offline
Imperátor
Avatar

Csatlakozott: 2009.04.21. 09:33
Hozzászólások: 3991
Megköszönt másnak: 5 alkalommal
Megköszönték neki: 135 alkalommal
Hajjajjjj..

Ez:
Kód:
public asd(id) {
   if(cuccize[id] >= 1)
      lol(id)
      loool(0)
}

így is lehet helyes:

Kód:
public asd(id) {
   if(cuccize[id] >= 1)
      lol(id)
   loool(0)
}


A
Kód:
loose indentation
hiba nem okoz futásidejű hibát, nem is hiba, hanem csak warning, ami arra hívja fel a figyelmet, hogy a kód tagolása nem megfelelő. A
Kód:
tag mismatch
viszont már okozhat problémát: A pawnban egy típus van, a cell ("cella"), de behúztak különböző típusokat (float), amiket tagekkel tudunk jelölni. Tipikusan a tag miatt fog máshogy működni, így a cell := Float:cell eredménye vagy Float:cell := cell lefordul, de a tagelések miatt szóéni fog, hogy nem megfelelőek. Futásidőben ez okozhat viszont gondot.

_________________
Kód:
I'm back

Kép


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


Ki van itt

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