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 1l2ygjfbp11c8 dodana przez speedkill, 09.08.2012 16:29
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.
#include <amxmodx>
#include <fakemeta>
#include <fun>
new counter_time[32]
new surf_ski_2_gunroom_god
new surf_ski_2_gunroom_time
new surf_ski_2_marioroom_god
new surf_ski_2_marioroom_time
new surf_ski_2_show_messages
new paremetres_restored[32]
new player_inside_area[32]
new welcome_message_counter=100
new origin_from_marioroom[3] = {-405, 2949, 2422}
new origin_from_gunroom[3] = {-486, -1000, -275}
/*y0 y1 z0 z1*/
new origin_marioroom_area[6]= {2250, 3655, 230, 1120, -2340, -2077}
new origin_gunroom_area[6]= {-720, -290, -1000, -650, -156, -30}
new message[300]
public plugin_init() {
register_plugin("surf_ski_2_rules", "2.0 beta", "Nikarus")
new map[32]
get_mapname(map, 32)
if (equali(map, "surf_ski_2"))
{
register_forward(FM_CmdStart,"fwd_CmdStart")
surf_ski_2_gunroom_god = register_cvar("surf_ski_2_gunroom_god","1")
surf_ski_2_gunroom_time = register_cvar("surf_ski_2_gunroom_time","30")
surf_ski_2_marioroom_god = register_cvar("surf_ski_2_marioroom_god","1")
surf_ski_2_marioroom_time = register_cvar("surf_ski_2_marioroom_time","30")
surf_ski_2_show_messages = register_cvar("surf_ski_2_show_messages","1")
set_task(0.1, "check", 0, "", 0, "b")
}
}
public player_in(index, origin_present[3], origin_area[6])
{
if (origin_present[0]>=origin_area[0] && origin_present[0]<=origin_area[1] && origin_present[1]>=origin_area[2] && origin_present[1]<=origin_area[3] && origin_present[2]>=origin_area[4] && origin_present[2]<=origin_area[5])
{
return 1;
}
return 0;
}
public throw_out(index, origin_to[3], time_allowed)
{
if (counter_time[index]==0) counter_time[index]=get_systime()
if ((get_systime()-counter_time[index])>=time_allowed)
{
set_user_origin(index, origin_to)
}
format(message, 300, "%sMasz %d sekund na wyjscie z klatki, albo wyrzuci cie automatycznie.", message, time_allowed-(get_systime()-counter_time[index]))
}
public godmod(index)
{
if(is_user_alive(index))
{
format(message, 300, "%sTutaj nie mozna zabijac^n", message)
set_user_godmode(index, 1)
}
}
public restore_parametres(index)
{
if(is_user_alive(index))
{
set_user_godmode(index, 0)
counter_time[index]=0
paremetres_restored[index] = 1
}
}
public check()
{
if (welcome_message_counter>0)
{
welcome_message_counter--;
if (welcome_message_counter==0)
{
set_hudmessage(255, 0, 0, 0.8, 0.5, 1)
show_hudmessage(0, "Zapraszamy na Center-Skill.pl")
}
}
for (new index=1; index<=get_playersnum(); index++)
{
new origin_present[3]
get_user_origin(index, origin_present)
player_inside_area[index]=0;
////////////////////
//if player in MARIOROOM
if (player_in(index, origin_present, origin_marioroom_area))
{
format(message, 300, "Przybyles do mario room.^n")
paremetres_restored[index]=0
player_inside_area[index]++
if (get_pcvar_num(surf_ski_2_marioroom_god)) godmod(index);
if (get_pcvar_num(surf_ski_2_marioroom_time)) throw_out(index, origin_from_marioroom, get_pcvar_num(surf_ski_2_marioroom_time));
if (get_pcvar_num(surf_ski_2_show_messages))
{
set_hudmessage(255, 0, 0, 0.8, 0.5, 0, 6.0, 0.2)
show_hudmessage(0, message)
}
}
////////////////////
//if player in GUNROOM
if (player_in(index, origin_present, origin_gunroom_area))
{
format(message, 300, "Przybyles do gun room^n")
paremetres_restored[index]=0
player_inside_area[index]++
if (get_pcvar_num(surf_ski_2_gunroom_god)) godmod(index);
if (get_pcvar_num(surf_ski_2_gunroom_time)) throw_out(index, origin_from_gunroom, get_pcvar_num(surf_ski_2_gunroom_time));
if (get_pcvar_num(surf_ski_2_show_messages))
{
set_hudmessage(255, 0, 0, 0.8, 0.5, 0, 6.0, 0.2)
show_hudmessage(0, message)
}
}
////////////////////
//Restoring parametres
if (!paremetres_restored[index] && !player_inside_area[index]) restore_parametres(index);
////////////////////
}
}
Dodanych wklejek: 15354
Powered By (Pav32) Pastebin © 2011


Dodatki SourceMod


