hlmod.hu
https://hlmod.hu/

Awp adás mindenkibek, gombra
https://hlmod.hu/viewtopic.php?f=29&t=6604
Oldal: 3 / 3

Szerző:  theglorious [ 2012.11.15. 14:42 ]
Hozzászólás témája:  Re: Awp adás mindenkibek, gombra

2 hiba van, 1. A chatba kiírja de anyiszor ahány játékos van a szerveren...
2. A wp-t is eldobja! Pls javítsátok :)

Szerző:  HunGamer [ 2012.11.15. 20:53 ]
Hozzászólás témája:  Re: Awp adás mindenkibek, gombra

Na akkor ez jó lesz.
[ablak]
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <fun>
  5.  
  6. #define PLUGIN "AWP Mindenkinek"
  7. #define VERSION "1.0"
  8. #define AUTHOR "Bence98007"
  9.  
  10. const PRIMARY_WEAPONS_BIT_SUM =
  11. (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<
  12. CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90)
  13.  
  14. public plugin_init()
  15. {
  16. register_plugin(PLUGIN, VERSION, AUTHOR)
  17.  
  18. register_clcmd("say /wpadd", "wpadd")
  19. register_clcmd("say_team /wpadd", "wpadd")
  20. }
  21.  
  22. public wpadd(id)
  23. {
  24. if(!(get_user_flags(id) & ADMIN_BAN))
  25. {
  26. print_color(id, "!tEhhez a parancshoz nincs elerhetőséged.")
  27. return PLUGIN_HANDLED
  28. }
  29.  
  30. new players[32], pnum
  31. get_players(players, pnum, "a")
  32. for (new i=0; i<pnum; i++)
  33. {
  34. drop_weapons(players[i])
  35. give_item(players[i], "weapon_awp")
  36. cs_set_user_bpammo(players[i], CSW_AWP, 30)
  37. give_item(players[i], "weapon_knife")
  38. print_color(players[i], "!y[ide a szeró nevét beírom...] !tA WP-k kiosztva, jó szórakozást!")
  39. }
  40. return PLUGIN_HANDLED
  41. }
  42. stock print_color(const id, const input[], any:...)
  43. {
  44. new count = 1, players[32]
  45. static msg[191]
  46. vformat(msg, 190, input, 3)
  47.  
  48. replace_all(msg, 190, "!g", "^4")
  49. replace_all(msg, 190, "!y", "^1")
  50. replace_all(msg, 190, "!t", "^3")
  51.  
  52. if (id) players[0] = id; else get_players(players, count, "ch")
  53. {
  54. for (new i = 0; i < count; i++)
  55. {
  56. if (is_user_connected(players[i]))
  57. {
  58. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  59. write_byte(players[i])
  60. write_string(msg)
  61. message_end()
  62. }
  63. }
  64. }
  65. return PLUGIN_HANDLED
  66. }
  67. stock drop_weapons(id)
  68. {
  69. static weapons[32], num, i, weaponid
  70. num = 0
  71. get_user_weapons(id, weapons, num)
  72.  
  73. for (i = 0; i < num; i++)
  74. {
  75. weaponid = weapons[i]
  76.  
  77. if (((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM))
  78. {
  79. static wname[32]
  80. get_weaponname(weaponid, wname, sizeof wname - 1)
  81. engclient_cmd(id, "drop", wname)
  82. }
  83. }
  84. }
  85.  
[/ablak]

Szerző:  theglorious [ 2012.11.15. 21:51 ]
Hozzászólás témája:  Re: Awp adás mindenkibek, gombra

Köszönöm, holnap megnézem jó-e.
Ékezetes betükkel fogja kiírni vagy ékezet nélkül? Az sma-ban ékezettel vannak :)

Szerző:  ultraibolya [ 2012.11.16. 07:00 ]
Hozzászólás témája:  Re: Awp adás mindenkibek, gombra

nem ékezetes betűkkel van.

Oldal: 3 / 3 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/