hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.03.28. 17:04



Jelenlévő felhasználók

Jelenleg 229 felhasználó van jelen :: 1 regisztrált, 0 rejtett és 228 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: Google [Bot] az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 7 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Hiba
HozzászólásElküldve: 2015.01.15. 00:40 
Offline
Jómunkásember
Avatar

Csatlakozott: 2014.09.27. 19:51
Hozzászólások: 411
Megköszönt másnak: 89 alkalommal
Megköszönték neki: 14 alkalommal
Hali!
Valaki meg mondaná miért irja ki eszt szerveren ?
ML_NOTFOUND: AR_INFO_WARON
ML_NORFOUND: AR_INFO_CLIENT


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hiba
HozzászólásElküldve: 2015.01.15. 00:47 
Offline
Jómunkásember

Csatlakozott: 2014.10.30. 10:18
Hozzászólások: 468
Megköszönt másnak: 235 alkalommal
Megköszönték neki: 34 alkalommal
Tipp: Langtext van?


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hiba
HozzászólásElküldve: 2015.01.15. 00:56 
Offline
Jómunkásember
Avatar

Csatlakozott: 2014.09.27. 19:51
Hozzászólások: 411
Megköszönt másnak: 89 alkalommal
Megköszönték neki: 14 alkalommal
igen


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hiba
HozzászólásElküldve: 2015.01.15. 01:01 
Offline
Jómunkásember

Csatlakozott: 2014.10.30. 10:18
Hozzászólások: 468
Megköszönt másnak: 235 alkalommal
Megköszönték neki: 34 alkalommal
nekem ilyeneket akkor írt ki amikor nem volt meg a langtext! vagy nem volt beleírva semmi...

Ők köszönték meg jokypapa nek ezt a hozzászólást: PiStA99 (2015.01.15. 01:37)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hiba
HozzászólásElküldve: 2015.01.15. 01:06 
Offline
Jómunkásember
Avatar

Csatlakozott: 2014.09.27. 19:51
Hozzászólások: 411
Megköszönt másnak: 89 alkalommal
Megköszönték neki: 14 alkalommal
ebből nem tudod ki venni a TXT hogy ne keljen a TXT bele rakni ?
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <engine>
  3. #include <fun>
  4. #include <cstrike>
  5. #include <amxmisc>
  6. #include <fakemeta>
  7.  
  8. new Float:TEST_TIME=0.1
  9. new Float:WARN_TIME=1.0
  10. new Float:FLASH_TIME=0.8
  11.  
  12. #define MAX_ZONES 8
  13. new MIN_PLAYERS=2 /*Dobre do testowania w mniej osob
  14. lub gdy chcesz by koniec rashu byl
  15. przy wiekszej liczbbie osob*/
  16. #define TASK_ZONE 600743
  17. #define TASK_LOOP 500743
  18. #define TASK_VIEW 400743
  19. #define TASK_INFO 300743
  20. #define TASK_FLASH 200743
  21.  
  22. #define AUTHOR "Miczu"
  23.  
  24. new mUsuwaniestrefy // Menu
  25. new mcbUsuwaniestrefy // Menu Callback
  26. new mZapisacstrefy // Menu
  27. new mcbZapisacstrefy // Menu Callback
  28. new mAntirushControlMenu // Menu
  29. new mcbAntirushControlMenu // Menu Callback
  30. //Uzylem generatora i takie malo eleganckie wyszlo
  31.  
  32. new map_cors_edit[MAX_ZONES*6]
  33. new zones_edit
  34. new zone_editing=0
  35. new map_editor
  36. new map_cors_file_line=127
  37. new zone_incresment=10
  38. new zone_coords_num=0
  39. new zone_coords[3][13] = { "X Kordinata", "Y Kordinata", "Z Kordinata"}
  40. new editign=0
  41. new edit_g_team[3]
  42. new round_start=0
  43. new lines
  44.  
  45. new gMsgScreenFade
  46. new rasher[33]=0
  47. new raszer[33]
  48. new flashed[33]=0
  49. new sounded[33]=0
  50. new speed_limit[33]=0
  51. new Float:g_time
  52. new g_team[3]
  53. new g_origin[3]
  54. new map_cors_pre=2
  55. new map_cors_origin[MAX_ZONES*6]
  56. new slap
  57. new warn_control = 0 // miczu
  58. new zones = 0
  59.  
  60. new zone_color_aktiv[3] = { 0, 0, 255 }
  61. new zone_color_red[3] = { 0, 255, 0 }
  62. new zone_color_yellow[3] = { 255, 255, 0 }
  63. new spr_dot
  64.  
  65. new actions[11][32] = { "barney/donthurtem.wav","nihilanth/nil_now_die.wav","hgrunt/c2a3_hg_laugh.wav","hgrunt/silence!.wav","hgrunt/silence!.wav","barney/whatsgoingon.wav","barney/rightway.wav","barney/nosir.wav","barney/openfire.wav","barney/stophere.wav","hgrunt/c2a2_hg_chat5a.wav"}
  66.  
  67. public plugin_init()
  68. {
  69. register_plugin("Anti-Rush","2.5d",AUTHOR)
  70.  
  71.  
  72. register_clcmd("say /rules","info")
  73. register_clcmd("say /antirusher_menu","amx_antirusher_menu")
  74.  
  75. register_cvar("Antirusher", "2.5d",FCVAR_SERVER)
  76. register_cvar("amx_antirusher","1")
  77. register_cvar("amx_antirusher_sound","1")
  78. register_cvar("amx_antirusher_sound_mode","0")
  79. register_cvar("amx_antirusher_warn","1")
  80. register_cvar("amx_antirusher_slap","3")
  81. register_cvar("amx_antirusher_time","60.0")
  82. register_cvar("amx_antirusher_freq","0.1")
  83. register_cvar("amx_antirusher_action","1")
  84. register_cvar("amx_antirusher_cash","50")
  85. register_cvar("amx_antirusher_cash_end","2")
  86. register_cvar("amx_antirusher_immunity","0")
  87. register_cvar("amx_antirusher_zasady","1")
  88. register_cvar("amx_antirusher_people","2")
  89.  
  90. register_event("HLTV","Event_StartRound","a","1=0","2=0")
  91. register_event("RoundTime","event_roundtime","bc")
  92. register_event("SendAudio", "bomb_planted", "a", "2&%!MRAD_BOMBPL")
  93. register_event("DeathMsg","DeathMsg","ade")
  94. register_event("CurWeapon","CurWeapon","be")
  95.  
  96. gMsgScreenFade = get_user_msgid("ScreenFade")
  97. map_cors_pre = map_cors_present(map_cors_origin,g_team)
  98. TEST_TIME=get_cvar_float("amx_antirusher_freq")
  99.  
  100. register_menucmd(register_menuid("Antirush Menu"), 1023, "Antirush_menu")
  101. register_menucmd(register_menuid("Punishment Menu"), 1023, "Punishment_menu")
  102. register_menucmd(register_menuid("Antirush Zone Creator"), 1023, "Antirush_Zone_Creator")
  103. register_menucmd(register_menuid("Edit Zone"), 1023, "edit_zone2")
  104.  
  105. mAntirushControlMenu = menu_create("Antirush Control Menu", "mh_AntirushControlMenu")
  106. mcbAntirushControlMenu = menu_makecallback("mcb_AntirushControlMenu")
  107. menu_additem(mAntirushControlMenu, "Antirush cvar control", "ma_AntirushControlMenu", ADMIN_CVAR, mcbAntirushControlMenu)
  108. menu_additem(mAntirushControlMenu, "Antirush Punishments", "ma_AntirushControlMenu", ADMIN_CVAR, mcbAntirushControlMenu)
  109. menu_additem(mAntirushControlMenu, "Antirush Zone Creator", "ma_AntirushControlMenu", ADMIN_RCON, mcbAntirushControlMenu)
  110.  
  111. mZapisacstrefy = menu_create("Zapisac strefy", "mh_Zapisacstrefy")
  112. mcbZapisacstrefy = menu_makecallback("mcb_Zapisacstrefy")
  113. menu_additem(mZapisacstrefy, "TAK", "ma_Zapisacstrefy", ADMIN_ALL, mcbZapisacstrefy)
  114. menu_additem(mZapisacstrefy, "NIE", "ma_Zapisacstrefy", ADMIN_ALL, mcbZapisacstrefy)
  115.  
  116. mUsuwaniestrefy = menu_create("Usuwanie strefy", "mh_Usuwaniestrefy")
  117. mcbUsuwaniestrefy = menu_makecallback("mcb_Usuwaniestrefy")
  118. menu_additem(mUsuwaniestrefy, "TAK", "ma_Usuwaniestrefy", ADMIN_ALL, mcbUsuwaniestrefy)
  119. menu_additem(mUsuwaniestrefy, "NIE", "ma_Usuwaniestrefy", ADMIN_ALL, mcbUsuwaniestrefy)
  120.  
  121. require_module("fakemeta")
  122.  
  123. require_module("engine")
  124. require_module("fun")
  125. require_module("cstrike")
  126.  
  127. return PLUGIN_CONTINUE
  128. }
  129.  
  130. public plugin_precache() {
  131. spr_dot = precache_model("sprites/dot.spr") // potrzebne do robienia lini
  132. }
  133.  
  134. ///////////////////////////////////////////////////////////////////////
  135. ///////// M_Antirusher Events /////////
  136. ////////////////////////////////////////////////////////////////////////
  137.  
  138. public client_connect(id){
  139. free_the_man(id) //nie chcemy by ktos kto sie polaczy byl karany
  140. } //kiedy osoba co opuszczajac serwer miala kare
  141. //czyli gdy stary i nowy gracz beda mieli te same id
  142.  
  143. public client_disconnect(id) {
  144. free_the_man(id) //tak na wszelki wypadek, ale mozna sobie odpuscic
  145. return PLUGIN_CONTINUE
  146. }
  147.  
  148. public Event_StartRound(){
  149. round_start++
  150. MIN_PLAYERS = get_cvar_num("amx_antirusher_people") // zmiana people dziala na starcie rundy
  151. }
  152.  
  153. public client_putinserver(id){ //tu informacja o rashu
  154. new arg[1] //Zoptymalizowane uzycie set_task
  155. arg[0]=id //Deklaracja 1 kumurki pamieci zamiast 4 i bez zmian z str-> num i na odwrot
  156.  
  157. if (map_cors_pre && get_cvar_num("amx_antirusher"))
  158. set_task(45.0,"informclient",TASK_INFO+id,arg,1)
  159. }
  160.  
  161. public bomb_planted() { //podlozono bombe
  162. remove_task(TASK_LOOP) //przerywa sprawdzanie rashu
  163. remove_task(TASK_VIEW) //przerywa wyswietlanie granic dla userow
  164. free_the_world() //mozna rashowac
  165. }
  166.  
  167. public event_roundtime() {
  168. if (round_start<1) return PLUGIN_CONTINUE //takie zabezpieczenie by nie sprawdzalo po czasie rashu
  169. if (map_cors_pre && get_cvar_num("amx_antirusher")) {
  170. slap = floatround(get_cvar_num("amx_antirusher_slap")*(10.0*TEST_TIME)) // slapy biora zawsze tyle samo hp w przedziale czasu
  171. remove_task(TASK_LOOP)
  172. remove_task(TASK_VIEW)
  173. g_time = get_gametime() + get_cvar_float("amx_antirusher_time")
  174. set_task(2*TEST_TIME, "checkOrigin",TASK_LOOP)
  175. set_task(2*WARN_TIME, "rash_warn",TASK_VIEW)
  176.  
  177. }
  178. return PLUGIN_CONTINUE
  179. } //
  180.  
  181. public DeathMsg(){
  182. new vid = read_data(2) //id trupa
  183. free_the_man(vid) //uwalnia trupa by zaczol runde z czystym kontem
  184. }
  185.  
  186. //////////////////////////////////////////////////////////////////////
  187. ///////// M_Antirusher Things /////////
  188. //////////////////////////////////////////////////////////////////////
  189.  
  190. map_cors_present(maporigin[MAX_ZONES*6],team[3]) {
  191.  
  192. new zonefile[256],zonefile2[256]
  193.  
  194. get_configsdir(zonefile, 255)
  195.  
  196. if(is_linux_server()){
  197. format(zonefile2, 255, "%s/antirusher", zonefile)
  198. if(!(dir_exists(zonefile2))) mkdir (zonefile2)
  199. format(zonefile2, 255, "%s/antirusher/rush.cor", zonefile)
  200. }
  201. else{
  202. format(zonefile2, 255, "%s\antirusher", zonefile)
  203. if(!(dir_exists(zonefile2))) mkdir (zonefile2)
  204. format(zonefile2, 255, "%s\antirusher\rush.cor", zonefile)
  205. }
  206.  
  207. if (file_exists(zonefile2)){
  208.  
  209. new readdata[512]
  210. new currentmap[32]
  211. get_mapname(currentmap,31)
  212. new map[32], len
  213. new x11[16],x12[16],y11[16],y12[16],z11[16],z12[16]
  214. new x21[16],x22[16],y21[16],y22[16],z21[16],z22[16]
  215. new x31[16],x32[16],y31[16],y32[16],z31[16],z32[16]
  216. new x41[16],x42[16],y41[16],y42[16],z41[16],z42[16]
  217. new x51[16],x52[16],y51[16],y52[16],z51[16],z52[16]
  218. new x61[16],x62[16],y61[16],y62[16],z61[16],z62[16]
  219. new x71[16],x72[16],y71[16],y72[16],z71[16],z72[16]
  220. new x81[16],x82[16],y81[16],y82[16],z81[16],z82[16]
  221.  
  222.  
  223. for(new i=0; i < 128 && read_file(zonefile2,i,readdata,511,len); i++) {
  224. x11="";x12="";y11="";y12="";z11="";z12=""
  225. x21="";x22="";y21="";y22="";z21="";z22=""
  226. x31="";x32="";y31="";y32="";z31="";z32=""
  227. x41="";x42="";y41="";y42="";z41="";z42=""
  228. x51="";x52="";y51="";y52="";z51="";z52=""
  229. x61="";x62="";y61="";y62="";z61="";z62=""
  230. parse(readdata,team,2,map,31,x11,15,x12,15,y11,15,y12,15,z11,15,z12,15,
  231. x21,15,x22,15,y21,15,y22,15,z21,15,z22,15,
  232. x31,15,x32,15,y31,15,y32,15,z31,15,z32,15,
  233. x41,15,x42,15,y41,15,y42,15,z41,15,z42,15,
  234. x51,15,x52,15,y51,15,y52,15,z51,15,z52,15,
  235. x61,15,x62,15,y61,15,y62,15,z61,15,z62,15,
  236. x71,15,x72,15,y71,15,y72,15,z71,15,z72,15,
  237. x81,15,x82,15,y81,15,y82,15,z81,15,z82,15)
  238. lines=i
  239. if(equal(map,currentmap)) {
  240. maporigin[0] = str_to_num(x11)
  241. maporigin[1] = str_to_num(x12)
  242. maporigin[2] = str_to_num(y11)
  243. maporigin[3] = str_to_num(y12)
  244. maporigin[4] = str_to_num(z11)
  245. maporigin[5] = str_to_num(z12)
  246. maporigin[6] = str_to_num(x21)
  247. maporigin[7] = str_to_num(x22)
  248. maporigin[8] = str_to_num(y21)
  249. maporigin[9] = str_to_num(y22)
  250. maporigin[10] = str_to_num(z21)
  251. maporigin[11] = str_to_num(z22)
  252. maporigin[12] = str_to_num(x31)
  253. maporigin[13] = str_to_num(x32)
  254. maporigin[14] = str_to_num(y31)
  255. maporigin[15] = str_to_num(y32)
  256. maporigin[16] = str_to_num(z31)
  257. maporigin[17] = str_to_num(z32)
  258. maporigin[18] = str_to_num(x41)
  259. maporigin[19] = str_to_num(x42)
  260. maporigin[20] = str_to_num(y41)
  261. maporigin[21] = str_to_num(y42)
  262. maporigin[22] = str_to_num(z41)
  263. maporigin[23] = str_to_num(z42)
  264. maporigin[24] = str_to_num(x51)
  265. maporigin[25] = str_to_num(x52)
  266. maporigin[26] = str_to_num(y51)
  267. maporigin[27] = str_to_num(y52)
  268. maporigin[28] = str_to_num(z51)
  269. maporigin[29] = str_to_num(z52)
  270. maporigin[30] = str_to_num(x61)
  271. maporigin[31] = str_to_num(x62)
  272. maporigin[32] = str_to_num(y61)
  273. maporigin[33] = str_to_num(y62)
  274. maporigin[34] = str_to_num(z61)
  275. maporigin[35] = str_to_num(z62)
  276. maporigin[36] = str_to_num(x71)
  277. maporigin[37] = str_to_num(x72)
  278. maporigin[38] = str_to_num(y71)
  279. maporigin[39] = str_to_num(y72)
  280. maporigin[40] = str_to_num(z71)
  281. maporigin[41] = str_to_num(z72)
  282. maporigin[42] = str_to_num(x81)
  283. maporigin[43] = str_to_num(x82)
  284. maporigin[44] = str_to_num(y81)
  285. maporigin[45] = str_to_num(y82)
  286. maporigin[46] = str_to_num(z81)
  287. maporigin[47] = str_to_num(z82)
  288.  
  289. map_cors_file_line=i
  290. for(new j=0;j<MAX_ZONES;j++){
  291. i=j*6
  292. if(((maporigin[1+i]-maporigin[0+i])>0)&&((maporigin[3+i]-maporigin[2+i])>0)&&((maporigin[5+i]-maporigin[4+i])>0))
  293. zones++
  294. }
  295.  
  296. return 1
  297. }
  298. if((len<15) && (map_cors_file_line>i)) map_cors_file_line=i
  299. }
  300. log_amx("%L",LANG_SERVER,"AR_NO_ZONE")
  301. if(lines+2<map_cors_file_line) map_cors_file_line=lines+2 //zapobiega zapisywaniu na 127 pozycji gdy nie ma wolnych lini na koncu <!-- s:) --><img src=\"{SMILIES_PATH}/icon_e_smile.gif\" alt=\":)\" title=\"mosoly\" /><!-- s:) -->
  302. return 0
  303. }
  304. else log_amx("%L",LANG_SERVER,"AR_NO_FILE")
  305. g_team="XX"
  306. map_cors_file_line=0 //nie ma pluku rush,cor wiec niech zapisze w pierwszej lini
  307. return 0
  308. }
  309.  
  310.  
  311. public info(id){
  312. new anti_zasady = get_cvar_num("amx_antirusher_zasady")
  313. if(anti_zasady==1){
  314. new map[4]
  315. get_mapname(map,3) // rozpoznawanie typu mapy na podstawie pierwszych 3 liter :p
  316.  
  317. if (equal(map,"cs_")) client_print(id,print_chat, "%L",LANG_PLAYER,"AR_CS_MAP")
  318. else if (equal(map,"de_")) client_print(id,print_chat, "%L",LANG_PLAYER,"AR_DE_MAP")
  319. else if (equal(map,"fy_")) client_print(id,print_chat, "%L",LANG_PLAYER,"AR_FY_MAP")
  320. else if (equal(map,"aim")) client_print(id,print_chat, "%L",LANG_PLAYER,"AR_AIM_MAP")
  321. else if (equal(map,"awp")) client_print(id,print_chat, "%L",LANG_PLAYER,"AR_AWP_MAP")
  322. else if (equal(map,"kz_")) client_print(id,print_chat, "%L",LANG_PLAYER,"AR_KZ_MAP")
  323. else if (equal(map,"fun")) client_print(id,print_chat, "%L",LANG_PLAYER,"AR_FUN_MAP")
  324. else if (equal(map,"sur")) client_print(id,print_chat, "%L",LANG_PLAYER,"AR_SURF_MAP")
  325. else if (equal(map,"sj_")) client_print(id,print_chat, "%L",LANG_PLAYER,"AR_SJ_MAP")
  326. else if (equal(map,"ka_")) client_print(id,print_chat, "%L",LANG_PLAYER,"AR_KA_MAP")
  327. else if (equal(map,"he_")) client_print(id,print_chat, "%L",LANG_PLAYER,"AR_HE_MAP")
  328. }
  329. }
  330.  
  331. public informclient(arg[1]){
  332. // arg[0] to id ^^
  333. if(is_user_connected(arg[0])) { // spradza czy gracz nadal jest na serwie
  334. client_print(arg[0],print_chat,"%L",LANG_PLAYER,"AR_INFO_WARN")
  335. client_print(arg[0],print_chat,"%L",LANG_PLAYER,"AR_INFO_CLIENT",get_cvar_float("amx_antirusher_time"))
  336. }
  337. }
  338.  
  339.  
  340. public checkOrigin() { // tu sprawdza czy rashujesz
  341.  
  342. if (round_start<1) return
  343. if (get_gametime() > g_time)
  344. {
  345. free_the_world()
  346. return
  347. }
  348.  
  349. new players[32], num,tt_num,ct_num
  350. get_players(players,num)
  351.  
  352. for(new i=0;i<num;i++)
  353. {
  354. if(is_user_alive(players[i]))
  355. {
  356. if(cs_get_user_team(players[i])==CS_TEAM_T) tt_num++
  357. else if(cs_get_user_team(players[i])==CS_TEAM_CT) ct_num++
  358. }
  359. }
  360.  
  361. if (tt_num<MIN_PLAYERS)
  362. {
  363. free_the_world()
  364. return
  365. }
  366. if (ct_num<MIN_PLAYERS)
  367. {
  368. free_the_world()
  369. return
  370. }
  371.  
  372.  
  373. get_players(players,num)
  374. set_task(TEST_TIME, "checkOrigin", TASK_LOOP)
  375. for(new i = 0; i < num; i++)
  376. {
  377. if(is_user_alive(players[i]))
  378. {
  379. if((equal(g_team,"T")&&(cs_get_user_team(players[i])==CS_TEAM_T))||(equal(g_team,"CT")&&(cs_get_user_team(players[i])==CS_TEAM_CT))||equal(g_team,"XX"))
  380. {
  381. get_user_origin(players[i],g_origin)
  382. if ((map_cors_origin[0] < g_origin[0] < map_cors_origin[1]) && (map_cors_origin[2] < g_origin[1] < map_cors_origin[3]) && (map_cors_origin[4] < g_origin[2] < map_cors_origin[5]) ||
  383. (map_cors_origin[6] < g_origin[0] < map_cors_origin[7]) && (map_cors_origin[8] < g_origin[1] < map_cors_origin[9]) && (map_cors_origin[10] < g_origin[2] < map_cors_origin[11]) ||
  384. (map_cors_origin[12] < g_origin[0] < map_cors_origin[13]) && (map_cors_origin[14] < g_origin[1] < map_cors_origin[15]) && (map_cors_origin[16] < g_origin[2] < map_cors_origin[17]) ||
  385. (map_cors_origin[18] < g_origin[0] < map_cors_origin[19]) && (map_cors_origin[20] < g_origin[1] < map_cors_origin[21]) && (map_cors_origin[22] < g_origin[2] < map_cors_origin[23]) ||
  386. (map_cors_origin[24] < g_origin[0] < map_cors_origin[25]) && (map_cors_origin[26] < g_origin[1] < map_cors_origin[27]) && (map_cors_origin[28] < g_origin[2] < map_cors_origin[29]) ||
  387. (map_cors_origin[30] < g_origin[0] < map_cors_origin[31]) && (map_cors_origin[32] < g_origin[1] < map_cors_origin[33]) && (map_cors_origin[34] < g_origin[2] < map_cors_origin[35])){
  388. punishPlayer(players[i])
  389. raszer[players[i]]=1
  390. }
  391. else{
  392. free_the_man(players[i])
  393. }
  394. }
  395. }
  396. }
  397. }
  398.  
  399. public rash_warn(){ // tu sprawsza czy ma ci wyswietlic granice rashu
  400. if (get_gametime() > g_time){
  401. return
  402. }
  403. if (get_cvar_num("amx_antirusher_warn")==0) return
  404. new players[32], num, tt_num, ct_num
  405. get_players(players,num)
  406.  
  407. for(new i=0;i<num;i++)
  408. {
  409. if(is_user_alive(players[i]))
  410. {
  411. if(cs_get_user_team(players[i])==CS_TEAM_T) tt_num++
  412. else if(cs_get_user_team(players[i])==CS_TEAM_CT) ct_num++
  413. }
  414. }
  415.  
  416. if (equal(g_team,"CT")){
  417. if (tt_num<MIN_PLAYERS) return
  418. if (ct_num<MIN_PLAYERS) return
  419. }
  420.  
  421. set_task(WARN_TIME, "rash_warn",TASK_VIEW)
  422.  
  423. new orrigins[3]
  424. for(new j=0;j<num;j++){
  425. if(raszer[players[j]]<1 && is_user_alive(players[j])) // jak juz raszuje to mozna graczowi odpuscic <!-- s:) --><img src=\"{SMILIES_PATH}/icon_e_smile.gif\" alt=\":)\" title=\"mosoly\" /><!-- s:) -->
  426. {
  427. if((equal(g_team,"T")&&(cs_get_user_team(players[j])==CS_TEAM_T))||(equal(g_team,"CT")&&(cs_get_user_team(players[j])==CS_TEAM_CT))||equal(g_team,"XX"))
  428. {
  429. get_user_origin(players[j],orrigins)
  430. for(new i=0;i<MAX_ZONES;i++){
  431. if((map_cors_origin[0+i*6]-450 < orrigins[0] < map_cors_origin[0+i*6]) && (map_cors_origin[2+i*6]-100 < orrigins[1] < map_cors_origin[3+i*6]+100) && (map_cors_origin[4+i*6] < orrigins[2] < map_cors_origin[5+i*6])){
  432. zone_warn(players[j],i,0,orrigins)
  433. }
  434. else if((map_cors_origin[1+i*6] < orrigins[0] < map_cors_origin[1+i*6]+450) && (map_cors_origin[2+i*6]-100 < orrigins[1] < map_cors_origin[3+i*6]+100) && (map_cors_origin[4+i*6] < orrigins[2] < map_cors_origin[5+i*6])){
  435. zone_warn(players[j],i,1,orrigins)
  436. }
  437. if((map_cors_origin[0+i*6]-100 < orrigins[0] < map_cors_origin[0+i*6+1]+100) && (map_cors_origin[2+i*6]-450 < orrigins[1] < map_cors_origin[2+i*6]) && (map_cors_origin[4+i*6] < orrigins[2] < map_cors_origin[5+i*6])){
  438. zone_warn(players[j],i,2,orrigins)
  439. }
  440. else if((map_cors_origin[0+i*6]-100 < orrigins[0] < map_cors_origin[0+i*6+1]+100) && (map_cors_origin[3+i*6] < orrigins[1] < map_cors_origin[3+i*6]+450) && (map_cors_origin[4+i*6] < orrigins[2] < map_cors_origin[5+i*6])){
  441. zone_warn(players[j],i,3,orrigins)
  442. }
  443. } // nigdy nie bedziesz widzial przednia i tylna lub lewa i prawa sciane rownoczesnie wiec jest else
  444.  
  445. }
  446. }
  447. }
  448. }
  449.  
  450. ///////////////////////////////////////////////////////////////////////////
  451. ///////// M_Antirusher Punishments /////////
  452. ///////////////////////////////////////////////////////////////////////////
  453.  
  454. punishPlayer(id) {
  455.  
  456. new action = 1
  457. action = get_cvar_num("amx_antirusher_action")
  458. if ((get_cvar_num("amx_antirusher_immunity") == 1)&&(get_user_flags(id)&ADMIN_IMMUNITY)) {
  459. action = 0
  460. }
  461. switch (action) {
  462. case 0:{
  463. new name[32]
  464. get_user_name(id,name,31)
  465. server_cmd("amx_chat %L",LANG_SERVER,"AR_SRV_INFO", name)
  466. }
  467. case 1: fakedamage ( id, "rashing", slap*1.0,16384)
  468. case 2: user_silentkill(id)
  469. case 3: kickPlayer(id)
  470. case 4: banPlayer(id)
  471. case 5:{
  472. if(speed_limit[id]==0){
  473. speed_limit[id]=1
  474. set_user_maxspeed(id,(get_user_maxspeed(id)/2.0));
  475. }
  476. }
  477. case 6:{
  478. if(flashed[id]==0){
  479. flashed[id]=1
  480. set_task(FLASH_TIME,"Flash",TASK_FLASH+id)
  481. }
  482. }
  483. case 7:{
  484. new Float: velocity[3]
  485. new Float: DW //D?ugosc wektora
  486. entity_get_vector(id,EV_VEC_velocity,velocity)
  487. DW=vector_length ( velocity )+0.0001
  488. velocity[0]=(velocity[0]/DW)*(-500.0)
  489. velocity[1]=(velocity[1]/DW)*(-500.0)
  490. if(velocity[2]<0) velocity[2]=velocity[2]*(-1.0)+15.0 //wyrzuca do gory
  491. entity_set_vector(id,EV_VEC_velocity,velocity)
  492. }
  493. case 8:{
  494. rasher[id]=1
  495. }
  496. case 9:{
  497. aim_on_me(id)
  498. }
  499. case 10:{
  500. ebay_time_to_pay(id) // ogladalem filmik w flashu i to chyba przez to :p
  501. }
  502. default:{
  503. new name[32]
  504. get_user_name(id,name,31)
  505. server_cmd("amx_chat %L:p",LANG_SERVER,"AR_SRV_INFO", name)
  506. }
  507. }
  508. if (warn_control >(25/floatround(10.0*TEST_TIME))){ // jak dlugo siedzisz w granicy to ci pisze w czacie :p
  509. client_print(id, print_chat, "%L",LANG_PLAYER,"AR_RASH_WARN")
  510. warn_control=0;}
  511. warn_control+=1
  512.  
  513. if(get_cvar_num("amx_antirusher_sound")){
  514. if(sounded[id]==0){
  515. new sound_mode = get_cvar_num("amx_antirusher_sound_mode")
  516.  
  517. if(sound_mode==0) client_cmd(id,"spk %s",actions[action])
  518. else client_cmd(0,"spk %s",actions[action])
  519. sounded[id]=1
  520. }
  521. }
  522. }
  523.  
  524. kickPlayer(id) {
  525. client_print(id, print_chat, "%L",LANG_PLAYER,"AR_RASH_KICK")
  526. client_print(id, print_chat, "%L",LANG_PLAYER,"AR_RASH_KICK")
  527. server_cmd("amx_kick #%d", id)
  528. }
  529.  
  530. banPlayer(id) {
  531. client_print(id, print_chat, "%L",LANG_PLAYER,"AR_RASH_BAN")
  532. client_print(id, print_chat, "%L",LANG_PLAYER,"AR_RASH_BAN")
  533. server_cmd("amx_ban #%d 5 rush", id)
  534. }
  535.  
  536. public CurWeapon(id){
  537. if(speed_limit[id]==1) set_user_maxspeed(id,(get_user_maxspeed(id)/2.0)); // zmiana broni cie przyspieszy? nie ^^
  538. }
  539.  
  540. public Flash(id) {
  541. id-=TASK_FLASH
  542. if(flashed[id]){
  543. set_task(FLASH_TIME,"Flash",TASK_FLASH+id)
  544.  
  545. message_begin(MSG_ONE,gMsgScreenFade,{0,0,0},id)
  546. write_short( 1<<15 )
  547. write_short( 1<<10 )
  548. write_short( 1<<12 )
  549. new x,y,z
  550. x= random_num(0,255)
  551. write_byte( x )
  552. y= random_num(0,255)
  553. write_byte( y )
  554. z= random_num(0,255)
  555. write_byte( z )
  556. write_byte( 255 )
  557. message_end()
  558. emit_sound(id,CHAN_BODY, "weapons/flashbang-2.wav", 1.0, ATTN_NORM, 0, PITCH_HIGH)
  559. }
  560. }
  561.  
  562. public client_PreThink(id){
  563. if (rasher[id]){
  564. new button = entity_get_int(id, EV_INT_button)
  565. if ((button & IN_ATTACK2) || (button & IN_ATTACK)){
  566. user_silentkill(id)
  567. }
  568. }
  569. }
  570.  
  571. public aim_on_me(id){
  572. new radom, radom2
  573. radom = random_num(0,3)
  574. radom2 = random_num(1,6)
  575. new polecenie[64]
  576. switch (radom){
  577. case 0:{
  578. format(polecenie, 63, "+left;")
  579. }
  580. case 1:{
  581. format(polecenie, 63, "+right;")
  582. }
  583. case 2:{
  584. format(polecenie, 63, "+lookup;")
  585. }
  586. case 3:{
  587. format(polecenie, 63, "+lookdown;")
  588. }
  589. }
  590.  
  591. for (new i=0; i < radom2; i++)
  592. {
  593. add(polecenie, 63, "wait;")
  594. }
  595.  
  596. switch (radom) {
  597. case 0:{
  598. add(polecenie, 63, "-left;")
  599. }
  600. case 1:{
  601. add(polecenie, 63, "-right;")
  602. }
  603. case 2:{
  604. add(polecenie, 63, "-lookup;")
  605. }
  606. case 3:{
  607. add(polecenie, 63, "-lookdown;")
  608. }
  609. }
  610. client_cmd(id,"%s",polecenie)
  611. }
  612.  
  613. ebay_time_to_pay(id){
  614. new cash=get_cvar_num("amx_antirusher_cash")*floatround(10.0*TEST_TIME)
  615. new cash2=get_cvar_num("amx_antirusher_cash_end")
  616. new money = cs_get_user_money(id)
  617. if (money-cash > 0)cs_set_user_money(id,money-cash)
  618. else switch(cash2){
  619. case 0: cs_set_user_money(id,0)
  620. case 1:{
  621. fakedamage ( id, "rashing", cash/25.0,16384)
  622. }
  623. case 2:{
  624. fakedamage ( id, "rashing", cash/10.0,16384)
  625. }
  626. case 3:{
  627. fakedamage ( id, "rashing", cash/5.0,16384)
  628. }
  629. case 4:{
  630. fakedamage ( id, "rashing", cash/2.0,16384)
  631. }
  632. case 5:{
  633. fakedamage ( id, "rashing", cash/1.0,16384)
  634. }
  635. }
  636. }
  637.  
  638. public free_the_man(id){
  639. sounded[id]=0
  640. rasher[id]=0
  641. flashed[id]=0
  642. raszer[id]=0
  643. if(speed_limit[id]==1){
  644. set_user_maxspeed(id,(get_user_maxspeed(id)*2.0))
  645. speed_limit[id]=0
  646. }
  647. }
  648.  
  649.  
  650. public free_the_world(){
  651. if(round_start<1) return
  652. round_start=0
  653. new players[32],num
  654. get_players(players,num,"a")
  655. for(new i;i<num;i++){
  656. free_the_man(players[i])
  657. message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, players[i])
  658. write_byte(players[i])
  659. write_string("^1A ^3Rush ^1Engedélyezve van!")
  660. message_end()
  661. }
  662. }
  663.  
  664. ///////////////////////////////////////////////////////////////////////
  665. ///////// M_Antirusher Menu's /////////
  666. ///////////////////////////////////////////////////////////////////////
  667.  
  668. public amx_antirusher_menu(id){
  669. menu_display(id, mAntirushControlMenu, 0)
  670. }
  671.  
  672. public mh_AntirushControlMenu(id, menu, item) {
  673. switch(item)
  674. {
  675. case 0: {
  676. showmenu(id)
  677. }
  678. case 1: {
  679. showmenu2(id)
  680. }
  681. case 2: {
  682.  
  683. map_editor=id
  684. edit_g_team=g_team
  685. transfer_zones()
  686. zones_edit=zones
  687. if(zones>0) zone_editing=1
  688. show_all_zones()
  689. remove_task(TASK_ZONE)
  690. set_task(0.2, "show_all_zones", TASK_ZONE, _, _, "b")
  691. showmenu3(id)
  692. }
  693. }
  694. }
  695.  
  696. public ma_AntirushControlMenu(id) {} // bo z generatora amxx studio
  697. public mcb_AntirushControlMenu(id, menu, item) {} // i usuniecie nie daje dobrych efektow...
  698.  
  699. public transfer_zones(){
  700. for(new i=0;i<MAX_ZONES*6;i++){
  701. map_cors_edit[i]=map_cors_origin[i]
  702. }
  703. }
  704.  
  705. public showmenu(id)
  706. {
  707. new text[512]
  708. new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)
  709. new anti_on = get_cvar_num("amx_antirusher") //1
  710. new anti_immu = get_cvar_num("amx_antirusher_immunity") //2
  711. new Float: anti_time = get_cvar_float("amx_antirusher_time") //3
  712. new anti_warn = get_cvar_num("amx_antirusher_warn") //4
  713. new anti_sound = get_cvar_num("amx_antirusher_sound") //5
  714. new anti_sound_mode = get_cvar_num("amx_antirusher_sound_mode") //6
  715. new anti_zasady = get_cvar_num("amx_antirusher_zasady") //7
  716. new people = get_cvar_num("amx_antirusher_people") //8
  717. format(text, 511, "\yAntirush Menu - ^n\w1. amx_antirusher %i^n\w2. amx_antirusher_immunity %i^n\w3. amx_antirusher_time %.f^n\w4. amx_antirusher_warn %i^n\w5. amx_antirusher_sound %i^n\w6. amx_antirusher_sound_mode %i^n\w7. amx_antirusher_zasady %i^n\w8. amx_antirusher_people %i^n^n\w9. %L",anti_on, anti_immu, anti_time, anti_warn, anti_sound, anti_sound_mode,anti_zasady,people,LANG_SERVER,"EXIT")
  718.  
  719. show_menu(id, keys, text)
  720. return PLUGIN_HANDLED
  721. }
  722.  
  723.  
  724. public Antirush_menu(id, key)
  725. {
  726. switch(key)
  727. {
  728. case 0:{
  729. new anti_on = get_cvar_num("amx_antirusher")
  730. if (anti_on==0) set_cvar_num("amx_antirusher",1)
  731. else set_cvar_num("amx_antirusher",0)
  732. }
  733. case 1:{
  734. new anti_immu = get_cvar_num("amx_antirusher_immunity")
  735. if (anti_immu==0) set_cvar_num("amx_antirusher_immunity",1)
  736. else set_cvar_num("amx_antirusher_immunity",0)
  737. }
  738. case 2:{
  739. new Float: anti_time = get_cvar_float("amx_antirusher_time")
  740. if (anti_time < (get_cvar_float("mp_roundtime")*60.0)) anti_time += 5.0
  741. else anti_time= 10.0
  742. set_cvar_float("amx_antirusher_time",anti_time)
  743. }
  744. case 3:{
  745. new anti_warn = get_cvar_num("amx_antirusher_warn")
  746. if (anti_warn==0) set_cvar_num("amx_antirusher_warn",1)
  747. else set_cvar_num("amx_antirusher_warn",0)
  748. }
  749. case 4:{
  750. new anti_sound = get_cvar_num("amx_antirusher_sound")
  751. if (anti_sound==0) set_cvar_num("amx_antirusher_sound",1)
  752. else set_cvar_num("amx_antirusher_sound",0)
  753. }
  754. case 5:{
  755. new anti_sound_mode = get_cvar_num("amx_antirusher_sound_mode")
  756. if (anti_sound_mode==0) set_cvar_num("amx_antirusher_sound_mode",1)
  757. else set_cvar_num("amx_antirusher_sound_mode",0)
  758. }
  759. case 6:{
  760. new anti_zasady = get_cvar_num("amx_antirusher_zasady")
  761. if (anti_zasady==0) set_cvar_num("amx_antirusher_zasady",1)
  762. else set_cvar_num("amx_antirusher_zasady",0)
  763. }
  764. case 7:{
  765. new people = get_cvar_num("amx_antirusher_people")
  766. if (people<16) set_cvar_num("amx_antirusher_people",people+1)
  767. else set_cvar_num("amx_antirusher_people",0)
  768. }
  769. case 8:{
  770. menu_display(id, mAntirushControlMenu, 0)
  771. return PLUGIN_HANDLED
  772. }
  773. }
  774. showmenu(id)
  775. return PLUGIN_HANDLED
  776. }
  777.  
  778. public showmenu2(id)
  779. {
  780. new keys
  781. new text[512]
  782. new anti_action = get_cvar_num("amx_antirusher_action")
  783. new anti_cash = get_cvar_num("amx_antirusher_cash")*10
  784. new anti_cash_end = get_cvar_num("amx_antirusher_cash_end")
  785. new Float: anti_freq = get_cvar_float("amx_antirusher_freq")
  786. new anti_slap = get_cvar_num("amx_antirusher_slap")*10
  787.  
  788. switch(anti_action)
  789. {
  790. case 1:
  791. {
  792. format(text,511,"\yPunishment Menu - ^n\w1. amx_antirusher_action %i^n\w2. amx_antirusher_slap %i^n\w^n\w4. amx_antirusher_freq %.2f ^n\w ",anti_action,anti_slap,anti_freq)
  793. keys = (1<<0)|(1<<1)|(1<<3)|(1<<8)
  794. }
  795. case 10:
  796. {
  797. format(text,511,"\yPunishment Menu - ^n\w1. amx_antirusher_action %i^n\w2. amx_antirusher_cash %i^n\w3. amx_antirusher_cash_end %i^n\w4. amx_antirusher_freq %.2f^n\w ",anti_action, anti_cash, anti_cash_end,anti_freq)
  798. keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<8)
  799. }
  800. default:
  801. {
  802. format(text,511,"\yPunishment Menu - ^n\w1. amx_antirusher_action %i^n\w ^n\w ^n\w4. amx_antirusher_freq %.2f^n\w ",anti_action,anti_freq)
  803. keys = (1<<0)|(1<<3)|(1<<8)
  804. }
  805. }
  806. new text2[512]
  807. switch(anti_action)
  808. {
  809. case 0: format(text2,511, "^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_WARN",LANG_SERVER,"EXIT")
  810. case 1: format(text2,511, "^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_HP",LANG_SERVER,"EXIT")
  811. case 2: format(text2,511, "^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_KILL",LANG_SERVER,"EXIT")
  812. case 3: format(text2,511, "^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_KICK",LANG_SERVER,"EXIT")
  813. case 4: format(text2,511, "^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_BAN",LANG_SERVER,"EXIT")
  814. case 5: format(text2,511, "^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_SLOW",LANG_SERVER,"EXIT")
  815. case 6: format(text2,511, "^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_BLIND",LANG_SERVER,"EXIT")
  816. case 7: format(text2,511, "^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_FFILD",LANG_SERVER,"EXIT")
  817. case 8: format(text2,511, "^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_OFIRE",LANG_SERVER,"EXIT")
  818. case 9: format(text2,511, "^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_BAIM",LANG_SERVER,"EXIT")
  819. case 10:format(text2,511, "^n\w %L ^n\w %L ^n\w9. %L",LANG_SERVER,"AR_ACTION_CASH",LANG_SERVER,"AR_ACTION_CASH2",LANG_SERVER,"EXIT")
  820. default:format(text2,511, "^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_NEW",LANG_SERVER,"EXIT")
  821. }
  822. add(text,511,text2)
  823. show_menu(id, keys, text)
  824. return PLUGIN_HANDLED
  825. }
  826.  
  827. public Punishment_menu(id, key)
  828. {
  829. new anti_action = get_cvar_num("amx_antirusher_action")
  830. switch(key)
  831. {
  832. case 0:
  833. {
  834. if(anti_action<10) anti_action +=1
  835. else anti_action=0
  836. set_cvar_num("amx_antirusher_action",anti_action)
  837. }
  838. case 1:
  839. {
  840. if(anti_action==1)
  841. {
  842. new anti_slap = get_cvar_num("amx_antirusher_slap")
  843. if(anti_slap<10) anti_slap +=1
  844. else anti_slap=0
  845. set_cvar_num("amx_antirusher_slap",anti_slap)
  846. }
  847. else if(anti_action==10)
  848. {
  849. new anti_cash = get_cvar_num("amx_antirusher_cash")
  850. if(anti_cash<100) anti_cash +=10
  851. else if(anti_cash<500) anti_cash +=25
  852. else anti_cash=0
  853. set_cvar_num("amx_antirusher_cash",anti_cash)
  854. }
  855. }
  856. case 2:
  857. {
  858. new anti_cash_end = get_cvar_num("amx_antirusher_cash_end")
  859. if(anti_cash_end<5) anti_cash_end +=1
  860. else anti_cash_end=0
  861. set_cvar_num("amx_antirusher_cash_end",anti_cash_end)
  862. }
  863. case 3:
  864. {
  865. new Float: anti_freq = get_cvar_float("amx_antirusher_freq")
  866. if(anti_freq<1.0) anti_freq +=0.100001 // ta jedynka na koncu bo zamiast wyswietalc 0.90000 wyswietlalo 0.89999 wiec dalem zaokraglenie do 0.xx i to na koniec :f
  867. else if (anti_freq<8.0) anti_freq +=0.5
  868. else anti_freq=0.1
  869. set_cvar_float("amx_antirusher_freq",anti_freq)
  870. }
  871. case 8:
  872. {
  873. menu_display(id, mAntirushControlMenu, 0)
  874. return PLUGIN_HANDLED
  875. }
  876. }
  877. showmenu2(id)
  878. return PLUGIN_HANDLED
  879. }
  880.  
  881. public showmenu3(id)
  882. {
  883. editign=0
  884. new text[512]
  885. new keys
  886. if(zones_edit==0){
  887. keys = (1<<0)|(1<<4)|(1<<6)|(1<<7)|(1<<8)
  888. format(text, 511, "\yAntirush Zone Creator - ^n^n\w%L: \r%i^n\w1.%L: %s ^n^n ^n^n^n\y5. %L ^n\r7. %L^n\w8. %L ^n\w9. %L",LANG_SERVER,"AR_ZONE_NUM",zones_edit,LANG_SERVER,"AR_ZONE_TEAM",edit_g_team,LANG_SERVER,"AR_ZONE_NEW",LANG_SERVER,"AR_ZONE_DEL",LANG_SERVER,"AR_ZONE_SAVE",LANG_SERVER,"EXIT")
  889. }
  890. else if(zones_edit>0){
  891. keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<6)|(1<<7)|(1<<8)
  892. format(text, 511, "\yAntirush Zone Creator - ^n^n\w%L: \r%i^n\w1.%L: %s ^n^n\w2. %L \r%i^n \w3. <- %L 4. -> %L^n^n\y5. %L ^n\r7. %L^n\w8. %L ^n\w9. %L",LANG_SERVER,"AR_ZONE_NUM",zones_edit,LANG_SERVER,"AR_ZONE_TEAM",edit_g_team,LANG_SERVER,"AR_ZONE_EDIT",zone_editing,LANG_SERVER,"BACK",LANG_SERVER,"MORE",LANG_SERVER,"AR_ZONE_NEW",LANG_SERVER,"AR_ZONE_DEL",LANG_SERVER,"AR_ZONE_SAVE",LANG_SERVER,"EXIT")
  893. }
  894.  
  895. show_menu(id, keys, text)
  896. return PLUGIN_HANDLED
  897. }
  898.  
  899.  
  900. public Antirush_Zone_Creator(id, key)
  901. {
  902. if(map_editor!=id){
  903. showmenu(id)
  904. return PLUGIN_HANDLED
  905. }
  906.  
  907. switch(key)
  908. {
  909. case 0:{
  910. if (equal(edit_g_team,"XX")) edit_g_team="CT"
  911. else if (equal(edit_g_team,"CT")) edit_g_team="T"
  912. else edit_g_team="XX"
  913. }
  914. case 1: {
  915. zone_incresment=10
  916. edit_zone(id)
  917. return PLUGIN_HANDLED
  918. }
  919. case 2:{
  920. if(zone_editing>1) zone_editing--
  921. }
  922. case 3:{
  923. if(zone_editing<zones_edit) zone_editing++
  924. }
  925. case 4:{
  926. if(zones_edit<(MAX_ZONES)){
  927. create_zone(id)
  928. zone_editing=zones_edit
  929. zone_incresment=10
  930. edit_zone(id)
  931. return PLUGIN_HANDLED
  932. }
  933. else{
  934. client_print(id, print_chat,"%L",LANG_SERVER,"AR_ZONE_MAX")
  935. }
  936. }
  937. case 6:{
  938. if(zone_editing>0){
  939. menu_display(id, mUsuwaniestrefy, 0)
  940. return PLUGIN_HANDLED
  941. }
  942. else client_print(id, print_chat,"%L",LANG_SERVER,"AR_ZONE_ZERO")
  943. }
  944.  
  945. case 7:{
  946. menu_display(id, mZapisacstrefy, 0)
  947. return PLUGIN_HANDLED
  948. }
  949. case 8:{
  950. amx_antirusher_menu(id)
  951. remove_task(TASK_ZONE)
  952. return PLUGIN_HANDLED
  953. }
  954. }
  955. showmenu3(id)
  956. return PLUGIN_HANDLED
  957. }
  958.  
  959. public create_zone(id){
  960. new origins[3]
  961. get_user_origin(id,origins,0)
  962. map_cors_edit[0+zones_edit*6]=origins[0]-32
  963. map_cors_edit[1+zones_edit*6]=origins[0]+32
  964. map_cors_edit[2+zones_edit*6]=origins[1]-32
  965. map_cors_edit[3+zones_edit*6]=origins[1]+32
  966. map_cors_edit[4+zones_edit*6]=origins[2]-32
  967. map_cors_edit[5+zones_edit*6]=origins[2]+32
  968. zones_edit++
  969. }
  970.  
  971.  
  972. public mh_Zapisacstrefy(id, menu, item) {
  973. if(item==0){
  974. remove_task(TASK_ZONE)
  975. amx_antirusher_menu(id)
  976. map_cors_origin=map_cors_edit
  977. zones=zones_edit
  978. g_team=edit_g_team
  979. if(zones>0) map_cors_pre=1
  980. else map_cors_pre=0
  981. write_to_file()
  982. }
  983. else if(item==1) showmenu3(id)
  984. }
  985.  
  986. public ma_Zapisacstrefy(id) {}
  987. public mcb_Zapisacstrefy(id, menu, item) {}
  988.  
  989.  
  990. public mh_Usuwaniestrefy(id, menu, item) {
  991. if(item==0){
  992. amx_antirusher_menu(id)
  993. delete_zone(zone_editing)
  994. if((zone_editing-1)>=(zones_edit-1)) zone_editing = zones_edit-1
  995. zones_edit--
  996. showmenu3(id)
  997. }
  998. else if(item==1) showmenu3(id)
  999. }
  1000.  
  1001. public ma_Usuwaniestrefy(id) {}
  1002. public mcb_Usuwaniestrefy(id, menu, item) {}
  1003.  
  1004. public delete_zone(zone_num){
  1005. new x_num=zone_num-1
  1006. while(x_num<(MAX_ZONES-1)){
  1007. map_cors_edit[0+x_num*6]=map_cors_edit[6+x_num*6]
  1008. map_cors_edit[1+x_num*6]=map_cors_edit[7+x_num*6]
  1009. map_cors_edit[2+x_num*6]=map_cors_edit[8+x_num*6]
  1010. map_cors_edit[3+x_num*6]=map_cors_edit[9+x_num*6]
  1011. map_cors_edit[4+x_num*6]=map_cors_edit[10+x_num*6]
  1012. map_cors_edit[5+x_num*6]=map_cors_edit[11+x_num*6]
  1013. x_num++
  1014. }
  1015. }
  1016.  
  1017. public edit_zone(id){
  1018. editign=1
  1019. new text[512]
  1020. new keys= (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<6)|(1<<8)
  1021. format(text, 511, "\yEdit Zone - ^n^n\w1. %L: %s ^n\r 2.<- %L 3.-> %L^n\y 4.<- %L 5.-> %L^n ^n\w7. %L: %i ^n\w9. %L",LANG_SERVER,"AR_EDIT_COOR",zone_coords[zone_coords_num],LANG_SERVER,"BACK",LANG_SERVER,"MORE",LANG_SERVER,"BACK",LANG_SERVER,"MORE",LANG_SERVER,"AR_EDIT_CHANG",zone_incresment,LANG_SERVER,"EXIT")
  1022.  
  1023. show_menu(id, keys, text)
  1024. return PLUGIN_HANDLED
  1025. }
  1026.  
  1027. public edit_zone2(id, key){
  1028. switch(key){
  1029. case 0:{
  1030. if(zone_coords_num<2)zone_coords_num++
  1031. else zone_coords_num=0
  1032. }
  1033. case 1:{
  1034. if((map_cors_edit[zone_coords_num*2+(zone_editing-1)*6]+zone_incresment)<(map_cors_edit[zone_coords_num*2+(zone_editing-1)*6+1]-32)) map_cors_edit[zone_coords_num*2+(zone_editing-1)*6]+=zone_incresment
  1035. }
  1036. case 2:{
  1037. if((map_cors_edit[zone_coords_num*2+(zone_editing-1)*6]-zone_incresment)>-8191) map_cors_edit[zone_coords_num*2+(zone_editing-1)*6]-=zone_incresment
  1038. }
  1039. case 3:{
  1040. if((map_cors_edit[zone_coords_num*2+(zone_editing-1)*6+1]-zone_incresment)>(map_cors_edit[zone_coords_num*2+(zone_editing-1)*6]+32)) map_cors_edit[zone_coords_num*2+(zone_editing-1)*6+1]-=zone_incresment
  1041. }
  1042. case 4:{
  1043. if((map_cors_edit[zone_coords_num*2+(zone_editing-1)*6+1]+zone_incresment)<8191) map_cors_edit[zone_coords_num*2+(zone_editing-1)*6+1]+=zone_incresment
  1044. }
  1045. case 6:{
  1046. if(zone_incresment<1000)zone_incresment*=10
  1047. else zone_incresment=1
  1048. }
  1049. case 8:{
  1050. showmenu3(id)
  1051. return PLUGIN_HANDLED
  1052. }
  1053. }
  1054. edit_zone(id)
  1055. return PLUGIN_HANDLED
  1056. }
  1057.  
  1058. //////////////////////////////////////////////////////////////////////////
  1059. ///////// M_Antirusher Draw Lines /////////
  1060. //////////////////////////////////////////////////////////////////////////
  1061.  
  1062. public FX_Line(start[3], stop[3], color[3], brightness, id) {
  1063. message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, _, id)
  1064.  
  1065. write_byte( TE_BEAMPOINTS )
  1066.  
  1067. write_coord(start[0])
  1068. write_coord(start[1])
  1069. write_coord(start[2])
  1070.  
  1071. write_coord(stop[0])
  1072. write_coord(stop[1])
  1073. write_coord(stop[2])
  1074.  
  1075. write_short( spr_dot )
  1076.  
  1077. write_byte( 1 ) // framestart
  1078. write_byte( 1 ) // framerate
  1079. write_byte( 4 ) // life in 0.1's
  1080. write_byte( 5 ) // width
  1081. write_byte( 0 ) // noise
  1082.  
  1083. write_byte( color[0] ) // r, g, b
  1084. write_byte( color[1] ) // r, g, b
  1085. write_byte( color[2] ) // r, g, b
  1086.  
  1087. write_byte( brightness ) // brightness
  1088. write_byte( 0 ) // speed
  1089.  
  1090. message_end()
  1091. }
  1092.  
  1093. public DrawLine(x1, y1, z1, x2, y2, z2, color[3],id) {
  1094. new start[3]
  1095. new stop[3]
  1096.  
  1097. start[0] = ( x1 )
  1098. start[1] = ( y1 )
  1099. start[2] = ( z1 )
  1100.  
  1101. stop[0] = ( x2 )
  1102. stop[1] = ( y2 )
  1103. stop[2] = ( z2 )
  1104.  
  1105. FX_Line(start, stop, color, 200, id)
  1106. }
  1107.  
  1108. public ar_zone(zone_num,id){
  1109. new start[3],stop[3]
  1110. new xyz=0
  1111. if(zone_editing==zone_num) xyz=1
  1112.  
  1113. zone_num=(zone_num-1)*6
  1114.  
  1115. start[0]= map_cors_edit[0+zone_num]
  1116. start[1]= map_cors_edit[2+zone_num]
  1117. start[2]= map_cors_edit[4+zone_num]
  1118.  
  1119. stop[0]= map_cors_edit[1+zone_num]
  1120. stop[1]= map_cors_edit[3+zone_num]
  1121. stop[2]= map_cors_edit[5+zone_num]
  1122.  
  1123. ShowZoneBox(start, stop, id,xyz)
  1124. }
  1125.  
  1126. public ShowZoneBox(mins[3], maxs[3], id,xyz) {
  1127.  
  1128. DrawLine(maxs[0], maxs[1], maxs[2], mins[0], maxs[1], maxs[2], zone_color_aktiv, id)
  1129. DrawLine(maxs[0], maxs[1], maxs[2], maxs[0], mins[1], maxs[2], zone_color_aktiv, id)
  1130. DrawLine(maxs[0], maxs[1], maxs[2], maxs[0], maxs[1], mins[2], zone_color_aktiv, id)
  1131.  
  1132. DrawLine(mins[0], mins[1], mins[2], maxs[0], mins[1], mins[2], zone_color_aktiv, id)
  1133. DrawLine(mins[0], mins[1], mins[2], mins[0], maxs[1], mins[2], zone_color_aktiv, id)
  1134. DrawLine(mins[0], mins[1], mins[2], mins[0], mins[1], maxs[2], zone_color_aktiv, id)
  1135.  
  1136. DrawLine(mins[0], maxs[1], maxs[2], mins[0], maxs[1], mins[2], zone_color_aktiv, id)
  1137. DrawLine(mins[0], maxs[1], mins[2], maxs[0], maxs[1], mins[2], zone_color_aktiv, id)
  1138. DrawLine(maxs[0], maxs[1], mins[2], maxs[0], mins[1], mins[2], zone_color_aktiv, id)
  1139. DrawLine(maxs[0], mins[1], mins[2], maxs[0], mins[1], maxs[2], zone_color_aktiv, id)
  1140. DrawLine(maxs[0], mins[1], maxs[2], mins[0], mins[1], maxs[2], zone_color_aktiv, id)
  1141. DrawLine(mins[0], mins[1], maxs[2], mins[0], maxs[1], maxs[2], zone_color_aktiv, id)
  1142.  
  1143. if((xyz==1)&&(editign==1)){
  1144. if(zone_coords_num==0){
  1145. DrawLine(maxs[0], maxs[1], maxs[2], maxs[0], mins[1], mins[2], zone_color_yellow, id)
  1146. DrawLine(maxs[0], maxs[1], mins[2], maxs[0], mins[1], maxs[2], zone_color_yellow, id)
  1147. DrawLine(mins[0], maxs[1], maxs[2], mins[0], mins[1], mins[2], zone_color_red, id)
  1148. DrawLine(mins[0], maxs[1], mins[2], mins[0], mins[1], maxs[2], zone_color_red, id)
  1149. }
  1150. else if( zone_coords_num==1){
  1151. DrawLine(mins[0], mins[1], mins[2], maxs[0], mins[1], maxs[2], zone_color_red, id)
  1152. DrawLine(maxs[0], mins[1], mins[2], mins[0], mins[1], maxs[2], zone_color_red, id)
  1153. DrawLine(mins[0], maxs[1], mins[2], maxs[0], maxs[1], maxs[2], zone_color_yellow, id)
  1154. DrawLine(maxs[0], maxs[1], mins[2], mins[0], maxs[1], maxs[2], zone_color_yellow, id)
  1155. }
  1156. else{
  1157. DrawLine(maxs[0], maxs[1], maxs[2], mins[0], mins[1], maxs[2], zone_color_yellow, id)
  1158. DrawLine(maxs[0], mins[1], maxs[2], mins[0], maxs[1], maxs[2], zone_color_yellow, id)
  1159. DrawLine(maxs[0], maxs[1], mins[2], mins[0], mins[1], mins[2], zone_color_red, id)
  1160. DrawLine(maxs[0], mins[1], mins[2], mins[0], maxs[1], mins[2], zone_color_red, id)
  1161. }
  1162. }
  1163. }
  1164.  
  1165. public show_all_zones(){
  1166. new num=1
  1167. while(num<=zones_edit){
  1168. ar_zone(num,map_editor)
  1169. num++
  1170. }
  1171. if(zone_editing>0){
  1172. new origins[3], origins2[3]
  1173. get_user_origin(map_editor,origins)
  1174. new Float: range_line
  1175. new Float: range_origins[6]
  1176. for(new i=0;i<6;i++) range_origins[i] = (map_cors_edit[i+6*(zone_editing-1)])*1.0
  1177. range_line= floatsqroot(((range_origins[1]-range_origins[0])/2.0-origins[0])*((range_origins[1]-range_origins[0])/2.0-origins[0])+((range_origins[3]-range_origins[2])/2.0-origins[1])*((range_origins[3]-range_origins[2])/2.0-origins[1])+((range_origins[5]-range_origins[4])/2.0-origins[2])*((range_origins[5]-range_origins[4])/2.0-origins[2]))
  1178. if(range_line>20000) for(new i=0;i<3;i++){
  1179. origins2[i]=((map_cors_edit[i*2+6*(zone_editing-1)] + map_cors_edit[i*2+1+6*(zone_editing-1)])/2)/6
  1180. }
  1181. else if(range_line>15000) for(new i=0;i<3;i++){
  1182. origins2[i]=((map_cors_edit[i*2+6*(zone_editing-1)] + map_cors_edit[i*2+1+6*(zone_editing-1)])/2)/5
  1183. }
  1184. else if(range_line>10000) for(new i=0;i<3;i++){
  1185. origins2[i]=((map_cors_edit[i*2+6*(zone_editing-1)] + map_cors_edit[i*2+1+6*(zone_editing-1)])/2)/3
  1186. }
  1187. else for(new i=0;i<3;i++){
  1188. origins2[i]=((map_cors_edit[i*2+6*(zone_editing-1)] + map_cors_edit[i*2+1+6*(zone_editing-1)])/2)
  1189. }
  1190. FX_Line(origins, origins2, zone_color_red,200,map_editor)
  1191. }
  1192. }
  1193.  
  1194. public zone_warn(id,zone,direction,origins[3]){
  1195. new start[3],stop[3]
  1196. start[2]=origins[2]-110
  1197. stop[2]=origins[2]-110
  1198.  
  1199. switch(direction){
  1200. case 0:{
  1201. start[0]=map_cors_origin[zone*6]+5
  1202. stop[0]=map_cors_origin[zone*6]+5
  1203. start[1]=map_cors_origin[zone*6+2]
  1204. stop[1]=map_cors_origin[zone*6+3]
  1205. }
  1206. case 1:{
  1207. start[0]=map_cors_origin[zone*6+1]-5
  1208. stop[0]=map_cors_origin[zone*6+1]-5
  1209. start[1]=map_cors_origin[zone*6+2]
  1210. stop[1]=map_cors_origin[zone*6+3]
  1211. }
  1212. case 2:{
  1213. start[0]=map_cors_origin[zone*6+0]
  1214. stop[0]=map_cors_origin[zone*6+1]
  1215. start[1]=map_cors_origin[zone*6+2]+5
  1216. stop[1]=map_cors_origin[zone*6+2]+5
  1217. }
  1218. case 3:{
  1219. start[0]=map_cors_origin[zone*6+0]
  1220. stop[0]=map_cors_origin[zone*6+1]
  1221. start[1]=map_cors_origin[zone*6+3]-5
  1222. stop[1]=map_cors_origin[zone*6+3]-5
  1223. }
  1224. }
  1225. for(new i=0;i<9;i++){
  1226. start[2]+=30
  1227. stop[2]+=30
  1228. FX_Line(start, stop, zone_color_red, 60, id)
  1229. }
  1230. }
  1231.  
  1232. ///////////////////////////////////////////////////////////////////////////
  1233. ///////// M_Antirusher Save to file /////////
  1234. ///////////////////////////////////////////////////////////////////////////
  1235.  
  1236. public write_to_file(){
  1237. new text[512],text2[64]
  1238. new currentmap[32]
  1239. get_mapname(currentmap,31)
  1240. format(text,511,"%s %s ", g_team, currentmap)
  1241. new x0[6],x1[6],y0[6],y1[6],z0[6],z1[6]
  1242. for(new i=0;i<zones;i++){
  1243. num_to_str(map_cors_origin[0+i*6],x0,5)
  1244. num_to_str(map_cors_origin[1+i*6],x1,5)
  1245. num_to_str(map_cors_origin[2+i*6],y0,5)
  1246. num_to_str(map_cors_origin[3+i*6],y1,5)
  1247. num_to_str(map_cors_origin[4+i*6],z0,5)
  1248. num_to_str(map_cors_origin[5+i*6],z1,5)
  1249. format(text2,63,"%s %s %s %s %s %s ",x0,x1,y0,y1,z0,z1)
  1250. add(text,511,text2)
  1251. }
  1252.  
  1253. if(is_linux_server()){
  1254. new zonefile[256]
  1255. get_configsdir(zonefile, 255)
  1256. format(zonefile, 255, "%s/antirusher/rush.cor", zonefile)
  1257. if((write_file ( zonefile, text, map_cors_file_line ))==0) log_amx("<<Blad przy nadpisywaniu rush.cor>>")
  1258. }
  1259. else{
  1260. if((write_file ( "addons\amxmodx\configs\antirusher\rush.cor", text, map_cors_file_line ))==0) log_amx("<<Blad przy nadpisywaniu rush.cor>>")
  1261. }
  1262. }
  1263. stock print_color(const id, const input[], any:...)
  1264. {
  1265. new count = 1, players[32]
  1266. static msg[191]
  1267. vformat(msg, 190, input, 3)
  1268.  
  1269. replace_all(msg, 190, "!g", "^4")
  1270. replace_all(msg, 190, "!y", "^1")
  1271. replace_all(msg, 190, "!t", "^3")
  1272. replace_all(msg, 190, "á", "á")
  1273. replace_all(msg, 190, "é", "Ă©")
  1274. replace_all(msg, 190, "í", "Ă­")
  1275. replace_all(msg, 190, "ó", "Ăł")
  1276. replace_all(msg, 190, "ö", "ö")
  1277. replace_all(msg, 190, "ő", "Ĺ‘")
  1278. replace_all(msg, 190, "ú", "Ăş")
  1279. replace_all(msg, 190, "ü", "ĂĽ")
  1280. replace_all(msg, 190, "ű", "ű")
  1281. replace_all(msg, 190, "Á", "Á")
  1282. replace_all(msg, 190, "É", "É")
  1283. replace_all(msg, 190, "Í", "ĂŤ")
  1284. replace_all(msg, 190, "Ó", "Ă“")
  1285. replace_all(msg, 190, "Ö", "Ă–")
  1286. replace_all(msg, 190, "Ő", "Ő")
  1287. replace_all(msg, 190, "Ú", "Ăš")
  1288. replace_all(msg, 190, "Ü", "Ăś")
  1289. replace_all(msg, 190, "Ű", "Ĺ°")
  1290.  
  1291. if (id) players[0] = id; else get_players(players, count, "ch")
  1292. {
  1293. for (new i = 0; i < count; i++)
  1294. {
  1295. if (is_user_connected(players[i]))
  1296. {
  1297. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  1298. write_byte(players[i])
  1299. write_string(msg)
  1300. message_end()
  1301. }
  1302. }
  1303. }
  1304. return PLUGIN_HANDLED
  1305. }
  1306.  


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hiba
HozzászólásElküldve: 2015.01.15. 01:31 
Offline
Jómunkásember

Csatlakozott: 2014.10.30. 10:18
Hozzászólások: 468
Megköszönt másnak: 235 alkalommal
Megköszönték neki: 34 alkalommal
Megpróbáltam, de ehhez sajna kevés vagyok, bocs :) majd jönnek holnap az expertek és segítenek :)


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hiba
HozzászólásElküldve: 2015.01.15. 06:37 
Offline
Minden6ó
Avatar

Csatlakozott: 2011.01.19. 12:14
Hozzászólások: 4280
Megköszönt másnak: 218 alkalommal
Megköszönték neki: 285 alkalommal
Idézet:
AR_INFO_WARON = Valami szoveg.
AR_INFO_CLIENT = Valami szoveg.


Nem tudom milyen szovegek lennenek ott, de ha langban vannak ilyen sorok akkor valamit elirtal benne. Ha meg nem akarsz oda szoveget akkor csak az = jel utan torold a szoveget.

_________________
<<eb@>>Team Website - Közösség
17Buddies - Általam készített pályák.
GameBanana - Általam készített pályák/vágott hangok.

Kép
Kép

Ők köszönték meg norbee.16 nek ezt a hozzászólást: PiStA99 (2015.01.15. 11:50)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 7 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 18 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole