Oto Klasa
Wklejka w57cq4m23688 dodana przez reverso, 29.12.2012 11:11
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.
#include <amxmodx> #include <amxmisc> #include <codmod_frakcje> #include <fakemeta> #include <fun> #define DMG_BULLET (1<<1) new const nazwa[] = "Mr.Jack"; new const opis[] = "Posiada TMP 5 INT = 1 DMG, ALL GRANATY, AutoBH "; new const bronie = (1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_TMP)|(1<<CSW_FLASHBANG); new const zdrowie = 30; new const kondycja = 10; new const inteligencja = 10; new const wytrzymalosc = 10; new const frakcja[] = "Darmowa"; new bool:ma_klase[33]; public plugin_init() { register_plugin(nazwa, "1.0", "amxx.pl"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc, frakcja); register_forward(FM_PlayerPreThink, "fwPrethink_AutoBH"); RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); } public cod_class_enabled(id) { give_item(id, "weapon_hegrenade"); give_item(id, "weapon_flashbang"); give_item(id, "weapon_flashbang"); give_item(id, "weapon_smokegrenade"); ma_klase[id] = true; } public cod_class_disabled(id) { ma_klase[id] = false; } public fwPrethink_AutoBH(id) { if(!ma_klase[id]) return PLUGIN_CONTINUE if (pev(id, pev_button) & IN_JUMP) { new flags = pev(id, pev_flags) if (flags & FL_WATERJUMP) return FMRES_IGNORED; if ( pev(id, pev_waterlevel) >= 2 ) return FMRES_IGNORED; if ( !(flags & FL_ONGROUND) ) return FMRES_IGNORED; new Float:velocity[3]; pev(id, pev_velocity, velocity); velocity[2] += 250.0; set_pev(id, pev_velocity, velocity); set_pev(id, pev_gaitsequence, 6); } return FMRES_IGNORED; } public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if(!is_user_connected(idattacker)) return HAM_IGNORED; if(!ma_klase[idattacker]) return HAM_IGNORED; if(damagebits & DMG_BULLET) { new weapon = get_user_weapon(idattacker); if(weapon == CSW_TMP) cod_inflict_damage(idattacker, this, 1.0, 5.0, idinflictor, damagebits); } return HAM_IGNORED; }
Oto logi:
Wklejka 1tknijvswnfos dodana przez reverso, 29.12.2012 11:12
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13.
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team codclass_mrjack.sma(27) : warning 217: loose indentation codclass_mrjack.sma(27) : error 017: undefined symbol "RegisterHam" codclass_mrjack.sma(27) : warning 215: expression has no effect codclass_mrjack.sma(27) : warning 215: expression has no effect codclass_mrjack.sma(27) : error 001: expected token: ";", but found ")" codclass_mrjack.sma(27) : error 029: invalid expression, assumed zero codclass_mrjack.sma(27) : fatal error 107: too many error messages on one line Compilation aborted. 4 Errors.