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 19paayc81u2sc dodana przez Fili:P, 15.12.2012 18:08
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.
#include < amxmodx >
#include < achievements >
#include < money >
#include < CSWeaponsUtil >
#include < csx >
#include < cstrike >
#include < hamsandwich >
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Fili:P"
#define MAX 32
#define ACH 5
#define WPN_PISTOL (1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE)|(1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)
#define WPN_OTHER (1<<CSW_SMOKEGRENADE)|(1<<CSW_HEGRENADE)|(1<<CSW_FLASHBANG)
#define WPN_PRIM (1<<CSW_M3)|(1<<CSW_XM1014)|(1<<CSW_MP5NAVY)|(1<<CSW_TMP)|(1<<CSW_P90)|(1<<CSW_MAC10)|(1<<CSW_UMP45)|(1<<CSW_AK47)|(1<<CSW_M4A1)|(1<<CSW_SG552)|(1<<CSW_AUG)|(1<<CSW_FAMAS)|(1<<CSW_GALI)|(1<<CSW_SCOUT)|(1<<CSW_AWP)|(1<<CSW_G3SG1)|(1<<CSW_SG550)|(1<<CSW_M249)
#define WEAPON_BITSUM WPN_PISTOL|WPN_PRIM|WPN_OTHER
new g_AName[ ACH ][]=
{
"Milioner",
"Zostawic tysiace",
"Przeciw wrogom systemu",
"Anty New World Order",
"Sprobowac wszystkiego"
}
new g_ADesc[ ACH ][]=
{
// Money
"Zdobadz milion dolarow",
"Wyjdz z serwera, majac 16 000",
// Team
"Przezyj 100 rund jako anty terrorysta",
"Przezyj 100 rund jako terrorysta",
"Kup raz kazda bron"
}
new g_ATarget[ ACH ]=
{
// Money
1000000,
1,
// Team
100,
100,
1610612666 // taka tam sumka bitowa
}
new g_Handle[ ACH ];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_logevent("Koniec_Rundy", 2, "1=Round_End")
for( new i = 0; i < ACH; i++ )
g_Handle[ i ] = ach_add( g_AName[ i ], g_ADesc[ i ], g_ATarget[ i ] );
}
public ach_menu_display( id, data[ 2 ] )
{
data[ 0 ] = 28;
data[ 1 ] = LiczBronie( id );
}
public KoniecRundy( )
{
for( new i = 1; i <= MAX; i++ )
{
if( !is_user_alive( i ))
continue;
if( get_user_team( i ) == 2 && ach_get_stance( i, g_Handle[ 2 ] ) )
ach_add_status( i, g_Handle[ 2 ], 1 );
if( get_user_team( i ) == 1 && ach_get_stance( i, g_Handle[ 3 ] ) )
ach_add_status( i, g_Handle[ 3 ], 1 );
}
}
public ach_save_pre( id, typ )
{
if( !is_user_connected( id ) )
return 0;
if( ach_get_stance( id, g_Handle[ 1 ] ) || cs_get_user_money( id ) < 16000 || typ != SAVE_IN_DISCONNECT )
return 0;
ach_set_status( id, g_Handle[ 1 ], 1 );
}
public MoneyAddToPlayer(id,stan,premia,zrodlo)
{
if( !is_user_connected( id ) )
return 0;
if( zrodlo != 0 || premia < 1 )
return 0;
if( ach_get_stance( id, g_Handle[ 0 ] ) )
return 0;
ach_add_status( id, g_Handle[ 0 ], stan );
}
public CS_OnBuyItem( id, weaponid )
{
if( !is_user_connected( id ) )
return 0;
if( !( ach_get_status( id, g_Handle[ 4 ] ) & weaponid ) )
DodajBron( id, weaponid );
}
public DodajBron( id, weapon_bit )
{
new Bitsum = ach_get_status( id, g_Handle[ 4 ] );
ach_set_status( id, g_Handle[ 4 ], Bitsum & weapon_bit );
}
public LiczBronie( id )
{
new ile = 0;
for( new i = 1; i <= 30; i++ )
{
if( ach_get_status( id, g_Handle[ 4 ] ) & (1<<i) )
ile++;
continue;
}
return ile;
}
Dodanych wklejek: 15354
Powered By (Pav32) Pastebin © 2011


Dodatki SourceMod


