PRosba o klase Jumper i 5 innych
Sebastianka 30.10.2013
Jumper
Opis: Mniejsza Grawitacja
inteligencja:5
zdrowie: 10
wytrzymalowsc: 15
kondycja: 10
bronie: nóz
_____________
Farmer
Opis: Ma Dwie Apteczki
inteligencja:15
zdrowie: 20
wytrzymalowsc: 15
kondycja: 15
bronie: nóz
________________
Ninja
Opis: Dwa Skoki,Grawitacja 700
inteligencja:5
zdrowie: 10
wytrzymalowsc: 15
kondycja: 10
bronie: nóz
___________________
Elektryk
Opis: Posiada dwa pioruny
inteligencja:5
zdrowie: 25
wytrzymalowsc: 15
kondycja: 10
bronie: nóz
_________________
Saper
Opis: Posiada 3 Miny
inteligencja:0
zdrowie: 10
wytrzymalowsc: 15
kondycja: 15
bronie: nóz
____________________
Premium Hejter
Opis: Dwa Skoki,Grawitacja 550,dwie apteczki
inteligencja:5
zdrowie: 10
wytrzymalowsc: 15
kondycja: 10
bronie: nóz
Flaga t
__________________________
Dodaje to są klasy Do Deathrun
Z góry thx
Użytkownik Sebastianka edytował ten post 30.10.2013 07:41
Opis: Mniejsza Grawitacja
inteligencja:5
zdrowie: 10
wytrzymalowsc: 15
kondycja: 10
bronie: nóz
_____________
Farmer
Opis: Ma Dwie Apteczki
inteligencja:15
zdrowie: 20
wytrzymalowsc: 15
kondycja: 15
bronie: nóz
________________
Ninja
Opis: Dwa Skoki,Grawitacja 700
inteligencja:5
zdrowie: 10
wytrzymalowsc: 15
kondycja: 10
bronie: nóz
___________________
Elektryk
Opis: Posiada dwa pioruny
inteligencja:5
zdrowie: 25
wytrzymalowsc: 15
kondycja: 10
bronie: nóz
_________________
Saper
Opis: Posiada 3 Miny
inteligencja:0
zdrowie: 10
wytrzymalowsc: 15
kondycja: 15
bronie: nóz
____________________
Premium Hejter
Opis: Dwa Skoki,Grawitacja 550,dwie apteczki
inteligencja:5
zdrowie: 10
wytrzymalowsc: 15
kondycja: 10
bronie: nóz
Flaga t
__________________________
Dodaje to są klasy Do Deathrun
Z góry thx
Użytkownik Sebastianka edytował ten post 30.10.2013 07:41
szelbi 30.10.2013
Jumper
Spoiler
Wklejka eklcj6lzqhf1 dodana przez szelbi, 30.10.2013 07:44
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48.
#include <amxmodx> #include <amxmisc> #include <codmod> #include <engine> #include <hamsandwich> new const nazwa[] = "Jumper"; new const opis[] = "Mniejsza grawitacja"; new const bronie = 0; new const zdrowie = 10; new const kondycja = 10; new const inteligencja = 5; new const wytrzymalosc = 15; new ma_klase[33]; public plugin_init() { register_plugin(nazwa, "1.0", "amxx.pl"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); RegisterHam(Ham_Spawn, "player", "fwSpawn_Grawitacja", 1); } public cod_class_enabled(id) { entity_set_float(id, EV_FL_gravity, 550.0/800.0); ma_klase[id] = true; } public cod_class_disabled(id) { entity_set_float(id, EV_FL_gravity, 1.0); ma_klase[id] = false; } public fwSpawn_Grawitacja(id) { if(ma_klase[id]) entity_set_float(id, EV_FL_gravity, 550.0/800.0); }
W linijce 45. zmieniasz grawitację.
Farmer
Spoiler
Wklejka 15x8e0zei7atb dodana przez szelbi, 30.10.2013 07:47
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. 135. 136. 137. 138. 139. 140. 141. 142. 143. 144. 145. 146. 147. 148. 149. 150. 151. 152. 153. 154. 155. 156. 157. 158. 159. 160. 161. 162. 163. 164. 165. 166. 167. 168. 169. 170. 171. 172. 173. 174. 175. 176. 177. 178.
#include <amxmodx> #include <amxmisc> #include <codmod> #include <engine> #include <hamsandwich> new const nazwa[] = "Farmer"; new const opis[] = "Ma dwie apteczki"; new const bronie = 0; new const zdrowie = 20; new const kondycja = 15; new const inteligencja = 15; new const wytrzymalosc = 15; new sprite_white_apteczki; new ilosc_apteczek_gracza[33]; public plugin_init() { register_plugin(nazwa, "1.0", "amxx.pl"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); register_think("medkit", "Think_Apteczki"); RegisterHam(Ham_Spawn, "player", "fwSpawn_Apteczki", 1); } public plugin_precache() { sprite_white_apteczki = precache_model("sprites/white.spr"); precache_model("models/w_medkit.mdl"); } public client_disconnect(id) { new entApteczki = find_ent_by_class(0, "medkit"); while(entApteczki > 0) { if(entity_get_edict(entApteczki, EV_ENT_owner) == id) remove_entity(entApteczki); entApteczki = find_ent_by_class(entApteczki, "medkit"); } } public cod_class_enabled(id) { ilosc_apteczek_gracza[id] = 2; } public cod_class_skill_used(id) { if (!ilosc_apteczek_gracza[id]) { client_print(id, print_center, "Masz tylko 2 apteczki na runde!"); } else { ilosc_apteczek_gracza[id]--; new Float:origin[3]; entity_get_vector(id, EV_VEC_origin, origin); new ent = create_entity("info_target"); entity_set_string(ent, EV_SZ_classname, "medkit"); entity_set_edict(ent, EV_ENT_owner, id); entity_set_int(ent, EV_INT_solid, SOLID_NOT); entity_set_vector(ent, EV_VEC_origin, origin); entity_set_float(ent, EV_FL_ltime, halflife_time() + 7 + 0.1); entity_set_model(ent, "models/w_medkit.mdl"); set_rendering ( ent, kRenderFxGlowShell, 255,0,0, kRenderFxNone, 255 ) ; drop_to_floor(ent); entity_set_float(ent, EV_FL_nextthink, halflife_time() + 0.1); } } public fwSpawn_Apteczki(id) { if(is_user_alive(id)) ilosc_apteczek_gracza[id] = 2; } public Think_Apteczki(ent) { if(!is_valid_ent(ent)) return PLUGIN_CONTINUE; new id = entity_get_edict(ent, EV_ENT_owner); new dist = 300; new heal = 5+floatround(cod_get_user_intelligence(id)*0.5); if (entity_get_edict(ent, EV_ENT_euser2) == 1) { new Float:forigin[3]; entity_get_vector(ent, EV_VEC_origin, forigin); new entlist[33]; new numfound = find_sphere_class(0,"player", float(dist),entlist, 32,forigin); for (new i=0; i < numfound; i++) { new pid = entlist[i]; if (get_user_team(pid) != get_user_team(id)) continue; new maksymalne_zdrowie = 100+cod_get_user_health(pid); new zdrowie = get_user_health(pid); new Float:nowe_zdrowie = (zdrowie+heal<maksymalne_zdrowie)?zdrowie+heal+0.0:maksymalne_zdrowie+0.0; if (is_user_alive(pid)) entity_set_float(pid, EV_FL_health, nowe_zdrowie); } entity_set_edict(ent, EV_ENT_euser2, 0); entity_set_float(ent, EV_FL_nextthink, halflife_time() + 1.5); return PLUGIN_CONTINUE; } if (entity_get_float(ent, EV_FL_ltime) < halflife_time() || !is_user_alive(id)) { remove_entity(ent); return PLUGIN_CONTINUE; } if (entity_get_float(ent, EV_FL_ltime)-2.0 < halflife_time()) set_rendering ( ent, kRenderFxNone, 255,255,255, kRenderTransAlpha, 100 ); new Float:forigin[3]; entity_get_vector(ent, EV_VEC_origin, forigin); new iOrigin[3]; for(new i=0;i<3;i++) iOrigin[i] = floatround(forigin[i]); message_begin( MSG_BROADCAST, SVC_TEMPENTITY, iOrigin ); write_byte( TE_BEAMCYLINDER ); write_coord( iOrigin[0] ); write_coord( iOrigin[1] ); write_coord( iOrigin[2] ); write_coord( iOrigin[0] ); write_coord( iOrigin[1] + dist ); write_coord( iOrigin[2] + dist ); write_short( sprite_white_apteczki ); write_byte( 0 ); // startframe write_byte( 0 ); // framerate write_byte( 10 ); // life write_byte( 10 ); // width write_byte( 255 ); // noise write_byte( 255 ); // r, g, b write_byte( 100 );// r, g, b write_byte( 100 ); // r, g, b write_byte( 128 ); // brightness write_byte( 0 ); // speed message_end(); entity_set_edict(ent, EV_ENT_euser2 ,1); entity_set_float(ent, EV_FL_nextthink, halflife_time() + 0.5); return PLUGIN_CONTINUE; }
Ninja
Spoiler
Wklejka p7ib43t2xgp7 dodana przez szelbi, 30.10.2013 07:49
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75.
#include <amxmodx> #include <amxmisc> #include <codmod> #include <engine> #include <hamsandwich> #include <fakemeta> new const nazwa[] = "Ninja"; new const opis[] = "Dwa skoki, grawitacja 700"; new const bronie = 0; new const zdrowie = 10; new const kondycja = 10; new const inteligencja = 5; new const wytrzymalosc = 15; new skoki[33]; new ma_klase[33]; public plugin_init() { register_plugin(nazwa, "1.0", "amxx.pl"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); RegisterHam(Ham_Spawn, "player", "fwSpawn_Grawitacja", 1); register_forward(FM_CmdStart, "fwCmdStart_MultiJump"); } public cod_class_enabled(id) { entity_set_float(id, EV_FL_gravity, 700.0/800.0); ma_klase[id] = true; } public cod_class_disabled(id) { entity_set_float(id, EV_FL_gravity, 1.0); ma_klase[id] = false; } public fwSpawn_Grawitacja(id) { if(ma_klase[id]) entity_set_float(id, EV_FL_gravity, 700.0/800.0); } public fwCmdStart_MultiJump(id, uc_handle) { if(!is_user_alive(id) || !ma_klase[id]) return FMRES_IGNORED; new flags = pev(id, pev_flags); if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id]) { skoki[id]--; new Float:velocity[3]; pev(id, pev_velocity,velocity); velocity[2] = random_float(265.0,285.0); set_pev(id, pev_velocity,velocity); } else if(flags & FL_ONGROUND) skoki[id] = 1; return FMRES_IGNORED; }
Elektryk
Spoiler
Wklejka fbxzkoesc7v5 dodana przez szelbi, 30.10.2013 08:10
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118.
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <codmod> #include <engine> #include <hamsandwich> new sprite; new ilosc_blyskawic[33],poprzednia_blyskawica[33]; new const gszSound[] = "ambience/thunder_clap.wav"; new const nazwa[] = "Elektryk"; new const opis[] = "Posiada dwa pioruny"; new const bronie = 0; new const zdrowie = 25; new const kondycja = 10; new const inteligencja = 5; new const wytrzymalosc = 15; new ma_klase[33]; public plugin_init() { register_plugin(nazwa, "1.0", "piterka"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); register_event("ResetHUD", "ResetHUD", "abe"); } public plugin_precache() { sprite = precache_model("sprites/lgtning.spr"); precache_sound(gszSound); } public cod_class_enabled(id) { ilosc_blyskawic[id] = 2; ma_klase[id] = 1; return COD_CONTINUE; } public cod_class_disabled(id) { ma_klase[id] = 0; ilosc_blyskawic[id] = 0; } public cod_class_skill_used(id) { if(!is_user_alive(id)) return PLUGIN_HANDLED; if(!ilosc_blyskawic[id]) return PLUGIN_HANDLED; new ofiara, body; get_user_aiming(id, ofiara, body); if(is_user_alive(ofiara)){ if(get_user_team(ofiara) == get_user_team(id)) { return PLUGIN_HANDLED; } if(poprzednia_blyskawica[id]+5.0>get_gametime()) { client_print(id,print_chat,"Blyskawicy mozesz uzyc raz na 5 sek."); return PLUGIN_HANDLED; } poprzednia_blyskawica[id] = floatround(get_gametime()); ilosc_blyskawic[id]--; puscBlyskawice(id, ofiara, 50.0, 0.5); } return PLUGIN_HANDLED; } stock Create_TE_BEAMENTS(startEntity, endEntity, iSprite, startFrame, frameRate, life, width, noise, red, green, blue, alpha, speed) { message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte(TE_BEAMENTS) write_short(startEntity) // start entity write_short(endEntity) // end entity write_short(iSprite) // model write_byte(startFrame) // starting frame write_byte(frameRate) // frame rate write_byte(life) // life write_byte(width) // line width write_byte(noise) // noise amplitude write_byte(red) // red write_byte(green) // green write_byte(blue) // blue write_byte(alpha) // brightness write_byte(speed) // scroll speed message_end() } puscBlyskawice(id, ofiara, Float:fObrazenia = 55.0, Float:fCzas = 1.0){ //Obrazenia new ent = create_entity("info_target"); entity_set_string(ent, EV_SZ_classname, "blyskawica"); cod_inflict_damage(id, ofiara, fObrazenia, 1.0, ent, DMG_SHOCK); remove_entity(ent); //Piorun Create_TE_BEAMENTS(id, ofiara, sprite, 0, 10, floatround(fCzas*10), 150, 5, 200, 200, 200, 200, 10); //Dzwiek emit_sound(id, CHAN_WEAPON, gszSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); emit_sound(ofiara, CHAN_WEAPON, gszSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } public ResetHUD(id) { if(ma_klase[id] == 1) ilosc_blyskawic[id] = 3; }
Saper
Spoiler
Wklejka 1zjxcn9le7pc8 dodana przez szelbi, 30.10.2013 07:51
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. 135. 136. 137. 138. 139. 140. 141. 142. 143. 144. 145. 146. 147. 148. 149.
#include <amxmodx> #include <amxmisc> #include <codmod> #include <engine> #include <hamsandwich> new const nazwa[] = "Saper"; new const opis[] = "Posiada 3 miny"; new const bronie = 0; new const zdrowie = 10; new const kondycja = 15; new const inteligencja = 0; new const wytrzymalosc = 15; new const modelMiny[] = "models/QTM_CodMod/mine.mdl" new sprite_blast_miny; new ilosc_min_gracza[33]; public plugin_init() { register_plugin(nazwa, "1.0", "amxx.pl"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); register_touch("mine", "player", "DotykMiny"); register_event("HLTV", "NowaRunda_Miny", "a", "1=0", "2=0"); RegisterHam(Ham_Spawn, "player", "fwSpawn_Miny", 1); } public plugin_precache() { precache_model(modelMiny); sprite_blast_miny = precache_model("sprites/dexplo.spr"); } public client_disconnect(id) { new entMiny = find_ent_by_class(0, "mine"); while(entMiny > 0) { if(entity_get_edict(entMiny, EV_ENT_owner) == id) remove_entity(entMiny); entMiny = find_ent_by_class(entMiny, "mine"); } } public cod_class_enabled(id) { ilosc_min_gracza[id] = 3; } public cod_class_skill_used(id) { if (!ilosc_min_gracza[id]) { client_print(id, print_center, "Wykorzystales juz wszystkie miny!"); } else { ilosc_min_gracza[id]--; new Float:origin[3]; entity_get_vector(id, EV_VEC_origin, origin); new ent = create_entity("info_target"); entity_set_string(ent ,EV_SZ_classname, "mine"); entity_set_edict(ent ,EV_ENT_owner, id); entity_set_int(ent, EV_INT_movetype, MOVETYPE_TOSS); entity_set_origin(ent, origin); entity_set_int(ent, EV_INT_solid, SOLID_BBOX); entity_set_model(ent, modelMiny); entity_set_size(ent,Float:{-16.0,-16.0,0.0},Float:{16.0,16.0,2.0}); drop_to_floor(ent); set_rendering(ent,kRenderFxNone, 0,0,0, kRenderTransTexture,50); } } public fwSpawn_Miny(id) { if(is_user_alive(id)) ilosc_min_gracza[id] = 3; } public DotykMiny(ent, id) { if(!is_valid_ent(ent)) return; new attacker = entity_get_edict(ent, EV_ENT_owner); if (get_user_team(attacker) != get_user_team(id)) { new Float:fOrigin[3]; entity_get_vector( ent, EV_VEC_origin, fOrigin); new iOrigin[3]; for(new i=0;i<3;i++) iOrigin[i] = floatround(fOrigin[i]); message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin); write_byte(TE_EXPLOSION); write_coord(iOrigin[0]); write_coord(iOrigin[1]); write_coord(iOrigin[2]); write_short(sprite_blast_miny); write_byte(32); write_byte(20); write_byte(0); message_end(); new entlist[33]; new numfound = find_sphere_class(ent,"player", 90.0 ,entlist, 32); for (new i=0; i < numfound; i++) { new pid = entlist[i]; if (!is_user_alive(pid) || get_user_team(attacker) == get_user_team(pid)) continue; cod_inflict_damage(attacker, pid, 70.0, 0.8, ent, (1<<24)); } remove_entity(ent); } } public NowaRunda_Miny() { new entMiny = find_ent_by_class(-1, "mine"); while(entMiny > 0) { remove_entity(entMiny); entMiny = find_ent_by_class(entMiny, "mine"); } }
Hejter (Premium)
Spoiler
Wklejka 1pod13u73k0sy dodana przez szelbi, 30.10.2013 07:53
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. 135. 136. 137. 138. 139. 140. 141. 142. 143. 144. 145. 146. 147. 148. 149. 150. 151. 152. 153. 154. 155. 156. 157. 158. 159. 160. 161. 162. 163. 164. 165. 166. 167. 168. 169. 170. 171. 172. 173. 174. 175. 176. 177. 178. 179. 180. 181. 182. 183. 184. 185. 186. 187. 188. 189. 190. 191. 192. 193. 194. 195. 196. 197. 198. 199. 200. 201. 202. 203. 204. 205. 206. 207. 208. 209. 210. 211. 212. 213. 214. 215. 216. 217. 218. 219. 220. 221. 222. 223. 224. 225. 226. 227. 228. 229. 230. 231. 232. 233.
#include <amxmodx> #include <amxmisc> #include <codmod> #include <engine> #include <hamsandwich> #include <fakemeta> new const nazwa[] = "Hejter"; new const opis[] = "Dwa skoki, grawitacja 550, dwie apteczki"; new const bronie = 0; new const zdrowie = 10; new const kondycja = 10; new const inteligencja = 5; new const wytrzymalosc = 15; new sprite_white_apteczki; new ilosc_apteczek_gracza[33]; new skoki[33]; new ma_klase[33]; public plugin_init() { register_plugin(nazwa, "1.0", "amxx.pl"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); RegisterHam(Ham_Spawn, "player", "fwSpawn_Grawitacja", 1); register_think("medkit", "Think_Apteczki"); RegisterHam(Ham_Spawn, "player", "fwSpawn_Apteczki", 1); register_forward(FM_CmdStart, "fwCmdStart_MultiJump"); } public plugin_precache() { sprite_white_apteczki = precache_model("sprites/white.spr"); precache_model("models/w_medkit.mdl"); } public client_disconnect(id) { new entApteczki = find_ent_by_class(0, "medkit"); while(entApteczki > 0) { if(entity_get_edict(entApteczki, EV_ENT_owner) == id) remove_entity(entApteczki); entApteczki = find_ent_by_class(entApteczki, "medkit"); } } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_H)) { client_print(id, print_chat, "[Hejter] Nie masz uprawnien, aby uzywac tej klasy.") return COD_STOP; } entity_set_float(id, EV_FL_gravity, 550.0/800.0); ilosc_apteczek_gracza[id] = 2; ma_klase[id] = true; return COD_CONTINUE; } public cod_class_disabled(id) { entity_set_float(id, EV_FL_gravity, 1.0); ma_klase[id] = false; } public cod_class_skill_used(id) { if (!ilosc_apteczek_gracza[id]) { client_print(id, print_center, "Masz tylko 2 apteczki na runde!"); } else { ilosc_apteczek_gracza[id]--; new Float:origin[3]; entity_get_vector(id, EV_VEC_origin, origin); new ent = create_entity("info_target"); entity_set_string(ent, EV_SZ_classname, "medkit"); entity_set_edict(ent, EV_ENT_owner, id); entity_set_int(ent, EV_INT_solid, SOLID_NOT); entity_set_vector(ent, EV_VEC_origin, origin); entity_set_float(ent, EV_FL_ltime, halflife_time() + 7 + 0.1); entity_set_model(ent, "models/w_medkit.mdl"); set_rendering ( ent, kRenderFxGlowShell, 255,0,0, kRenderFxNone, 255 ) ; drop_to_floor(ent); entity_set_float(ent, EV_FL_nextthink, halflife_time() + 0.1); } } public fwSpawn_Grawitacja(id) { if(ma_klase[id]) entity_set_float(id, EV_FL_gravity, 550.0/800.0); } public fwSpawn_Apteczki(id) { if(is_user_alive(id)) ilosc_apteczek_gracza[id] = 2; } public Think_Apteczki(ent) { if(!is_valid_ent(ent)) return PLUGIN_CONTINUE; new id = entity_get_edict(ent, EV_ENT_owner); new dist = 300; new heal = 5+floatround(cod_get_user_intelligence(id)*0.5); if (entity_get_edict(ent, EV_ENT_euser2) == 1) { new Float:forigin[3]; entity_get_vector(ent, EV_VEC_origin, forigin); new entlist[33]; new numfound = find_sphere_class(0,"player", float(dist),entlist, 32,forigin); for (new i=0; i < numfound; i++) { new pid = entlist[i]; if (get_user_team(pid) != get_user_team(id)) continue; new maksymalne_zdrowie = 100+cod_get_user_health(pid); new zdrowie = get_user_health(pid); new Float:nowe_zdrowie = (zdrowie+heal<maksymalne_zdrowie)?zdrowie+heal+0.0:maksymalne_zdrowie+0.0; if (is_user_alive(pid)) entity_set_float(pid, EV_FL_health, nowe_zdrowie); } entity_set_edict(ent, EV_ENT_euser2, 0); entity_set_float(ent, EV_FL_nextthink, halflife_time() + 1.5); return PLUGIN_CONTINUE; } if (entity_get_float(ent, EV_FL_ltime) < halflife_time() || !is_user_alive(id)) { remove_entity(ent); return PLUGIN_CONTINUE; } if (entity_get_float(ent, EV_FL_ltime)-2.0 < halflife_time()) set_rendering ( ent, kRenderFxNone, 255,255,255, kRenderTransAlpha, 100 ); new Float:forigin[3]; entity_get_vector(ent, EV_VEC_origin, forigin); new iOrigin[3]; for(new i=0;i<3;i++) iOrigin[i] = floatround(forigin[i]); message_begin( MSG_BROADCAST, SVC_TEMPENTITY, iOrigin ); write_byte( TE_BEAMCYLINDER ); write_coord( iOrigin[0] ); write_coord( iOrigin[1] ); write_coord( iOrigin[2] ); write_coord( iOrigin[0] ); write_coord( iOrigin[1] + dist ); write_coord( iOrigin[2] + dist ); write_short( sprite_white_apteczki ); write_byte( 0 ); // startframe write_byte( 0 ); // framerate write_byte( 10 ); // life write_byte( 10 ); // width write_byte( 255 ); // noise write_byte( 255 ); // r, g, b write_byte( 100 );// r, g, b write_byte( 100 ); // r, g, b write_byte( 128 ); // brightness write_byte( 0 ); // speed message_end(); entity_set_edict(ent, EV_ENT_euser2 ,1); entity_set_float(ent, EV_FL_nextthink, halflife_time() + 0.5); return PLUGIN_CONTINUE; } public fwCmdStart_MultiJump(id, uc_handle) { if(!is_user_alive(id) || !ma_klase[id]) return FMRES_IGNORED; new flags = pev(id, pev_flags); if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id]) { skoki[id]--; new Float:velocity[3]; pev(id, pev_velocity,velocity); velocity[2] = random_float(265.0,285.0); set_pev(id, pev_velocity,velocity); } else if(flags & FL_ONGROUND) skoki[id] = 1; return FMRES_IGNORED; }
RasiaQ 30.10.2013
W
public cod_class_enabled(id) { entity_set_float(id, EV_FL_gravity, 500.0/800.0);
i w tym
public cod_class_enabled(id) { entity_set_float(id, EV_FL_gravity, 500.0/800.0);
500.0/ 800.0 oznacza 500 grawitacji. W tym możesz też to zmienić
@EDIT
Żeby nie robić spamu
Załączone pliki
- codclass_jumper.sma 1,12 KB 9 Ilość pobrań
- codclass_farmer.sma 4,41 KB 10 Ilość pobrań
- codclass_ninja.sma 1,71 KB 8 Ilość pobrań
- codclass_saper.sma 3,34 KB 6 Ilość pobrań
Użytkownik Drizzt edytował ten post 30.10.2013 16:12