hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.04.28. 11:59



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: Bing [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  [ 1 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: QuadDmg Probléma
HozzászólásElküldve: 2017.03.31. 18:48 
Offline
Senior Tag
Avatar

Csatlakozott: 2015.06.11. 01:54
Hozzászólások: 220
Megköszönt másnak: 46 alkalommal
Megköszönték neki: 13 alkalommal
Van ez a plugin ami sebzés szórzót ad ha felveszed (mint Quake 3-ban), eredetileg zp módhoz van de megpróbáltam átalakítani, csak most nem spawnol le a cucc. Mi lehet a gond?

  1. #include <amxmodx>
  2. #include <engine>
  3. #include <fakemeta>
  4. #include <hamsandwich>
  5.  
  6. #define PLUGIN "QuadDamage"
  7. #define VERSION "1.0.1"
  8. #define AUTHOR "yokomo"
  9.  
  10. enum (+= 100)
  11. {
  12.     TASK_QUAD_SPAWN = 2011,
  13.     TASK_QUAD_TIME
  14. }
  15.  
  16. #define ID_QUAD_TIME (taskid - TASK_QUAD_TIME)
  17.  
  18. const GLOW_R = 0
  19. const GLOW_G = 100
  20. const GLOW_B = 200
  21. const MAX_SPAWNS = 128
  22.  
  23. new const SOUND_QUAD[] = "msawp/quaddmg.wav"
  24. new const SOUND_QUAD_SPAWN[] = "items/suitchargeok1.wav"
  25. new const MODEL_QUAD[] = "models/msawp/skullv2.mdl"
  26. new const CLASSNAME_QUAD[] = "quad_ent"
  27.  
  28. new cvar_spawntime, cvar_dmgtime, cvar_dmgmulti
  29. new g_spawnCount, g_spawnCount2, g_maxplayers, g_roundend
  30. new g_hamczbots, cvar_botquota
  31. new Float:g_spawns[MAX_SPAWNS][3], Float:g_spawns2[MAX_SPAWNS][3]
  32. new g_has_quad[33], g_time_quad[33]
  33.  
  34. public plugin_precache()
  35. {
  36.     precache_sound(SOUND_QUAD)
  37.     precache_sound(SOUND_QUAD_SPAWN)
  38.     precache_model(MODEL_QUAD)
  39. }
  40.  
  41. public plugin_init()
  42. {
  43.     register_plugin(PLUGIN, VERSION, AUTHOR)
  44.    
  45.     register_event("HLTV", "EventRoundStart", "a", "1=0", "2=0")
  46.     register_logevent("logevent_round_end", 2, "1=Round_End")
  47.    
  48.     RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
  49.     RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
  50.    
  51.     register_forward(FM_Touch, "fw_Touch")
  52.    
  53.     CreateQuadSpawnPoints()
  54.    
  55.     cvar_spawntime = register_cvar("quad_spawntime", "5")
  56.     cvar_dmgtime = register_cvar("quad_quadtime", "15")
  57.     cvar_dmgmulti = register_cvar("quad_dmgmulti", "5")
  58.     cvar_botquota = get_cvar_pointer("bot_quota")
  59.    
  60.     g_maxplayers = get_maxplayers()
  61. }
  62.  
  63. public client_putinserver(id)
  64. {
  65.     ResetValuePlayer(id)
  66.    
  67.     if(is_user_bot(id) && !g_hamczbots && cvar_botquota) set_task(0.1, "register_ham_czbots", id)
  68. }
  69.  
  70. public client_disconnect(id)
  71. {
  72.     ResetValuePlayer(id)
  73. }
  74.  
  75. public EventRoundStart()
  76. {
  77.     remove_task(TASK_QUAD_SPAWN)
  78.     RemoveQuadEntity()
  79.    
  80.     for(new id = 1; id <= g_maxplayers; id++)
  81.     {
  82.         if(!is_user_connected(id)) continue
  83.         ResetValuePlayer(id)
  84.     }
  85. }
  86.  
  87. public logevent_round_end()
  88. {
  89.     g_roundend = 1
  90. }
  91.  
  92. public register_ham_czbots(id)
  93. {
  94.     if (g_hamczbots || !is_user_connected(id) || !get_pcvar_num(cvar_botquota)) return
  95.    
  96.     RegisterHamFromEntity(Ham_Killed, id, "fw_PlayerKilled")
  97.     RegisterHamFromEntity(Ham_TakeDamage, id, "fw_TakeDamage")
  98.    
  99.     g_hamczbots = true
  100. }
  101.  
  102.  
  103. public fw_PlayerKilled(victim, attacker, shouldgib)
  104. {
  105.     ResetValuePlayer(victim)
  106. }
  107.  
  108. public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
  109. {
  110.     if(victim == attacker) return HAM_IGNORED
  111.        
  112.     if(g_roundend) return HAM_SUPERCEDE
  113.  
  114.     if(!pev_valid(victim) || !is_user_connected(attacker)) return HAM_IGNORED
  115.    
  116.     if(g_has_quad[attacker])
  117.     {
  118.         SetHamParamFloat(4, damage*get_pcvar_float(cvar_dmgmulti))
  119.     }
  120.    
  121.     return HAM_IGNORED
  122. }
  123.  
  124. public fw_Touch(ent, id)
  125. {
  126.     if(!pev_valid(ent) || !is_user_alive(id) || g_roundend) return FMRES_IGNORED
  127.    
  128.     if(g_has_quad[id]) return FMRES_IGNORED
  129.    
  130.     new classname[32]
  131.     pev(ent, pev_classname, classname, 31)
  132.     if(!(equal(classname, CLASSNAME_QUAD))) return FMRES_IGNORED
  133.    
  134.     engfunc(EngFunc_RemoveEntity, ent)
  135.    
  136.     g_has_quad[id] = 1
  137.     emit_sound(id, CHAN_VOICE, SOUND_QUAD, 1.0, ATTN_NORM, 0, PITCH_NORM)
  138.     set_rendering(id, kRenderFxGlowShell, GLOW_R, GLOW_G, GLOW_B, kRenderNormal, 5)
  139.        
  140.     g_time_quad[id] = get_pcvar_num(cvar_dmgtime)
  141.     remove_task(TASK_QUAD_TIME)
  142.     set_task(1.0, "CountDownStart", id+TASK_QUAD_TIME, _, _, "b")
  143.        
  144.     remove_task(TASK_QUAD_SPAWN)
  145.     set_task(get_pcvar_float(cvar_spawntime), "CreateQuadEntity", TASK_QUAD_SPAWN)
  146.    
  147.     return FMRES_IGNORED
  148. }
  149.  
  150. public CountDownStart(taskid)
  151. {  
  152.     if(!g_time_quad[ID_QUAD_TIME])
  153.     {
  154.         g_has_quad[ID_QUAD_TIME] = 0
  155.        
  156.         remove_task(taskid)
  157.         set_rendering(ID_QUAD_TIME)
  158.     }
  159.     else if(g_time_quad[ID_QUAD_TIME]<=get_pcvar_num(cvar_dmgtime))
  160.     {
  161.         set_hudmessage(GLOW_R, GLOW_G, GLOW_B, 0.56, 0.76, 0, 1.0, 1.0)
  162.         show_hudmessage(ID_QUAD_TIME, "Quad Damage: %d", g_time_quad[ID_QUAD_TIME])
  163.         g_time_quad[ID_QUAD_TIME] -= 1
  164.     }
  165. }
  166.  
  167. public CreateQuadEntity()
  168. {
  169.     if(g_roundend) return
  170.    
  171.     new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
  172.     set_pev(ent, pev_classname, CLASSNAME_QUAD)
  173.     MakeRandomOrigin(ent)
  174.     engfunc(EngFunc_SetModel, ent, MODEL_QUAD)
  175.     engfunc(EngFunc_SetSize, ent, Float:{-4.0,-4.0,-4.0}, Float:{4.0,4.0,4.0})
  176.     set_pev(ent, pev_solid, SOLID_TRIGGER)
  177.     set_pev(ent, pev_movetype, MOVETYPE_BOUNCE)
  178.     set_rendering(ent, kRenderFxGlowShell, GLOW_R, GLOW_G, GLOW_B, kRenderNormal, 5)
  179.     emit_sound(ent, CHAN_VOICE, SOUND_QUAD_SPAWN, 1.0, ATTN_NORM, 0, PITCH_NORM)
  180. }
  181.  
  182. CreateQuadSpawnPoints()
  183. {
  184.     collect_spawns_ent("info_player_start")
  185.     collect_spawns_ent("info_player_deathmatch")
  186.    
  187.     collect_spawns_ent2("info_player_start")
  188.     collect_spawns_ent2("info_player_deathmatch")
  189. }
  190.  
  191. collect_spawns_ent(const classname[])
  192. {
  193.     new ent = -1
  194.     while ((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", classname)) != 0)
  195.     {
  196.         new Float:originF[3]
  197.         pev(ent, pev_origin, originF)
  198.         g_spawns[g_spawnCount][0] = originF[0]
  199.         g_spawns[g_spawnCount][1] = originF[1]
  200.         g_spawns[g_spawnCount][2] = originF[2]
  201.        
  202.         g_spawnCount++
  203.         if (g_spawnCount >= sizeof g_spawns) break
  204.     }
  205. }
  206.  
  207. collect_spawns_ent2(const classname[])
  208. {
  209.     new ent = -1
  210.     while ((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", classname)) != 0)
  211.     {
  212.         new Float:originF[3]
  213.         pev(ent, pev_origin, originF)
  214.         g_spawns2[g_spawnCount2][0] = originF[0]
  215.         g_spawns2[g_spawnCount2][1] = originF[1]
  216.         g_spawns2[g_spawnCount2][2] = originF[2]
  217.        
  218.         g_spawnCount2++
  219.         if (g_spawnCount2 >= sizeof g_spawns2) break
  220.     }
  221. }
  222.  
  223. MakeRandomOrigin(id, regularspawns = 0)
  224. {
  225.     static hull, sp_index, i
  226.    
  227.     hull = (pev(id, pev_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN
  228.    
  229.     if (!regularspawns)
  230.     {
  231.         if (!g_spawnCount)
  232.             return
  233.        
  234.         sp_index = random_num(0, g_spawnCount - 1)
  235.        
  236.         for (i = sp_index + 1; /*no condition*/; i++)
  237.         {
  238.             if (i >= g_spawnCount) i = 0
  239.            
  240.             if (is_hull_vacant(g_spawns[i], hull))
  241.             {
  242.                 engfunc(EngFunc_SetOrigin, id, g_spawns[i])
  243.                 break
  244.             }
  245.            
  246.             if (i == sp_index) break
  247.         }
  248.     }
  249.     else
  250.     {
  251.         if (!g_spawnCount2)
  252.             return
  253.        
  254.         sp_index = random_num(0, g_spawnCount2 - 1)
  255.        
  256.         for (i = sp_index + 1; /*no condition*/; i++)
  257.         {
  258.             if (i >= g_spawnCount2) i = 0
  259.            
  260.             if (is_hull_vacant(g_spawns2[i], hull))
  261.             {
  262.                 engfunc(EngFunc_SetOrigin, id, g_spawns2[i])
  263.                 break
  264.             }
  265.            
  266.             if (i == sp_index) break
  267.         }
  268.     }
  269. }
  270.  
  271. is_hull_vacant(Float:origin[3], hull)
  272. {
  273.     engfunc(EngFunc_TraceHull, origin, origin, 0, hull, 0, 0)
  274.    
  275.     if (!get_tr2(0, TR_StartSolid) && !get_tr2(0, TR_AllSolid) && get_tr2(0, TR_InOpen))
  276.         return true;
  277.    
  278.     return false;
  279. }
  280.  
  281. RemoveQuadEntity()
  282. {
  283.     static ent
  284.     ent = engfunc(EngFunc_FindEntityByString, -1, "classname", CLASSNAME_QUAD)
  285.     while(ent > 0)
  286.     {
  287.         engfunc(EngFunc_RemoveEntity, ent)
  288.         ent = engfunc(EngFunc_FindEntityByString, -1, "classname", CLASSNAME_QUAD)
  289.     }
  290. }
  291.  
  292. ResetValuePlayer(id)
  293. {
  294.     remove_task(id+TASK_QUAD_TIME)
  295.    
  296.     g_has_quad[id] = 0
  297.     g_time_quad[id] = 0
  298. }
  299. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  300. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
  301. */


Ez az eredeti:

  1. #include <amxmodx>
  2. #include <engine>
  3. #include <fakemeta>
  4. #include <hamsandwich>
  5. #include <zombieplague>
  6.  
  7. #define PLUGIN "ZP Addon QuadDamage"
  8. #define VERSION "1.0.1"
  9. #define AUTHOR "yokomo"
  10.  
  11. enum (+= 100)
  12. {
  13.     TASK_QUAD_SPAWN = 2011,
  14.     TASK_QUAD_TIME
  15. }
  16.  
  17. #define ID_QUAD_TIME (taskid - TASK_QUAD_TIME)
  18.  
  19. const GLOW_R = 0
  20. const GLOW_G = 100
  21. const GLOW_B = 200
  22. const MAX_SPAWNS = 128
  23.  
  24. new const SOUND_QUAD[] = "zombie_plague/quaddmgvox.wav"
  25. new const SOUND_QUAD_SPAWN[] = "items/suitchargeok1.wav"
  26. new const MODEL_QUAD[] = "models/bskull_template1.mdl"
  27. new const CLASSNAME_QUAD[] = "quad_ent"
  28.  
  29. new cvar_spawntime, cvar_dmgtime, cvar_dmgmulti
  30. new g_spawnCount, g_spawnCount2, g_maxplayers, g_roundend
  31. new g_hamczbots, cvar_botquota
  32. new Float:g_spawns[MAX_SPAWNS][3], Float:g_spawns2[MAX_SPAWNS][3]
  33. new g_has_quad[33], g_time_quad[33]
  34.  
  35. public plugin_precache()
  36. {
  37.     precache_sound(SOUND_QUAD)
  38.     precache_sound(SOUND_QUAD_SPAWN)
  39.     precache_model(MODEL_QUAD)
  40. }
  41.  
  42. public plugin_init()
  43. {
  44.     register_plugin(PLUGIN, VERSION, AUTHOR)
  45.    
  46.     register_event("HLTV", "EventRoundStart", "a", "1=0", "2=0")
  47.     register_logevent("logevent_round_end", 2, "1=Round_End")
  48.    
  49.     RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
  50.     RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
  51.    
  52.     register_forward(FM_Touch, "fw_Touch")
  53.    
  54.     CreateQuadSpawnPoints()
  55.    
  56.     cvar_spawntime = register_cvar("zp_quad_spawntime", "30")
  57.     cvar_dmgtime = register_cvar("zp_quad_quadtime", "30")
  58.     cvar_dmgmulti = register_cvar("zp_quad_dmgmulti", "5")
  59.     cvar_botquota = get_cvar_pointer("bot_quota")
  60.    
  61.     g_maxplayers = get_maxplayers()
  62. }
  63.  
  64. public client_putinserver(id)
  65. {
  66.     ResetValuePlayer(id)
  67.    
  68.     if(is_user_bot(id) && !g_hamczbots && cvar_botquota) set_task(0.1, "register_ham_czbots", id)
  69. }
  70.  
  71. public client_disconnect(id)
  72. {
  73.     ResetValuePlayer(id)
  74. }
  75.  
  76. public EventRoundStart()
  77. {
  78.     remove_task(TASK_QUAD_SPAWN)
  79.     RemoveQuadEntity()
  80.    
  81.     for(new id = 1; id <= g_maxplayers; id++)
  82.     {
  83.         if(!is_user_connected(id)) continue
  84.         ResetValuePlayer(id)
  85.     }
  86. }
  87.  
  88. public logevent_round_end()
  89. {
  90.     g_roundend = 1
  91. }
  92.  
  93. public register_ham_czbots(id)
  94. {
  95.     if (g_hamczbots || !is_user_connected(id) || !get_pcvar_num(cvar_botquota)) return
  96.    
  97.     RegisterHamFromEntity(Ham_Killed, id, "fw_PlayerKilled")
  98.     RegisterHamFromEntity(Ham_TakeDamage, id, "fw_TakeDamage")
  99.    
  100.     g_hamczbots = true
  101. }
  102.  
  103. public zp_round_started(mode)
  104. {
  105.     g_roundend = 0
  106.    
  107.     if(mode != MODE_SURVIVOR) set_task(get_pcvar_float(cvar_spawntime), "CreateQuadEntity", TASK_QUAD_SPAWN)
  108. }
  109.  
  110. public zp_user_infected_post(id, infector)
  111. {
  112.     if(!id || !infector) return
  113.    
  114.     ResetValuePlayer(id)
  115. }
  116.  
  117. public fw_PlayerKilled(victim, attacker, shouldgib)
  118. {
  119.     ResetValuePlayer(victim)
  120. }
  121.  
  122. public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
  123. {
  124.     if(victim == attacker) return HAM_IGNORED
  125.        
  126.     if(g_roundend) return HAM_SUPERCEDE
  127.  
  128.     if(!pev_valid(victim) || !is_user_connected(attacker)) return HAM_IGNORED
  129.    
  130.     if(g_has_quad[attacker])
  131.     {
  132.         SetHamParamFloat(4, damage*get_pcvar_float(cvar_dmgmulti))
  133.     }
  134.    
  135.     return HAM_IGNORED
  136. }
  137.  
  138. public fw_Touch(ent, id)
  139. {
  140.     if(!pev_valid(ent) || !is_user_alive(id) || zp_get_user_zombie(id) || zp_get_user_survivor(id) || g_roundend) return FMRES_IGNORED
  141.    
  142.     if(g_has_quad[id]) return FMRES_IGNORED
  143.    
  144.     new classname[32]
  145.     pev(ent, pev_classname, classname, 31)
  146.     if(!(equal(classname, CLASSNAME_QUAD))) return FMRES_IGNORED
  147.    
  148.     engfunc(EngFunc_RemoveEntity, ent)
  149.    
  150.     g_has_quad[id] = 1
  151.     emit_sound(id, CHAN_VOICE, SOUND_QUAD, 1.0, ATTN_NORM, 0, PITCH_NORM)
  152.     set_rendering(id, kRenderFxGlowShell, GLOW_R, GLOW_G, GLOW_B, kRenderNormal, 5)
  153.        
  154.     g_time_quad[id] = get_pcvar_num(cvar_dmgtime)
  155.     remove_task(TASK_QUAD_TIME)
  156.     set_task(1.0, "CountDownStart", id+TASK_QUAD_TIME, _, _, "b")
  157.        
  158.     remove_task(TASK_QUAD_SPAWN)
  159.     set_task(get_pcvar_float(cvar_spawntime), "CreateQuadEntity", TASK_QUAD_SPAWN)
  160.    
  161.     return FMRES_IGNORED
  162. }
  163.  
  164. public CountDownStart(taskid)
  165. {  
  166.     if(!g_time_quad[ID_QUAD_TIME])
  167.     {
  168.         g_has_quad[ID_QUAD_TIME] = 0
  169.        
  170.         remove_task(taskid)
  171.         set_rendering(ID_QUAD_TIME)
  172.     }
  173.     else if(g_time_quad[ID_QUAD_TIME]<=get_pcvar_num(cvar_dmgtime))
  174.     {
  175.         set_hudmessage(GLOW_R, GLOW_G, GLOW_B, 0.56, 0.76, 0, 1.0, 1.0)
  176.         show_hudmessage(ID_QUAD_TIME, "Quad Damage: %d", g_time_quad[ID_QUAD_TIME])
  177.         g_time_quad[ID_QUAD_TIME] -= 1
  178.     }
  179. }
  180.  
  181. public CreateQuadEntity()
  182. {
  183.     if(g_roundend) return
  184.    
  185.     new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
  186.     set_pev(ent, pev_classname, CLASSNAME_QUAD)
  187.     MakeRandomOrigin(ent)
  188.     engfunc(EngFunc_SetModel, ent, MODEL_QUAD)
  189.     engfunc(EngFunc_SetSize, ent, Float:{-4.0,-4.0,-4.0}, Float:{4.0,4.0,4.0})
  190.     set_pev(ent, pev_solid, SOLID_TRIGGER)
  191.     set_pev(ent, pev_movetype, MOVETYPE_BOUNCE)
  192.     set_rendering(ent, kRenderFxGlowShell, GLOW_R, GLOW_G, GLOW_B, kRenderNormal, 5)
  193.     emit_sound(ent, CHAN_VOICE, SOUND_QUAD_SPAWN, 1.0, ATTN_NORM, 0, PITCH_NORM)
  194. }
  195.  
  196. CreateQuadSpawnPoints()
  197. {
  198.     collect_spawns_ent("info_player_start")
  199.     collect_spawns_ent("info_player_deathmatch")
  200.    
  201.     collect_spawns_ent2("info_player_start")
  202.     collect_spawns_ent2("info_player_deathmatch")
  203. }
  204.  
  205. collect_spawns_ent(const classname[])
  206. {
  207.     new ent = -1
  208.     while ((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", classname)) != 0)
  209.     {
  210.         new Float:originF[3]
  211.         pev(ent, pev_origin, originF)
  212.         g_spawns[g_spawnCount][0] = originF[0]
  213.         g_spawns[g_spawnCount][1] = originF[1]
  214.         g_spawns[g_spawnCount][2] = originF[2]
  215.        
  216.         g_spawnCount++
  217.         if (g_spawnCount >= sizeof g_spawns) break
  218.     }
  219. }
  220.  
  221. collect_spawns_ent2(const classname[])
  222. {
  223.     new ent = -1
  224.     while ((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", classname)) != 0)
  225.     {
  226.         new Float:originF[3]
  227.         pev(ent, pev_origin, originF)
  228.         g_spawns2[g_spawnCount2][0] = originF[0]
  229.         g_spawns2[g_spawnCount2][1] = originF[1]
  230.         g_spawns2[g_spawnCount2][2] = originF[2]
  231.        
  232.         g_spawnCount2++
  233.         if (g_spawnCount2 >= sizeof g_spawns2) break
  234.     }
  235. }
  236.  
  237. MakeRandomOrigin(id, regularspawns = 0)
  238. {
  239.     static hull, sp_index, i
  240.    
  241.     hull = (pev(id, pev_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN
  242.    
  243.     if (!regularspawns)
  244.     {
  245.         if (!g_spawnCount)
  246.             return
  247.        
  248.         sp_index = random_num(0, g_spawnCount - 1)
  249.        
  250.         for (i = sp_index + 1; /*no condition*/; i++)
  251.         {
  252.             if (i >= g_spawnCount) i = 0
  253.            
  254.             if (is_hull_vacant(g_spawns[i], hull))
  255.             {
  256.                 engfunc(EngFunc_SetOrigin, id, g_spawns[i])
  257.                 break
  258.             }
  259.            
  260.             if (i == sp_index) break
  261.         }
  262.     }
  263.     else
  264.     {
  265.         if (!g_spawnCount2)
  266.             return
  267.        
  268.         sp_index = random_num(0, g_spawnCount2 - 1)
  269.        
  270.         for (i = sp_index + 1; /*no condition*/; i++)
  271.         {
  272.             if (i >= g_spawnCount2) i = 0
  273.            
  274.             if (is_hull_vacant(g_spawns2[i], hull))
  275.             {
  276.                 engfunc(EngFunc_SetOrigin, id, g_spawns2[i])
  277.                 break
  278.             }
  279.            
  280.             if (i == sp_index) break
  281.         }
  282.     }
  283. }
  284.  
  285. is_hull_vacant(Float:origin[3], hull)
  286. {
  287.     engfunc(EngFunc_TraceHull, origin, origin, 0, hull, 0, 0)
  288.    
  289.     if (!get_tr2(0, TR_StartSolid) && !get_tr2(0, TR_AllSolid) && get_tr2(0, TR_InOpen))
  290.         return true;
  291.    
  292.     return false;
  293. }
  294.  
  295. RemoveQuadEntity()
  296. {
  297.     static ent
  298.     ent = engfunc(EngFunc_FindEntityByString, -1, "classname", CLASSNAME_QUAD)
  299.     while(ent > 0)
  300.     {
  301.         engfunc(EngFunc_RemoveEntity, ent)
  302.         ent = engfunc(EngFunc_FindEntityByString, -1, "classname", CLASSNAME_QUAD)
  303.     }
  304. }
  305.  
  306. ResetValuePlayer(id)
  307. {
  308.     remove_task(id+TASK_QUAD_TIME)
  309.    
  310.     g_has_quad[id] = 0
  311.     g_time_quad[id] = 0
  312. }
  313. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  314. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
  315. */

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


Ki van itt

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