hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.04.16. 09:17



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: Majestic-12 [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  [ 7 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Rádió
HozzászólásElküldve: 2014.03.22. 10:54 
Offline
Tag
Avatar

Csatlakozott: 2013.12.31. 23:06
Hozzászólások: 34
Megköszönt másnak: 4 alkalommal
Sziasztok!

Egy olyan pluginra lenne szükségem, aminek ha megadunk egy rádió linket, akkor azt parancsra eltudjuk indítani/kikapcsolni.

(Kerestem hasonlót, de mivel hiányos az angol tudásom, így nem nagyon értettem meg)


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Rádió
HozzászólásElküldve: 2014.03.22. 11:03 
Offline
Fanatikus
Avatar

Csatlakozott: 2013.03.23. 14:55
Hozzászólások: 162
Megköszönt másnak: 2 alkalommal
Megköszönték neki: 27 alkalommal
Hogy érted? Linket? Indítsd el MOTD-be.

_________________
Fehér lányra nézni fault,fehér lányhoz szólni technikai fault,fehér lányhoz érni,na azért lincselés jár!


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Rádió
HozzászólásElküldve: 2014.03.22. 11:06 
Offline
Tag
Avatar

Csatlakozott: 2013.12.31. 23:06
Hozzászólások: 34
Megköszönt másnak: 4 alkalommal
Például ezt http://live.risefm.hu:8080/radio elkezdi játszani egy parancsra, és le is állítja egy másik parancsra.


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Rádió
HozzászólásElküldve: 2014.03.22. 11:12 
Offline
Fanatikus
Avatar

Csatlakozott: 2013.03.23. 14:55
Hozzászólások: 162
Megköszönt másnak: 2 alkalommal
Megköszönték neki: 27 alkalommal
Jobb klikk és katt a hang mentése másnéven-re
letöltöd a kliensel,majd lejátszod vele a client_cmd funkcióval.
Ha azt akarod hogy leálljon akkor szintén a client_cmd-vel stopsoundot hajtasz végre :D

_________________
Fehér lányra nézni fault,fehér lányhoz szólni technikai fault,fehér lányhoz érni,na azért lincselés jár!


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Rádió
HozzászólásElküldve: 2014.03.22. 11:14 
Offline
Jómunkásember
Avatar

Csatlakozott: 2013.12.18. 17:35
Hozzászólások: 365
Megköszönt másnak: 152 alkalommal
Megköszönték neki: 31 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. /* Formatright © 2009, ConnorMcLeod
  2.  
  3. Half Life Media Player is free software;
  4. you can redistribute it and/or modify it under the terms of the
  5. GNU General Public License as published by the Free Software Foundation.
  6.  
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11.  
  12. You should have received a copy of the GNU General Public License
  13. along with Half Life Media Player; if not, write to the
  14. Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  15. Boston, MA 02111-1307, USA.
  16. */
  17.  
  18. #include <amxmodx>
  19. #include <nvault>
  20.  
  21. #define VERSION "3.1.1"
  22.  
  23. #define NVAULT_MAX_DAYS_SAVE 15
  24. #define MAX_RECONNECT_TIME 300 // in seconds (take in account that players could download a new map)
  25. #define DEFAULT_VOLUME 40
  26.  
  27. #define A_DAY_IN_SECONDS 86400 // 60 * 60 * 24
  28.  
  29. #define GROUP_MAX_LENGTH 64
  30.  
  31. #define RADIO_MAX_LENGTH 64
  32. #define URL_MAX_LENGTH 192
  33.  
  34. #define MAX_PLAYERS 32
  35. #define AUTHID_LENGTH 22
  36.  
  37. #define SetIdBits(%1,%2) %1 |= 1<<(%2 & 31)
  38. #define ClearIdBits(%1,%2) %1 &= ~( 1<<(%2 & 31) )
  39. #define GetIdBits(%1,%2) %1 & 1<<(%2 & 31)
  40.  
  41. enum _:Radios
  42. {
  43. RadioName[RADIO_MAX_LENGTH],
  44. RadioUrl[URL_MAX_LENGTH]
  45. }
  46.  
  47. enum _:Group
  48. {
  49. GroupName[GROUP_MAX_LENGTH],
  50. Array:GroupArrayOffset
  51. }
  52.  
  53. enum _:MenuSettings
  54. {
  55. mGroups,
  56. mRadios,
  57. mConfig
  58. }
  59.  
  60. new Array:g_aGroups
  61.  
  62. new g_iGroupsCount
  63.  
  64. new g_bRepeat, g_bListening
  65.  
  66. new g_iMenuOption[MAX_PLAYERS+1]
  67. new g_iMenuPosition[MAX_PLAYERS+1]
  68. new g_iVolume[MAX_PLAYERS+1] = {DEFAULT_VOLUME, ...}
  69. new g_szAuthid[MAX_PLAYERS+1][AUTHID_LENGTH]
  70. new g_PlayerGroup[MAX_PLAYERS+1][Group]
  71.  
  72. new g_pCvarShowAll, g_pCvarNoMotd
  73.  
  74. new gmsgMOTD
  75. new g_iMotdRegistered
  76. new g_iNvault
  77.  
  78. public plugin_init()
  79. {
  80. register_plugin("Half Life Media Player", VERSION, "ConnorMcLeod")
  81. register_dictionary("common.txt")
  82. register_dictionary("hlmp.txt")
  83.  
  84. g_pCvarShowAll = register_cvar("hlmp_show_all", "1")
  85. g_pCvarNoMotd = register_cvar("hlmp_no_motd", "1")
  86.  
  87. register_menucmd(register_menuid("HLMP"), 0x3FF, "HlmpMenuAction")
  88.  
  89. register_clcmd("hlmp_menu", "ClientCommand_HlmpMenu")
  90. register_clcmd("say /hlmp", "ClientCommand_HlmpMenu")
  91. register_clcmd("say /music", "ClientCommand_HlmpMenu")
  92. register_clcmd("say /radio", "ClientCommand_HlmpMenu")
  93. register_clcmd("say_team /hlmp", "ClientCommand_HlmpMenu")
  94. register_clcmd("say_team /music", "ClientCommand_HlmpMenu")
  95. register_clcmd("say_team /radio", "ClientCommand_HlmpMenu")
  96.  
  97. register_clcmd("say /stop", "ClientCommand_StopMusic")
  98. register_clcmd("say_team /stop", "ClientCommand_StopMusic")
  99.  
  100. Read_ConfigFile()
  101. Read_OpeningMotdCommandsFile()
  102.  
  103. g_iNvault = nvault_open("hlmp")
  104. nvault_prune(g_iNvault, 0, get_systime(-(A_DAY_IN_SECONDS * NVAULT_MAX_DAYS_SAVE)) )
  105.  
  106. gmsgMOTD = get_user_msgid("MOTD")
  107. }
  108.  
  109. Read_ConfigFile()
  110. {
  111. new szConfigFile[64]
  112. get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile))
  113. format(szConfigFile, charsmax(szConfigFile), "%s/mediafiles.ini", szConfigFile)
  114.  
  115. new iFile = fopen(szConfigFile, "rt")
  116.  
  117. if(!iFile)
  118. {
  119. return
  120. }
  121.  
  122. g_aGroups = ArrayCreate(Group)
  123.  
  124. new iGroup
  125. new szText[Radios+16], RadioDatas[Radios], GroupDatas[Group]
  126. new Array:aRadiosDatas
  127.  
  128. while(!feof(iFile))
  129. {
  130. fgets(iFile, szText, charsmax(szText))
  131. trim( szText )
  132.  
  133. if(!szText[0] || szText[0] == '#' || szText[0] == ';' || (szText[0] == '/' && szText[1] == '/'))
  134. {
  135. continue
  136. }
  137.  
  138. if( szText[0] == '[' )
  139. {
  140. iGroup++
  141. aRadiosDatas = ArrayCreate( Radios )
  142.  
  143. strtok(szText[1], GroupDatas[GroupName], charsmax(GroupDatas[GroupName]), RadioDatas, 1, ']', 0)
  144. GroupDatas[GroupArrayOffset] = _:aRadiosDatas
  145.  
  146. ArrayPushArray(g_aGroups, GroupDatas)
  147. }
  148. else if( iGroup )
  149. {
  150. parse( szText,
  151. RadioDatas[RadioName], charsmax(RadioDatas[RadioName]),
  152. RadioDatas[RadioUrl], charsmax(RadioDatas[RadioUrl]) )
  153.  
  154. ArrayPushString(aRadiosDatas, RadioDatas)
  155. }
  156. }
  157. fclose(iFile)
  158.  
  159. g_iGroupsCount = ArraySize(g_aGroups)
  160. }
  161.  
  162. Read_OpeningMotdCommandsFile()
  163. {
  164. new szConfigFile[64]
  165. get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile))
  166. format(szConfigFile, charsmax(szConfigFile), "%s/hlmp_motd.ini", szConfigFile)
  167. new iFile = fopen(szConfigFile, "rt")
  168. if( iFile )
  169. {
  170. new szText[64], szCommand[32]
  171. while(!feof(iFile))
  172. {
  173. fgets(iFile, szText, charsmax(szText))
  174. trim( szText )
  175. if(!szText[0] || szText[0] == '#' || szText[0] == ';' || (szText[0] == '/' && szText[1] == '/'))
  176. {
  177. continue
  178. }
  179. parse(szText, szCommand, charsmax(szCommand))
  180. register_clcmd(szCommand, "OpeningMotdCommands")
  181. }
  182. }
  183. }
  184.  
  185. public plugin_end()
  186. {
  187. new TempGroup[Group], iSize = ArraySize(g_aGroups)
  188.  
  189. for(new i; i<iSize; i++)
  190. {
  191. ArrayGetArray(g_aGroups, i, TempGroup)
  192. ArrayDestroy(TempGroup[GroupArrayOffset])
  193. }
  194.  
  195. ArrayDestroy(g_aGroups)
  196.  
  197. nvault_close(g_iNvault)
  198. }
  199.  
  200. public client_connect(id)
  201. {
  202. g_szAuthid[id] = "C"
  203. }
  204.  
  205. public client_authorized( id )
  206. {
  207. if( g_szAuthid[id][0] == 'P' )
  208. {
  209. get_user_authid(id, g_szAuthid[id], AUTHID_LENGTH-1)
  210. GetPlayerSettings(id)
  211. }
  212. else
  213. {
  214. get_user_authid(id, g_szAuthid[id], AUTHID_LENGTH-1)
  215. }
  216. }
  217.  
  218. public client_putinserver(id)
  219. {
  220. g_iMenuOption[id] = mGroups
  221. g_PlayerGroup[id][GroupName][0] = 0
  222. g_PlayerGroup[id][GroupArrayOffset] = 0
  223.  
  224. if( g_szAuthid[id][0] == 'C' )
  225. {
  226. g_szAuthid[id] = "P"
  227. return
  228. }
  229.  
  230. static szSettings[8], szVolume[4], szRepeat[2], szListening[2], iVolume, iDisconnectTime
  231. nvault_lookup(g_iNvault, g_szAuthid[id], szSettings, charsmax(szSettings), iDisconnectTime)
  232. parse(szSettings, szVolume, charsmax(szVolume), szRepeat, charsmax(szRepeat), szListening, charsmax(szListening))
  233.  
  234. if( (iVolume = str_to_num(szVolume)) )
  235. {
  236. g_iVolume[id] = min(iVolume, 100)
  237. }
  238. else
  239. {
  240. g_iVolume[id] = DEFAULT_VOLUME
  241. }
  242.  
  243. if( str_to_num(szRepeat) )
  244. {
  245. SetIdBits(g_bRepeat, id)
  246. }
  247. else
  248. {
  249. ClearIdBits(g_bRepeat, id)
  250. }
  251.  
  252. if( get_systime() - iDisconnectTime < MAX_RECONNECT_TIME
  253. && str_to_num(szListening) == 1
  254. && get_pcvar_num(g_pCvarNoMotd) )
  255. {
  256. SetIdBits(g_bListening, id)
  257. g_iMotdRegistered = register_message(gmsgMOTD, "Message_MOTD")
  258. }
  259. else
  260. {
  261. ClearIdBits(g_bListening, id)
  262. }
  263. }
  264.  
  265. GetPlayerSettings(id)
  266. {
  267. new szSettings[8], szVolume[4], szRepeat[2], iVolume
  268. nvault_get(g_iNvault, g_szAuthid[id], szSettings, charsmax(szSettings))
  269. parse(szSettings, szVolume, charsmax(szVolume), szRepeat, charsmax(szRepeat))
  270.  
  271. if( (iVolume = str_to_num(szVolume)) )
  272. {
  273. g_iVolume[id] = min(iVolume, 100)
  274. }
  275. else
  276. {
  277. g_iVolume[id] = DEFAULT_VOLUME
  278. }
  279.  
  280. if( str_to_num(szRepeat) )
  281. {
  282. SetIdBits(g_bRepeat, id)
  283. }
  284. else
  285. {
  286. ClearIdBits(g_bRepeat, id)
  287. }
  288.  
  289. ClearIdBits(g_bListening, id)
  290. }
  291.  
  292. public client_disconnect( id )
  293. {
  294. static szSettings[8]
  295. formatex(szSettings, charsmax(szSettings), "%d %d %d",
  296. g_iVolume[id],
  297. _:!!(GetIdBits(g_bRepeat, id)),
  298. _:!!(GetIdBits(g_bListening, id)))
  299. nvault_set(g_iNvault, g_szAuthid[id], szSettings)
  300.  
  301. g_szAuthid[id] = "D"
  302. }
  303.  
  304. public Message_MOTD(iMsgId, iDest, id)
  305. {
  306. if( GetIdBits(g_bListening, id) )
  307. {
  308. if( get_msg_arg_int(1) )
  309. {
  310. unregister_message(gmsgMOTD, g_iMotdRegistered)
  311. }
  312. return PLUGIN_HANDLED
  313. }
  314. return PLUGIN_CONTINUE
  315. }
  316.  
  317. public ClientCommand_HlmpMenu(id)
  318. {
  319. DisplayMenu(id, g_iMenuPosition[id] = 0)
  320. }
  321.  
  322. DisplayMenu(id, iPos = 0)
  323. {
  324. new szMenu[1024], n
  325. new iKeys = MENU_KEY_6|MENU_KEY_7|MENU_KEY_0
  326.  
  327. n = formatex(szMenu[n], charsmax(szMenu)-n, "\rHL Media Player (HLMP %s)^n", VERSION)
  328.  
  329. switch( g_iMenuOption[id] )
  330. {
  331. case mGroups:
  332. {
  333. new iStart = iPos * 5
  334. new iStop = min(iStart + 5 , g_iGroupsCount)
  335. new aGroup[Group]
  336.  
  337. n += formatex(szMenu[n], charsmax(szMenu)-n, "\d%L^n", id, "HLMP_GROUPS")
  338.  
  339. for(new i=iStart, j; i<iStop; i++)
  340. {
  341. iKeys |= (1<<j)
  342. ArrayGetArray(g_aGroups, i, aGroup)
  343. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w%d. \r%s^n", ++j, aGroup[GroupName])
  344. }
  345. iPos = iStop - iStart
  346. if( iPos < 5 )
  347. {
  348. for(new i; i < 5-iPos; i++)
  349. {
  350. n += formatex(szMenu[n], charsmax(szMenu)-n, "^n")
  351. }
  352. }
  353.  
  354. if( g_PlayerGroup[id][GroupName][0] )
  355. {
  356. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w6. \y%s^n", g_PlayerGroup[id][GroupName])
  357. }
  358. else
  359. {
  360. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w6. \y%L^n", id, "HLMP_CONFIG")
  361. }
  362. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w7. \y%L^n\w", id, "HLMP_STOPMUSIC")
  363.  
  364. if( iStart )
  365. {
  366. iKeys |= MENU_KEY_8
  367. n += formatex(szMenu[n], charsmax(szMenu)-n, "8. %L^n", id, "BACK")
  368. }
  369. else
  370. {
  371. n += formatex(szMenu[n], charsmax(szMenu)-n, "^n")
  372. }
  373.  
  374. if( iStop < g_iGroupsCount )
  375. {
  376. iKeys |= MENU_KEY_9
  377. n += formatex(szMenu[n], charsmax(szMenu)-n, "9. %L^n", id, "MORE")
  378. }
  379. else
  380. {
  381. n += formatex(szMenu[n], charsmax(szMenu)-n, "^n")
  382. }
  383. }
  384. case mRadios:
  385. {
  386. new Array:aRadios = g_PlayerGroup[id][GroupArrayOffset]
  387. new aCurRadio[Radios]
  388. new iRadiosNum = ArraySize(aRadios)
  389.  
  390. new iStart = iPos * 5
  391. new iStop = min(iStart + 5 , iRadiosNum)
  392.  
  393. n += formatex(szMenu[n], charsmax(szMenu)-n, "\d%s^n", g_PlayerGroup[id][GroupName])
  394.  
  395. for(new i=iStart, j; i<iStop; i++)
  396. {
  397. iKeys |= (1<<j)
  398. ArrayGetArray(aRadios, i, aCurRadio)
  399. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w%d. \r%s^n", ++j, aCurRadio[RadioName])
  400. }
  401. iPos = iStop - iStart
  402. if( iPos < 5 )
  403. {
  404. for(new i; i< 5 - iPos; i++)
  405. {
  406. n += formatex(szMenu[n], charsmax(szMenu)-n, "^n")
  407. }
  408. }
  409.  
  410. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w6. \y%L^n", id, "HLMP_CONFIG")
  411. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w7. \y%L^n\w", id, "HLMP_STOPMUSIC")
  412.  
  413. if( iStart )
  414. {
  415. iKeys |= MENU_KEY_8
  416. n += formatex(szMenu[n], charsmax(szMenu)-n, "8. %L^n", id, "BACK")
  417. }
  418. else
  419. {
  420. n += formatex(szMenu[n], charsmax(szMenu)-n, "^n")
  421. }
  422.  
  423. if( iStop < iRadiosNum )
  424. {
  425. iKeys |= MENU_KEY_9
  426. n += formatex(szMenu[n], charsmax(szMenu)-n, "9. %L^n", id, "MORE")
  427. }
  428. else
  429. {
  430. n += formatex(szMenu[n], charsmax(szMenu)-n, "^n")
  431. }
  432.  
  433. }
  434. case mConfig:
  435. {
  436. iKeys |= MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_6|MENU_KEY_7
  437.  
  438. n += formatex(szMenu[n], charsmax(szMenu)-n, "\d%L^n", id, "HLMP_CONFIG")
  439.  
  440. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w1. \y%L\R%L^n", id, "HLMP_REPEAT", id, GetIdBits(g_bRepeat, id) ? "ON" : "OFF")
  441. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w2. \y%L +\R%d^n", id, "HLMP_VOLUME", g_iVolume[id])
  442. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w3. \y%L -^n", id, "HLMP_VOLUME")
  443. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w4. \y%L^n^n", id, "HLMP_ABOUT")
  444.  
  445. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w6. \yGroups^n")
  446. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w7. \y%L^n^n^n", id, "HLMP_STOPMUSIC")
  447. }
  448. }
  449.  
  450. n += formatex(szMenu[n], charsmax(szMenu)-n, "\w0. %L", id, "EXIT")
  451.  
  452. show_menu(id, iKeys, szMenu, 30, "HLMP")
  453.  
  454. return PLUGIN_HANDLED
  455. }
  456.  
  457. public HlmpMenuAction(id, iKey)
  458. {
  459. switch( g_iMenuOption[id] )
  460. {
  461. case mGroups:
  462. {
  463. switch( iKey )
  464. {
  465. case 0..4:
  466. {
  467. ArrayGetArray(g_aGroups, g_iMenuPosition[id]*5 + iKey, g_PlayerGroup[id])
  468.  
  469. g_iMenuOption[id] = mRadios
  470. DisplayMenu(id, g_iMenuPosition[id] = 0)
  471. }
  472. case 5:
  473. {
  474. if( g_PlayerGroup[id][GroupArrayOffset] )
  475. {
  476. g_iMenuOption[id] = mRadios
  477. DisplayMenu(id, g_iMenuPosition[id])
  478. }
  479. else
  480. {
  481. g_iMenuOption[id] = mConfig
  482. DisplayMenu(id, g_iMenuPosition[id] = 0)
  483. }
  484. }
  485. case 6:
  486. {
  487. ClientCommand_StopMusic(id)
  488. }
  489. case 7:
  490. {
  491. if( --g_iMenuPosition[id] < 0 )
  492. {
  493. g_iMenuPosition[id] = 0
  494. }
  495. DisplayMenu(id, g_iMenuPosition[id])
  496. }
  497. case 8:
  498. {
  499. if( ++g_iMenuPosition[id] >= g_iGroupsCount / 5 )
  500. {
  501. g_iMenuPosition[id] = g_iGroupsCount / 5
  502. }
  503. DisplayMenu(id, g_iMenuPosition[id])
  504. }
  505. case 9:
  506. {
  507. return PLUGIN_HANDLED
  508. }
  509. }
  510. }
  511. case mRadios:
  512. {
  513. switch( iKey )
  514. {
  515. case 0..4:
  516. {
  517. PlayMusic(id, g_PlayerGroup[id][GroupArrayOffset], g_iMenuPosition[id]*5 + iKey)
  518. }
  519. case 5:
  520. {
  521. g_iMenuOption[id] = mConfig
  522. DisplayMenu(id, g_iMenuPosition[id] = 0)
  523. }
  524. case 6:
  525. {
  526. ClientCommand_StopMusic(id)
  527. }
  528. case 7:
  529. {
  530. if( --g_iMenuPosition[id] < 0 )
  531. {
  532. g_iMenuPosition[id] = 0
  533. }
  534. DisplayMenu(id, g_iMenuPosition[id])
  535. }
  536. case 8:
  537. {
  538. new iSize = ArraySize(g_PlayerGroup[id][GroupArrayOffset])
  539. if( ++g_iMenuPosition[id] >= iSize / 5 )
  540. {
  541. g_iMenuPosition[id] = iSize / 5
  542. }
  543. DisplayMenu(id, g_iMenuPosition[id])
  544. }
  545. case 9:
  546. {
  547. return PLUGIN_HANDLED
  548. }
  549. }
  550. }
  551. case mConfig:
  552. {
  553. switch( iKey )
  554. {
  555. case 0:
  556. {
  557. if( GetIdBits(g_bRepeat, id) )
  558. {
  559. ClearIdBits(g_bRepeat, id)
  560. }
  561. else
  562. {
  563. SetIdBits(g_bRepeat, id)
  564. }
  565. client_print(id, print_chat, "%L", id, "HLMP_CONFIGMENUTIP")
  566. DisplayMenu(id)
  567. }
  568. case 1:
  569. {
  570. if( (g_iVolume[id] += 5) > 100)
  571. {
  572. g_iVolume[id] = 100
  573. }
  574. client_print(id, print_chat, "%L", id, "HLMP_CONFIGMENUTIP")
  575. DisplayMenu(id)
  576. }
  577. case 2:
  578. {
  579. if( (g_iVolume[id] -= 5) < 0)
  580. {
  581. g_iVolume[id] = 0
  582. }
  583. client_print(id, print_chat, "%L", id, "HLMP_CONFIGMENUTIP")
  584. DisplayMenu(id)
  585. }
  586. case 3:
  587. {
  588. client_print(id, print_chat, "A plugin %s -es verziojat forditotta Chrysler |msn: chrysler.sw@gmail.com ", VERSION)
  589. client_print(id, print_center, "A plugin %s - es verziojat forditotta Chrysler ", VERSION)
  590. client_print(id, print_console, "http://forums.alliedmods.net/showthread.php?p=833070#post833070")
  591. }
  592. case 5:
  593. {
  594. g_iMenuOption[id] = mGroups
  595. DisplayMenu(id, g_iMenuPosition[id] = 0)
  596. }
  597. case 6:
  598. {
  599. ClientCommand_StopMusic(id)
  600. }
  601. case 9:
  602. {
  603. return PLUGIN_HANDLED
  604. }
  605. default:
  606. {
  607. DisplayMenu(id)
  608. }
  609. }
  610. }
  611. }
  612. return PLUGIN_HANDLED
  613. }
  614.  
  615. PlayMusic(id, Array:aGroup, iRadio)
  616. {
  617. new Radio[Radios]
  618. ArrayGetArray(aGroup, iRadio, Radio)
  619.  
  620. if( get_pcvar_num(g_pCvarShowAll) )
  621. {
  622. new szName[32]
  623. get_user_name(id, szName, charsmax(szName))
  624. client_print(0, print_chat, "%L", LANG_PLAYER, "HLMP_LISTENING", szName, Radio[RadioName])
  625. }
  626.  
  627. new szMotd[1024], n
  628.  
  629. n = formatex(szMotd[n], charsmax(szMotd)-n, "<html><head><meta http-equiv=^"content-type^" content=^"text/html; charset=UTF-8^"></head><body bgcolor=^"#000000^" align=^"center^"><span style=^"color: #FFB000; font-size: 9pt^">Now playing: %s <br>", Radio[RadioName])
  630. n += formatex(szMotd[n], charsmax(szMotd)-n, "<object classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 codebase=http://www.microsoft.com/ntserver/netshow/download/en/nsmp2inf.cab#Version=5,1,51,415 type=application/x-oleobject name=msplayer width=256 height=65 align=^"middle^" id=msplayer>")
  631. n += formatex(szMotd[n], charsmax(szMotd)-n, "<param name=^"enableContextMenu^" value=^"0^"><param name=^"stretchToFit^" value=^"1^">")
  632. if(GetIdBits(g_bRepeat, id))
  633. {
  634. n += formatex(szMotd[n], charsmax(szMotd)-n, "<param name=^"AutoRewind^" value=^"1^">")
  635. }
  636. n += formatex(szMotd[n], charsmax(szMotd)-n, "<param name=^"Volume^" value=^"%d^">", g_iVolume[id])
  637. n += formatex(szMotd[n], charsmax(szMotd)-n, "<param name=^"AutoStart^" value=^"1^"><param name=^"URL^" value=^"%s^">", Radio[RadioUrl])
  638. n += formatex(szMotd[n], charsmax(szMotd)-n, "<param name=^"uiMode^" value=^"full^"><param name=^"width^" value=^"256^"><param name=^"height^" value=^"65^">")
  639. n += formatex(szMotd[n], charsmax(szMotd)-n, "<param name=^"TransparentAtStart^" value=^"1^"></object><br>^"%L^"</span>", id, "HLMP_CLOSEWINDOW")
  640. n += formatex(szMotd[n], charsmax(szMotd)-n, "</body></html>")
  641.  
  642. show_motd(id, szMotd, "HL Media Player")
  643.  
  644. SetIdBits(g_bListening, id)
  645. }
  646.  
  647. public ClientCommand_StopMusic(id)
  648. {
  649. new szMotd[256]
  650. formatex(szMotd, charsmax(szMotd), "<html><head><meta http-equiv=^"content-type^" content=^"text/html; charset=UTF-8^"></head><body bgcolor=^"#000000^" align=^"center^"><span style=^"color: #FFB000; font-size: 9pt^">^"%L^"</span></body></html>", id, "HLMP_CLOSEWINDOW")
  651. show_motd(id, szMotd, "HL Media Player")
  652. ClearIdBits(g_bListening, id)
  653. return PLUGIN_HANDLED
  654. }
  655.  
  656. public OpeningMotdCommands(id)
  657. {
  658. ClearIdBits(g_bListening, id)
  659.  


SMA megvan!
Mediafiles.ini HIÁNYZIK!

_________________
Ha segítettem használd a gombot!

Kép
KépKép

Ők köszönték meg Beckx nek ezt a hozzászólást: Truth (2014.03.22. 11:29)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Rádió
HozzászólásElküldve: 2014.03.22. 11:54 
Offline
Senior Tag
Avatar

Csatlakozott: 2014.02.10. 19:10
Hozzászólások: 252
Megköszönt másnak: 10 alkalommal
Megköszönték neki: 44 alkalommal
tessék ittvan: https://forums.alliedmods.net/showthread.php?p=833070
ha nemtudod hogy kell berakni a linket írj!!

_________________
Általam feltöltött PLUGINOK:
Kattints ide.

Chat INFO MENÜ 0.3 =98%

Ők köszönték meg dekarn nek ezt a hozzászólást: Truth (2014.03.22. 13:01)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Rádió
HozzászólásElküldve: 2014.03.22. 13:01 
Offline
Tag
Avatar

Csatlakozott: 2013.12.31. 23:06
Hozzászólások: 34
Megköszönt másnak: 4 alkalommal
Köszi mindkettőtöknek! :D


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


Ki van itt

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