Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
Wklejka 1dm1y8qu44m8c dodana przez Blondyna, 28.05.2013 19:28
aa
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.
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <engine>
#include <hamsandwich>
#include <fun>
#include <fakemeta>
#define TIME 5.0
#define UNIKAT 2013
new const TXT[] = "Pasek naladowany"; // zmianiasz tekst po naladowaniu :)
new const nazwa[] = "Ninja";
new const opis[] = "";
new const bronie = 0;
new const zdrowie = 0;
new const kondycja = 0;
new const inteligencja = 0;
new const wytrzymalosc = 0;
new bool:ma_klase[33];
new bool:g_loaded[33]
new msgBarTime;
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_event("CurWeapon","CurWeapon","be", "1=1");
msgBarTime = get_user_msgid("BarTime");
}
public cod_class_enabled(id)
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 15);
entity_set_float(id, EV_FL_gravity, 200.0/800.0);
ma_klase[id] = true;
}
public cod_class_disabled(id)
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
entity_set_float(id, EV_FL_gravity, 1.0);
ma_klase[id] = false;
}
public CurWeapon(id)
{
if ((get_user_weapon(id) != CSW_C4) && (get_user_weapon(id) != CSW_KNIFE) && (ma_klase[id]))
{
client_cmd(id,"weapon_knife")
engclient_cmd(id,"weapon_knife")
}
}
public fwSpawn_Grawitacja(id)
{
if(ma_klase[id])
entity_set_float(id, EV_FL_gravity, 200.0/800.0);
}
public client_PreThink(id)
{
new clip, ammo
new weapon = get_user_weapon(id, clip, ammo)
new button2 = get_user_button(id);
if(ma_klase[id] & 524288 == 524288)
{
if(!(is_user_moving(id)) && get_entity_flags(id) & FL_ONGROUND && (!(button2 & (IN_FORWARD+IN_BACK+IN_MOVELEFT+IN_MOVERIGHT))))
{
if(!g_loaded[id])
{
if(weapon == 29)
{
if(!task_exists(id+UNIKAT))
{
new data[1];
data[0] = id;
bartime(id, floatround(TIME))
set_task(TIME, "set_invisible", id+UNIKAT, data, 1)
}
}
else
{
if(task_exists(id+UNIKAT))
{
remove_task(id+UNIKAT);
bartime(id, 0);
}
g_loaded[id] = false;
set_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
}
}
}
}
}
public set_invisible(data[])
{
new id = data[0];
set_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 25);
set_hudmessage(255, 255, 0, -1.0, 0.2, 0, 6.0, 3.0)
show_hudmessage(id, TXT)
g_loaded[id] = true;
}
stock bartime(id, czas)
{
message_begin(MSG_ONE_UNRELIABLE, msgBarTime, .player = id);
write_short(czas);
message_end();
}
stock bool:is_user_moving(id)
{
new Float:fVelocity[3];
pev(id, pev_velocity, fVelocity);
if(fVelocity[0] != 0.0 || fVelocity[1] != 0.0 || fVelocity[2] != 0.0)
return true;
return false;
}
Dodanych wklejek: 15354
Powered By (Pav32) Pastebin © 2011


Dodatki SourceMod


