hlmod.hu

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



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: 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  [ 7 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Cs 1.6 ns+steam
HozzászólásElküldve: 2014.04.28. 21:23 
Offline
Tag
Avatar

Csatlakozott: 2014.03.29. 15:19
Hozzászólások: 39
Megköszönt másnak: 17 alkalommal
Sziasztok valaki tudna abba segíteni hogy a szerveremre kellene 2 plugin az egyik 1.Ns+steames halja egymást mikrofonon a 2.játékosok elé ki irja hogy NS vagy Steames prefixet
meg köszönném ha tudnátok segíteni!

_________________
STEAM:
[steam]nemethbecknorbi[/steam]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Cs 1.6 ns+steam
HozzászólásElküldve: 2014.04.28. 21:46 
Offline
Nagyúr
Avatar

Csatlakozott: 2013.09.04. 15:21
Hozzászólások: 635
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 141 alkalommal
1. viewtopic.php?f=78&t=13704

_________________
My Steam:
KépKép

Ők köszönték meg Golo nek ezt a hozzászólást: koEwOw (2014.04.29. 20:19)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Cs 1.6 ns+steam
HozzászólásElküldve: 2014.04.29. 14:51 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2013.03.03. 14:21
Hozzászólások: 105
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 26 alkalommal
koEwOw írta:
Sziasztok valaki tudna abba segíteni hogy a szerveremre kellene 2 plugin az egyik 1.Ns+steames halja egymást mikrofonon a 2.játékosok elé ki irja hogy NS vagy Steames prefixet
meg köszönném ha tudnátok segíteni!


2.
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "STEAM Players"
  5. #define VERSION "0.0b"
  6. #define AUTHOR "Quit edit"
  7.  
  8. #define ACCESS_LEVEL ADMIN_CVAR
  9. #define ADMIN_LISTEN ADMIN_RCON
  10.  
  11. new message[192]
  12. new sayText
  13. new teamInfo
  14. new maxPlayers
  15.  
  16. new show_ip,show_steamid,show_time,show_ping,show_loss;
  17.  
  18. new g_MessageColor
  19. new g_NameColor
  20. new g_AdminListen
  21.  
  22. new strName[191]
  23. new strText[191]
  24. new alive[11]
  25.  
  26. public plugin_init()
  27. {
  28. register_plugin (PLUGIN , VERSION , AUTHOR)
  29.  
  30. g_MessageColor = register_cvar ("amx_color", "1")
  31. g_NameColor = register_cvar ("amx_namecolor", "6")
  32. g_AdminListen = register_cvar ("amx_listen", "1")
  33. show_ip = register_cvar("sp_showip","0")
  34. show_steamid = register_cvar("sp_showsteamid","0")
  35. show_time = register_cvar("sp_showtime","0")
  36. show_ping = register_cvar("sp_showping","0")
  37. show_loss = register_cvar("sp_showloss","0")
  38.  
  39.  
  40. sayText = get_user_msgid ("SayText")
  41. teamInfo = get_user_msgid ("TeamInfo")
  42. maxPlayers = get_maxplayers()
  43.  
  44.  
  45. register_message (sayText, "det_duplicated")
  46.  
  47. register_clcmd ("amx_color", "set_color", ACCESS_LEVEL, "<color>")
  48. register_clcmd ("amx_namecolor", "set_name_color", ACCESS_LEVEL, "<color>")
  49. register_clcmd ("amx_listen", "set_listen", ACCESS_LEVEL, "<1 | 0>")
  50.  
  51. register_clcmd ("say /steamosok", "who_steam")
  52. register_clcmd ("say /sp", "who_steam")
  53. register_clcmd ("say /steamosjatekosok", "who_steam")
  54. register_clcmd ("say", "hook_say")
  55. register_clcmd ("say_team", "hook_teamsay")
  56. }
  57.  
  58.  
  59. public det_duplicated (msgId, msgDest, receiver)
  60. {
  61. return PLUGIN_HANDLED
  62. }
  63. public who_steam(id)
  64. {
  65. new bool:ip_showed = false
  66. new bool:steamid_showed = false
  67. new bool:time_showed = false
  68. new bool:ping_showed = false
  69. new bool:loss_showed = false
  70. if (get_pcvar_num(show_ip)>0)
  71. {
  72. ip_showed = true
  73. }
  74. if (get_pcvar_num(show_steamid)>0)
  75. {
  76. steamid_showed = true
  77. }
  78. if (get_pcvar_num(show_time)>0)
  79. {
  80. time_showed = true
  81. }
  82. if (get_pcvar_num(show_ping)>0)
  83. {
  84. ping_showed = true
  85. }
  86. if (get_pcvar_num(show_loss)>0)
  87. {
  88. loss_showed = true
  89. }
  90.  
  91. new players[32], playersFound
  92. get_players(players,playersFound)
  93. new pos, message[2048]
  94. new name[40], ip[30],steamid[32], ping, loss;
  95. new str_pt[6],str_pi[6],str_lo[6]
  96. pos += format(message[pos],2048 - pos,"<STYLE>body{background:#232323;color:#cfcbc2;margin:20px}table{width:100%%;line-height:160%%;font-size:12px}th{background:#2f3030;color:#c4b550;text-align:left}.q{border:2px solid #4a4945}tr{background:#4a4945}.b{background:#3b3b37}</STYLE>")
  97. for (new i = 0;i < playersFound;i++)
  98. {
  99. new bool:steam = false
  100. if (is_user_steam(id))
  101. steam = true
  102. new bool:bot = false
  103. if (is_user_bot(id))
  104. bot = true
  105. get_user_name(players[i],name,39)
  106. get_user_ip(players[i],ip,29,1)
  107. get_user_authid(players[i], steamid, 31)
  108. num_to_str(get_user_time(players[i]),str_pt,5)
  109. get_user_ping(players[i],ping,loss)
  110. num_to_str(ping,str_pi,5)
  111. num_to_str(loss,str_lo,5)
  112.  
  113. pos += format(message[pos],2048 - pos,"%d.<font color=^"red^">%s</font> <font color=^"green^">%s</font>%s %s%s",i+1,name,steam?"[STEAM]":"",bot?"[BOT]":"",ip_showed?"IP:":"",ip_showed?ip:"")
  114. pos += format(message[pos],2048 - pos," %s%s %s%s",steamid_showed?"STEAMID:":"",steamid_showed?steamid:"",time_showed?"TIME:":"",time_showed?str_pt:"")
  115. pos += format(message[pos],2048 - pos," %s%s %s%s^n",ping_showed?"PING":"",ping_showed?str_pi:"",loss_showed?"LOSS:":"",loss_showed?str_lo:"")
  116. }
  117. show_motd(id,message,"STEAMOS Jatekosok")
  118. return PLUGIN_HANDLED
  119. }
  120. public hook_say(id)
  121. {
  122. read_args (message, 191)
  123. remove_quotes (message)
  124.  
  125. if (message[0] == '@' || message[0] == '/' || message[0] == '!' || equal (message, ""))
  126.  
  127. return PLUGIN_CONTINUE
  128.  
  129.  
  130. new name[32]
  131. get_user_name (id, name, 31)
  132.  
  133. new bool:steam = false
  134.  
  135. if (is_user_steam(id))
  136. steam = true
  137.  
  138.  
  139. new isAlive
  140.  
  141. if (is_user_alive (id))
  142. {
  143. isAlive = 1
  144. alive = "^x01"
  145. }
  146. else
  147. {
  148. isAlive = 0
  149. alive = "^x01"
  150. }
  151.  
  152. static color[10]
  153.  
  154.  
  155.  
  156. if (steam)
  157. {
  158. switch (get_pcvar_num (g_NameColor))
  159. {
  160. case 1:
  161. format (strName, 191, "%s^x04[STEAM] ^x03%s", alive, name)
  162.  
  163. case 2:
  164. format (strName, 191, "%s^x04[STEAM] ^x03%s", alive, name)
  165.  
  166. case 3:
  167. {
  168. color = "SPECTATOR"
  169. format (strName, 191, "%s^x04[STEAM] ^x03%s", alive, name)
  170. }
  171.  
  172. case 4:
  173. {
  174. color = "CT"
  175. format (strName, 191, "%s^x04[STEAM] ^x03%s", alive, name)
  176. }
  177.  
  178. case 5:
  179. {
  180. color = "TERRORIST"
  181. format (strName, 191, "%s^x04[STEAM] ^x03%s", alive, name)
  182. }
  183.  
  184. case 6:
  185. {
  186. get_user_team (id, color, 9)
  187.  
  188. format (strName, 191, "%s^x04[STEAM] ^x03%s", alive, name)
  189. }
  190. }
  191.  
  192. switch (get_pcvar_num (g_MessageColor))
  193. {
  194. case 1: // Yellow
  195. format (strText, 191, "%s", message)
  196.  
  197. case 2: // Green
  198. format (strText, 191, "^x04%s", message)
  199.  
  200. case 3: // White
  201. {
  202. copy (color, 9, "SPECTATOR")
  203. format (strText, 191, "^x03%s", message)
  204. }
  205.  
  206. case 4: // Blue
  207. {
  208. copy (color, 9, "CT")
  209. format (strText, 191, "^x03%s", message)
  210. }
  211.  
  212. case 5: // Red
  213. {
  214. copy (color, 9, "TERRORIST")
  215. format (strText, 191, "^x03%s", message)
  216. }
  217. }
  218. }
  219.  
  220. else
  221. {
  222. get_user_team (id, color, 9)
  223.  
  224. format (strName, 191, "%s^x04[NS] ^x03%s", alive, name)
  225.  
  226. format (strText, 191, "%s", message)
  227. }
  228.  
  229. format (message, 191, "%s^x01: %s", strName, strText)
  230.  
  231. sendMessage (color, isAlive)
  232.  
  233. return PLUGIN_CONTINUE
  234. }
  235.  
  236.  
  237. public hook_teamsay(id)
  238. {
  239. new playerTeam = get_user_team(id)
  240. new playerTeamName[19]
  241.  
  242. switch (playerTeam)
  243. {
  244. case 1:
  245. copy (playerTeamName, 11, "Terrorists")
  246.  
  247. case 2:
  248. copy (playerTeamName, 18, "Counter-Terrorists")
  249.  
  250. default:
  251. copy (playerTeamName, 9, "Spectator")
  252. }
  253.  
  254. read_args (message, 191)
  255. remove_quotes (message)
  256.  
  257. if (message[0] == '@' || message[0] == '/' || message[0] == '!' || equal (message, ""))
  258.  
  259. return PLUGIN_CONTINUE
  260.  
  261.  
  262. new name[32]
  263. get_user_name (id, name, 31)
  264.  
  265. new bool:steam = false
  266.  
  267. if (is_user_steam(id))
  268. steam = true
  269.  
  270.  
  271. new isAlive
  272.  
  273. if (is_user_alive (id))
  274. {
  275. isAlive = 1
  276. alive = "^x01"
  277. }
  278. else
  279. {
  280. isAlive = 0
  281. alive = "^x01"
  282. }
  283.  
  284. static color[10]
  285.  
  286.  
  287.  
  288. if (steam)
  289. {
  290. switch (get_pcvar_num (g_NameColor))
  291. {
  292. case 1:
  293. format (strName, 191, "%s^x04[STEAM] ^x03%s", alive, name)
  294.  
  295. case 2:
  296. format (strName, 191, "%s^x04[STEAM] ^x03%s", alive, name)
  297.  
  298. case 3:
  299. {
  300. color = "SPECTATOR"
  301. format (strName, 191, "%s^x04[STEAM] ^x03%s", alive, name)
  302. }
  303.  
  304. case 4:
  305. {
  306. color = "CT"
  307. format (strName, 191, "%s^x04[STEAM] ^x03%s", alive, name)
  308. }
  309.  
  310. case 5:
  311. {
  312. color = "TERRORIST"
  313. format (strName, 191, "%s^x04[STEAM] ^x03%s", alive, name)
  314. }
  315.  
  316. case 6:
  317. {
  318. get_user_team (id, color, 9)
  319.  
  320. format (strName, 191, "%s^x04[STEAM] ^x03%s", alive, name)
  321. }
  322. }
  323.  
  324. switch (get_pcvar_num (g_MessageColor))
  325. {
  326. case 1: // Yellow
  327. format (strText, 191, "%s", message)
  328.  
  329. case 2: // Green
  330. format (strText, 191, "^x04%s", message)
  331.  
  332. case 3: // White
  333. {
  334. copy (color, 9, "SPECTATOR")
  335. format (strText, 191, "^x03%s", message)
  336. }
  337.  
  338. case 4: // Blue
  339. {
  340. copy (color, 9, "CT")
  341. format (strText, 191, "^x03%s", message)
  342. }
  343.  
  344. case 5: // Red
  345. {
  346. copy (color, 9, "TERRORIST")
  347. format (strText, 191, "^x03%s", message)
  348. }
  349. }
  350. }
  351.  
  352. else
  353. {
  354. get_user_team (id, color, 9)
  355.  
  356. format (strName, 191, "%s^x04[NS] ^x03%s", alive, name)
  357.  
  358. format (strText, 191, "%s", message)
  359. }
  360.  
  361. format (message, 191, "%s^x01: %s", strName, strText)
  362.  
  363. sendTeamMessage (color, isAlive, playerTeam)
  364.  
  365. return PLUGIN_CONTINUE
  366. }
  367.  
  368.  
  369. public set_color (id, level, cid)
  370. {
  371. if (!cmd_access(id, level, cid, 2))
  372. return PLUGIN_HANDLED
  373.  
  374. new arg[1], newColor
  375. read_argv (1, arg, 1)
  376.  
  377. newColor = str_to_num (arg)
  378.  
  379. if (newColor >= 1 && newColor <= 5)
  380. {
  381. set_cvar_num ("amx_color", newColor)
  382. set_pcvar_num (g_MessageColor, newColor)
  383.  
  384. if (get_pcvar_num (g_NameColor) != 1 &&
  385. ((newColor == 3 && get_pcvar_num (g_NameColor) != 3)
  386. || (newColor == 4 && get_pcvar_num (g_NameColor) != 4)
  387. || (newColor == 5 && get_pcvar_num (g_NameColor) != 5)))
  388. {
  389. set_cvar_num ("amx_namecolor", 2)
  390. set_pcvar_num (g_NameColor, 2)
  391. }
  392. }
  393.  
  394. return PLUGIN_HANDLED
  395. }
  396.  
  397.  
  398. public set_name_color (id, level, cid)
  399. {
  400. if (!cmd_access(id, level, cid, 2))
  401. return PLUGIN_HANDLED
  402.  
  403. new arg[1], newColor
  404. read_argv (1, arg, 1)
  405.  
  406. newColor = str_to_num (arg)
  407.  
  408. if (newColor >= 1 && newColor <= 6)
  409. {
  410. set_cvar_num ("amx_namecolor", newColor)
  411. set_pcvar_num (g_NameColor, newColor)
  412.  
  413. if ((get_pcvar_num (g_MessageColor) != 1
  414. && ((newColor == 3 && get_pcvar_num (g_MessageColor) != 3)
  415. || (newColor == 4 && get_pcvar_num (g_MessageColor) != 4)
  416. || (newColor == 5 && get_pcvar_num (g_MessageColor) != 5)))
  417. || get_pcvar_num (g_NameColor) == 6)
  418. {
  419. set_cvar_num ("amx_color", 2)
  420. set_pcvar_num (g_MessageColor, 2)
  421. }
  422. }
  423.  
  424. return PLUGIN_HANDLED
  425. }
  426.  
  427.  
  428. public set_listen (id, level, cid)
  429. {
  430. if (!cmd_access(id, level, cid, 2))
  431. return PLUGIN_HANDLED
  432.  
  433. new arg[1], newListen
  434. read_argv(1, arg, 1)
  435.  
  436. newListen = str_to_num (arg)
  437.  
  438. set_cvar_num ("amx_listen", newListen)
  439. set_pcvar_num (g_AdminListen, newListen)
  440.  
  441. return PLUGIN_HANDLED
  442. }
  443.  
  444.  
  445. public sendMessage (color[], alive)
  446. {
  447. new teamName[10]
  448.  
  449. for (new player = 1; player < maxPlayers; player++)
  450. {
  451. if (!is_user_connected(player))
  452. continue
  453.  
  454. if (alive && is_user_alive(player) || !alive && !is_user_alive(player) || get_pcvar_num(g_AdminListen) && get_user_flags(player) & ADMIN_LISTEN)
  455. {
  456. get_user_team (player, teamName, 9)
  457.  
  458. changeTeamInfo (player, color)
  459.  
  460. writeMessage (player, message)
  461.  
  462. changeTeamInfo (player, teamName)
  463. }
  464. }
  465. }
  466.  
  467.  
  468. public sendTeamMessage (color[], alive, playerTeam)
  469. {
  470. new teamName[10]
  471.  
  472. for (new player = 1; player < maxPlayers; player++)
  473. {
  474. if (!is_user_connected(player))
  475. continue
  476.  
  477. if (get_user_team(player) == playerTeam || get_pcvar_num(g_AdminListen) && get_user_flags(player) & ADMIN_LISTEN)
  478. {
  479. if (alive && is_user_alive(player) || !alive && !is_user_alive(player) || get_pcvar_num(g_AdminListen) && get_user_flags(player) & ADMIN_LISTEN)
  480. {
  481. get_user_team (player, teamName, 9)
  482.  
  483. changeTeamInfo (player, color)
  484.  
  485. writeMessage (player, message)
  486.  
  487. changeTeamInfo (player, teamName)
  488. }
  489. }
  490. }
  491. }
  492.  
  493.  
  494. public changeTeamInfo (player, team[])
  495. {
  496. message_begin (MSG_ONE, teamInfo, _, player)
  497. write_byte (player)
  498. write_string (team)
  499. message_end()
  500. }
  501.  
  502.  
  503. public writeMessage (player, message[])
  504. {
  505. message_begin (MSG_ONE, sayText, {0, 0, 0}, player)
  506. write_byte (player)
  507. write_string (message)
  508. message_end ()
  509. }
  510. stock bool:is_user_steam(id)
  511. {
  512. static dp_pointer;
  513.  
  514. if (dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider")))
  515. {
  516. server_cmd("dp_clientinfo %d", id);
  517. server_exec();
  518. return (get_pcvar_num(dp_pointer) == 2) ? true : false;
  519. }
  520.  
  521. return false;
  522. }

_________________
Kép

Ők köszönték meg lbalazs96 nek ezt a hozzászólást: koEwOw (2014.04.29. 14:54)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Cs 1.6 ns+steam
HozzászólásElküldve: 2014.04.29. 19:09 
Offline
Tag
Avatar

Csatlakozott: 2014.03.29. 15:19
Hozzászólások: 39
Megköszönt másnak: 17 alkalommal
Köszönöm szépen mind a kettőt ment a (y)

_________________
STEAM:
[steam]nemethbecknorbi[/steam]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Cs 1.6 ns+steam
HozzászólásElküldve: 2014.04.29. 19:10 
Offline
Tag
Avatar

Csatlakozott: 2014.03.29. 15:19
Hozzászólások: 39
Megköszönt másnak: 17 alkalommal
Köszönöm szépen mind a kettőt ment a like

_________________
STEAM:
[steam]nemethbecknorbi[/steam]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Cs 1.6 ns+steam
HozzászólásElküldve: 2014.04.29. 19:13 
Offline
Nagyúr
Avatar

Csatlakozott: 2013.09.04. 15:21
Hozzászólások: 635
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 141 alkalommal
Nekem nem, de nem is kell :) nem vagyok rászorulva :D

_________________
My Steam:
KépKép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Cs 1.6 ns+steam
HozzászólásElküldve: 2014.04.29. 20:20 
Offline
Tag
Avatar

Csatlakozott: 2014.03.29. 15:19
Hozzászólások: 39
Megköszönt másnak: 17 alkalommal
Neked is megvolt:D (épp most)

_________________
STEAM:
[steam]nemethbecknorbi[/steam]


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 18 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