hlmod.hu
https://hlmod.hu/

Újraéledés
https://hlmod.hu/viewtopic.php?f=9&t=16164
Oldal: 1 / 1

Szerző:  asd [2014.06.08. 16:50 ]
Hozzászólás témája:  Újraéledés

Sziasztok!
Olyan plugin kéne :) amiben halál után egyből újra éled !
Megy a tetszik gomb!

Szerző:  Golo [2014.06.08. 16:51 ]
Hozzászólás témája:  Re: Újraéledés

https://forums.alliedmods.net/showthread.php?p=8906
viewtopic.php?f=101&t=12377

Szerző:  pixxa112 [2014.06.08. 16:52 ]
Hozzászólás témája:  Re: Újraéledés

asd írta:
Sziasztok!
Olyan plugin kéne :) amiben halál után egyből újra éled !
Megy a tetszik gomb!


SMA Forráskód: [ Mindet kijelol ]
  1. new const VERZIO[] = "1.1"
  2.  
  3. #include <amxmodx>
  4. #include <fun>
  5. #include <cstrike>
  6.  
  7. #define DISABLE_CS 0
  8.  
  9. // team ids
  10. #define UNASSIGNED 0
  11. #define TS 1
  12. #define CTS 2
  13. #define AUTO_TEAM 5
  14.  
  15. new bool:g_PistolsDisabled = false
  16.  
  17. public plugin_init(){
  18.  
  19. register_plugin("Respawn Forever", VERZIO, "Pimp Daddy (OoTOAoO)")
  20.  
  21. register_event("DeathMsg","on_Death","a")
  22.  
  23. register_cvar("sv_checkpistols", "1")
  24. register_cvar("sv_respawn", "1")
  25. register_cvar("respawn_forever_version", VERZIO, FCVAR_SERVER)
  26.  
  27. register_clcmd("say","on_Chat")
  28. register_clcmd("say_team","on_Chat")
  29. }
  30.  
  31. public on_Chat(id)
  32. {
  33. if ( !get_cvar_num("sv_respawn") )
  34. {
  35. client_print(id, print_chat, "* Respawn plugin kikapcsolva!")
  36. return PLUGIN_CONTINUE
  37. }
  38.  
  39. new szSaid[32]
  40. read_args(szSaid, 31)
  41.  
  42. if (equali(szSaid,"^"/respawn^"") || equali(szSaid,"^"respawn^"") || equali(szSaid,"^"/ujra^""))
  43. {
  44. spawn_func(id)
  45. }
  46. return PLUGIN_HANDLED;
  47. }
  48.  
  49. public check_pistols()
  50. {
  51. /* Determine if we should give players a pistol or not */
  52. if ( get_cvar_num("sv_checkpistols") )
  53. {
  54. set_task(1.0, "check_pistols")
  55. new mapname[32]
  56. get_mapname(mapname,31)
  57. if ( containi(mapname,"ka_")!=-1 || containi(mapname,"scoutzknivez")!=-1 )
  58. g_PistolsDisabled = true
  59. }
  60. }
  61.  
  62. public spawn_func(id)
  63. {
  64. new parm[1]
  65. parm[0]=id
  66.  
  67. /* Spawn the player twice to avoid the HL engine bug */
  68. set_task(0.5,"player_spawn",72,parm,1)
  69. set_task(0.7,"player_spawn",72,parm,1)
  70. set_task(0.9, "hud", id)
  71.  
  72. /* Then give them a suit and a knife */
  73. set_task(0.9,"player_giveitems",72,parm,1)
  74. }
  75.  
  76. public hud( id )
  77. {
  78. set_hudmessage(0, 255, 255, -1.0, 0.67, 0, 6.0, 6.0)
  79. show_hudmessage(id, "Sikeresen Ujraledtel!")
  80. }
  81. public on_Death()
  82. {
  83. if ( !get_cvar_num("sv_respawn") )
  84. return PLUGIN_CONTINUE
  85.  
  86. new victim_id = read_data(2)
  87.  
  88. spawn_func( victim_id )
  89.  
  90. return PLUGIN_CONTINUE
  91. }
  92.  
  93. public player_giveitems(parm[1])
  94. {
  95. new id = parm[0]
  96.  
  97. give_item(id, "item_suit")
  98. give_item(id, "weapon_knife")
  99.  
  100. give_item(id, "weapon_flashbang")
  101.  
  102. return PLUGIN_CONTINUE
  103. }
  104.  
  105. public player_spawn(parm[1])
  106. {
  107. spawn(parm[0])
  108. }

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